@concretecms/bedrock 1.3.7 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.yml +2 -0
- package/assets/account/js/frontend/components/AvatarCropper.vue +159 -0
- package/assets/account/js/frontend.js +1 -1
- package/assets/account/scss/frontend/_frontend.scss +2 -0
- package/assets/account/scss/frontend/avatar/_avatar-cropper.scss +82 -0
- package/assets/account/scss/frontend/avatar/_avatar.scss +6 -0
- package/assets/bedrock/scss/_frontend.scss +0 -1
- package/assets/calendar/js/backend/duration.js +13 -13
- package/assets/calendar/js/vendor/fullcalendar.js +1 -0
- package/assets/cms/components/Announcement/Action/ExternalLinkAction.vue +25 -0
- package/assets/cms/components/Announcement/Action/GuideAction.vue +36 -0
- package/assets/cms/components/Announcement/Action/VideoAction.vue +31 -0
- package/assets/cms/components/Announcement/Broadcast.vue +63 -0
- package/assets/cms/components/Announcement/Button/ExternalLinkButton.vue +26 -0
- package/assets/cms/components/Announcement/Header/Header.vue +33 -0
- package/assets/cms/components/Announcement/Item/Item.vue +50 -0
- package/assets/cms/components/Announcement/Modal/Modal.vue +77 -0
- package/assets/cms/components/Announcement/Slide/CollectSiteInformationSlide.vue +61 -0
- package/assets/cms/components/Announcement/Slide/FeatureSlide.vue +81 -0
- package/assets/cms/components/Announcement/Slide/WelcomeSlide.vue +87 -0
- package/assets/cms/components/Help/Modal.vue +48 -0
- package/assets/cms/components/Image/ThumbnailEditor.vue +117 -0
- package/assets/cms/components/RunningProcessList.vue +6 -1
- package/assets/cms/components/customizer/FontFamilyPageCustomizerWidget.vue +27 -7
- package/assets/cms/components/file-manager/Chooser/FileManager.vue +0 -1
- package/assets/cms/components/file-manager/Chooser/FolderBookmark.vue +0 -1
- package/assets/cms/components/file-manager/Chooser.vue +1 -1
- package/assets/cms/components/form/ConcreteAjaxSelect.vue +173 -0
- package/assets/cms/components/form/ConcreteExpressEntrySelect.vue +74 -0
- package/assets/cms/components/form/ConcreteFileDirectoryInput.vue +28 -26
- package/assets/cms/components/form/ConcreteFileInput.vue +17 -5
- package/assets/cms/components/form/ConcreteGroupInput.vue +134 -0
- package/assets/cms/components/form/ConcreteLocaleSelect.vue +58 -0
- package/assets/cms/components/form/ConcreteOptionSelect.vue +92 -0
- package/assets/cms/components/form/ConcretePageSelect.vue +67 -0
- package/assets/cms/components/form/ConcreteSelect.vue +75 -0
- package/assets/cms/components/form/ConcreteThemeColorInput.vue +19 -14
- package/assets/cms/components/form/ConcreteUserInput.vue +24 -4
- package/assets/cms/components/form/ConcreteUserSelect.vue +126 -0
- package/assets/cms/components/form/IconSelector.vue +14 -5
- package/assets/cms/components/form/PasswordInput.vue +141 -24
- package/assets/cms/components/groups/Chooser.vue +6 -5
- package/assets/cms/components/index.js +24 -0
- package/assets/cms/components/toolbar/ConcreteToolbarSiteList.vue +62 -0
- package/assets/cms/components/user/Chooser/Search.vue +5 -0
- package/assets/cms/components/user/Chooser/Users.vue +6 -2
- package/assets/cms/components/user/Chooser.vue +9 -3
- package/assets/cms/js/ajax-request/base.js +13 -4
- package/assets/cms/js/alert.js +2 -1
- package/assets/cms/js/base.js +3 -10
- package/assets/cms/js/edit-mode/area.js +0 -35
- package/assets/cms/js/edit-mode/block.js +27 -0
- package/assets/cms/js/edit-mode/containerblock.js +33 -3
- package/assets/cms/js/edit-mode/editmode.js +12 -0
- package/assets/cms/js/edit-mode/layout.js +56 -0
- package/assets/cms/js/edit-mode/style-customizer/style-customizer.js +0 -1
- package/assets/cms/js/file-manager/uploader.js +30 -206
- package/assets/cms/js/help/help.js +11 -8
- package/assets/cms/js/in-context-menu.js +5 -0
- package/assets/cms/js/jquery-vue.js +22 -0
- package/assets/cms/js/legacy-dialog.js +74 -65
- package/assets/cms/js/modal.js +73 -0
- package/assets/cms/js/panels.js +8 -0
- package/assets/cms/js/search/base.js +0 -18
- package/assets/cms/js/search/field-selector.js +6 -14
- package/assets/cms/js/select-combo-box.js +2 -0
- package/assets/cms/js/sitemap/sitemap-selector.js +2 -2
- package/assets/cms/js/sitemap/sitemap.js +15 -20
- package/assets/cms/js/toolbar.js +25 -2
- package/assets/cms/js/tree.js +7 -7
- package/assets/cms/js/users/group-manager.js +55 -0
- package/assets/cms/js/users/user-manager.js +2 -1
- package/assets/cms/js/users.js +1 -0
- package/assets/cms/js/vue/Manager.js +6 -3
- package/assets/cms/scss/_base.scss +2 -8
- package/assets/cms/scss/_cards.scss +7 -0
- package/assets/cms/scss/_file-manager.scss +1 -0
- package/assets/cms/scss/_file-uploader.scss +13 -3
- package/assets/cms/scss/_help.scss +11 -2
- package/assets/cms/scss/_item-selector.scss +10 -0
- package/assets/cms/scss/_layouts.scss +16 -0
- package/assets/cms/scss/_page-areas.scss +517 -245
- package/assets/cms/scss/_popover.scss +5 -0
- package/assets/cms/scss/_select-combo-box.scss +18 -0
- package/assets/cms/scss/_toolbar.scss +5 -14
- package/assets/cms/scss/_transitions.scss +13 -0
- package/assets/cms/scss/_variables.scss +18 -7
- package/assets/cms/scss/bootstrap/_reboot-tags.scss +17 -32
- package/assets/cms/scss/bootstrap/_reboot.scss +17 -7
- package/assets/cms/scss/bootstrap/_root-modified.scss +41 -20
- package/assets/cms/scss/file-manager/_thumbnail-image-editor.scss +45 -0
- package/assets/cms/scss/panels/_help.scss +0 -10
- package/assets/staging/scss/frontend/_frontend.scss +12 -0
- package/assets/staging/scss/frontend.scss +4 -0
- package/package.json +9 -9
- package/assets/account/js/frontend/components/Avatar/Avatar.js +0 -270
- package/assets/account/js/frontend/components/Avatar/Avatar.scss +0 -17
- package/assets/account/js/frontend/components/Avatar/Avatar.vue +0 -18
- package/assets/account/js/frontend/components/Avatar/Cropper.js +0 -202
- package/assets/account/js/frontend/components/Avatar/Cropper.scss +0 -136
- package/assets/account/js/frontend/components/Avatar/Cropper.vue +0 -40
- package/assets/bedrock/scss/_theme-grid.scss +0 -7
- package/assets/cms/js/edit-mode/style-customizer/inline-toolbar.js +0 -279
- package/assets/cms/js/modifiable-ajax-bootstrap-select.js +0 -78
- package/assets/cms/js/modifiable-bootstrap-select.js +0 -112
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="modal-dialog modal-dialog-centered">
|
|
3
|
+
<component
|
|
4
|
+
:key="slideComponentKey"
|
|
5
|
+
:is="slideComponent"
|
|
6
|
+
v-bind="slideComponentProps"
|
|
7
|
+
@advance-broadcast="advanceSlides"
|
|
8
|
+
@mark-announcement-as-viewed="markAnnouncementAsViewed"
|
|
9
|
+
></component>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
<script>
|
|
13
|
+
/* eslint-disable no-new */
|
|
14
|
+
import ConcreteAnnouncementFeatureSlide from '../Slide/FeatureSlide'
|
|
15
|
+
import ConcreteAnnouncementWelcomeSlide from '../Slide/WelcomeSlide'
|
|
16
|
+
import ConcreteAnnouncementCollectSiteInformationSlide from '../Slide/CollectSiteInformationSlide'
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
components: {
|
|
20
|
+
ConcreteAnnouncementFeatureSlide,
|
|
21
|
+
ConcreteAnnouncementWelcomeSlide,
|
|
22
|
+
ConcreteAnnouncementCollectSiteInformationSlide
|
|
23
|
+
},
|
|
24
|
+
props: {
|
|
25
|
+
handle: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: true
|
|
28
|
+
},
|
|
29
|
+
totalSlides: {
|
|
30
|
+
type: Number,
|
|
31
|
+
required: true,
|
|
32
|
+
default: 1
|
|
33
|
+
},
|
|
34
|
+
slides: {
|
|
35
|
+
type: Array,
|
|
36
|
+
required: true
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
data: () => ({
|
|
40
|
+
currentSlide: 0
|
|
41
|
+
}),
|
|
42
|
+
computed: {
|
|
43
|
+
slideComponentKey: function() {
|
|
44
|
+
return 'slide' + this.currentSlide
|
|
45
|
+
},
|
|
46
|
+
slideComponent: function() {
|
|
47
|
+
return this.slides[this.currentSlide].component
|
|
48
|
+
},
|
|
49
|
+
slideComponentProps: function() {
|
|
50
|
+
const props = this.slides[this.currentSlide].componentProps
|
|
51
|
+
props.currentSlideInGroup = this.currentSlide
|
|
52
|
+
props.totalSlidesInGroup = this.totalSlides
|
|
53
|
+
return props
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
methods: {
|
|
58
|
+
markAnnouncementAsViewed() {
|
|
59
|
+
var my = this
|
|
60
|
+
new ConcreteAjaxRequest({
|
|
61
|
+
url: CCM_DISPATCHER_FILENAME + '/ccm/system/announcement/mark_as_viewed/' + my.handle,
|
|
62
|
+
data: {
|
|
63
|
+
ccm_token: CCM_SECURITY_TOKEN
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
},
|
|
67
|
+
advanceSlides() {
|
|
68
|
+
if ((this.currentSlide + 1) < this.slides.length) {
|
|
69
|
+
this.currentSlide++
|
|
70
|
+
} else {
|
|
71
|
+
// emit it up to the grandparent "Broadcast" component
|
|
72
|
+
this.$emit('advance-broadcast')
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
</script>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="modal-content">
|
|
3
|
+
<form method="post" @submit="submitForm">
|
|
4
|
+
<announcement-header title="Tell us a little about your site"></announcement-header>
|
|
5
|
+
<div class="modal-body">
|
|
6
|
+
<div class="offset-lg-3 col-lg-9">
|
|
7
|
+
<span v-html="survey"></span>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="small">
|
|
10
|
+
<p>This information will be used to improve your experience. It will never be shared outside of the team building Concrete CMS.</p>
|
|
11
|
+
<div><a href="#" target="_blank">Privacy Policy</a></div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="modal-footer d-flex">
|
|
15
|
+
<button class="btn btn-secondary" type="button" @click="skip">Skip</button>
|
|
16
|
+
<button class="btn btn-primary ms-auto" type="submit">Send</button>
|
|
17
|
+
</div>
|
|
18
|
+
</form>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
/* eslint-disable no-new */
|
|
24
|
+
import AnnouncementHeader from '../Header/Header'
|
|
25
|
+
export default {
|
|
26
|
+
components: {
|
|
27
|
+
AnnouncementHeader
|
|
28
|
+
},
|
|
29
|
+
props: {
|
|
30
|
+
survey: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
data: () => ({
|
|
36
|
+
}),
|
|
37
|
+
methods: {
|
|
38
|
+
skip() {
|
|
39
|
+
this.$emit('mark-announcement-as-viewed')
|
|
40
|
+
this.$emit('advance-broadcast')
|
|
41
|
+
},
|
|
42
|
+
submitForm(e) {
|
|
43
|
+
var my = this
|
|
44
|
+
e.preventDefault()
|
|
45
|
+
var data = $(this.$el).find('form').serializeArray()
|
|
46
|
+
data.push({ name: 'ccm_token', value: CCM_SECURITY_TOKEN })
|
|
47
|
+
new ConcreteAjaxRequest({
|
|
48
|
+
url: CCM_DISPATCHER_FILENAME + '/ccm/system/announcement/site_information/submit/',
|
|
49
|
+
data: data,
|
|
50
|
+
success: function (r) {
|
|
51
|
+
// No need to emit the mark-announcement-as-viewed event because this is already handled
|
|
52
|
+
// by the backend submit method above.
|
|
53
|
+
my.$emit('advance-broadcast')
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
mounted() {
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="modal-content">
|
|
3
|
+
<announcement-header :title="title"></announcement-header>
|
|
4
|
+
<div class="modal-body">
|
|
5
|
+
<transition-group appear name="concrete-fade" mode="out-in">
|
|
6
|
+
<announcement-item
|
|
7
|
+
:key="'title' + i"
|
|
8
|
+
:class="{'mt-4': i > 0}"
|
|
9
|
+
v-for="(item, i) in items"
|
|
10
|
+
:item="item">
|
|
11
|
+
</announcement-item>
|
|
12
|
+
</transition-group>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="modal-footer d-flex">
|
|
15
|
+
<component v-if="button !== null" :key="button.component" :is="button.component"
|
|
16
|
+
v-bind="button.componentProps"
|
|
17
|
+
></component>
|
|
18
|
+
<button v-if="hasMoreSlides" class="btn btn-primary ms-auto" @click="next">Next</button>
|
|
19
|
+
<button v-else class="btn btn-primary ms-auto" @click="done">Done</button>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
/* eslint-disable no-new */
|
|
26
|
+
import AnnouncementHeader from '../Header/Header'
|
|
27
|
+
import AnnouncementItem from '../Item/Item'
|
|
28
|
+
import ConcreteAnnouncementExternalLinkButton from '../Button/ExternalLinkButton'
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
components: {
|
|
32
|
+
AnnouncementHeader,
|
|
33
|
+
AnnouncementItem,
|
|
34
|
+
ConcreteAnnouncementExternalLinkButton
|
|
35
|
+
},
|
|
36
|
+
props: {
|
|
37
|
+
title: {
|
|
38
|
+
type: String,
|
|
39
|
+
required: true
|
|
40
|
+
},
|
|
41
|
+
button: {
|
|
42
|
+
type: Object,
|
|
43
|
+
required: false
|
|
44
|
+
},
|
|
45
|
+
items: {
|
|
46
|
+
type: Array,
|
|
47
|
+
required: true
|
|
48
|
+
},
|
|
49
|
+
currentSlideInGroup: {
|
|
50
|
+
type: Number,
|
|
51
|
+
required: false,
|
|
52
|
+
default: 0
|
|
53
|
+
},
|
|
54
|
+
totalSlidesInGroup: {
|
|
55
|
+
type: Number,
|
|
56
|
+
required: false,
|
|
57
|
+
default: 1
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
data: () => ({
|
|
61
|
+
itemsToDisplay: null
|
|
62
|
+
}),
|
|
63
|
+
computed: {
|
|
64
|
+
hasMoreSlides() {
|
|
65
|
+
return (this.currentSlideInGroup + 1) < this.totalSlidesInGroup
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
methods: {
|
|
69
|
+
next() {
|
|
70
|
+
this.$emit('advance-broadcast')
|
|
71
|
+
},
|
|
72
|
+
done() {
|
|
73
|
+
this.$emit('mark-announcement-as-viewed')
|
|
74
|
+
this.$emit('advance-broadcast')
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
mounted() {
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
</script>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="modal-content">
|
|
3
|
+
<announcement-header title="Take a few minutes to learn the basics"></announcement-header>
|
|
4
|
+
<div class="modal-body">
|
|
5
|
+
<transition appear name="concrete-fade" mode="out-in">
|
|
6
|
+
<div key="loading" v-if="!Array.isArray(itemsToDisplay)">
|
|
7
|
+
<div class="placeholder-wave">
|
|
8
|
+
<section>
|
|
9
|
+
<span class="placeholder col-4 bg-black"></span>
|
|
10
|
+
<span class="placeholder col-10 bg-secondary"></span>
|
|
11
|
+
<span class="placeholder col-3 bg-primary"></span>
|
|
12
|
+
</section>
|
|
13
|
+
<section class="mt-4">
|
|
14
|
+
<span class="placeholder col-4 bg-black"></span>
|
|
15
|
+
<span class="placeholder col-10 bg-secondary"></span>
|
|
16
|
+
<span class="placeholder col-3 bg-primary"></span>
|
|
17
|
+
</section>
|
|
18
|
+
<section class="mt-4">
|
|
19
|
+
<span class="placeholder col-4 bg-black"></span>
|
|
20
|
+
<span class="placeholder col-10 bg-secondary"></span>
|
|
21
|
+
<span class="placeholder col-3 bg-primary"></span>
|
|
22
|
+
</section>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div v-else key="items">
|
|
26
|
+
<announcement-item
|
|
27
|
+
:key="i"
|
|
28
|
+
:class="{'mt-4': i > 0}"
|
|
29
|
+
v-for="(item, i) in itemsToDisplay"
|
|
30
|
+
:item="item">
|
|
31
|
+
</announcement-item>
|
|
32
|
+
</div>
|
|
33
|
+
</transition>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="modal-footer d-flex">
|
|
36
|
+
<button class="btn btn-primary ms-auto" @click="confirm">Got It!</button>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script>
|
|
42
|
+
/* eslint-disable no-new */
|
|
43
|
+
import AnnouncementHeader from '../Header/Header'
|
|
44
|
+
import AnnouncementItem from '../Item/Item'
|
|
45
|
+
|
|
46
|
+
export default {
|
|
47
|
+
components: {
|
|
48
|
+
AnnouncementHeader,
|
|
49
|
+
AnnouncementItem
|
|
50
|
+
},
|
|
51
|
+
props: {
|
|
52
|
+
items: {
|
|
53
|
+
type: Array,
|
|
54
|
+
required: false
|
|
55
|
+
},
|
|
56
|
+
itemAccessToken: {
|
|
57
|
+
type: String,
|
|
58
|
+
required: true
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
data: () => ({
|
|
62
|
+
itemsToDisplay: null
|
|
63
|
+
}),
|
|
64
|
+
methods: {
|
|
65
|
+
confirm() {
|
|
66
|
+
this.$emit('mark-announcement-as-viewed')
|
|
67
|
+
this.$emit('advance-broadcast')
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
mounted() {
|
|
71
|
+
var my = this
|
|
72
|
+
if (my.items) {
|
|
73
|
+
this.itemsToDisplay = my.items
|
|
74
|
+
} else {
|
|
75
|
+
new ConcreteAjaxRequest({
|
|
76
|
+
url: `${CCM_DISPATCHER_FILENAME}/ccm/system/dialogs/help/get_items`,
|
|
77
|
+
data: {
|
|
78
|
+
ccm_token: my.itemAccessToken
|
|
79
|
+
},
|
|
80
|
+
success: r => {
|
|
81
|
+
my.itemsToDisplay = r
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
</script>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="row gx-5 h-100">
|
|
3
|
+
<div :class="{'border-end': true, 'col-md-6': hasSidebarSlot, 'col-md-12': !hasSidebarSlot}">
|
|
4
|
+
<slot name="main">
|
|
5
|
+
<transition-group appear name="concrete-fade" mode="out-in">
|
|
6
|
+
<announcement-item
|
|
7
|
+
:key="'help' + i"
|
|
8
|
+
:class="{'mt-4': i > 0}"
|
|
9
|
+
v-for="(item, i) in items"
|
|
10
|
+
:indent-if-icon-empty="false"
|
|
11
|
+
:item="item">
|
|
12
|
+
</announcement-item>
|
|
13
|
+
</transition-group>
|
|
14
|
+
</slot>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="col-md-6" v-if="hasSidebarSlot">
|
|
17
|
+
<slot name="sidebar"></slot>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
<script>
|
|
22
|
+
import AnnouncementItem from '../Announcement/Item/Item'
|
|
23
|
+
import ConcreteAnnouncementExternalLinkButton from '../Announcement/Button/ExternalLinkButton'
|
|
24
|
+
export default {
|
|
25
|
+
components: {
|
|
26
|
+
AnnouncementItem,
|
|
27
|
+
ConcreteAnnouncementExternalLinkButton
|
|
28
|
+
},
|
|
29
|
+
props: {
|
|
30
|
+
items: {
|
|
31
|
+
type: Array,
|
|
32
|
+
required: false,
|
|
33
|
+
default: []
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
data: () => ({
|
|
37
|
+
}),
|
|
38
|
+
computed: {
|
|
39
|
+
hasSidebarSlot() {
|
|
40
|
+
return !!this.$slots.sidebar
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
},
|
|
45
|
+
mounted() {
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ccm-image-thumbnail-editor">
|
|
3
|
+
<cropper
|
|
4
|
+
ref="cropper"
|
|
5
|
+
class="ccm-image-thumbnail-editor-cropper"
|
|
6
|
+
:stencil-props="{
|
|
7
|
+
handlers: {},
|
|
8
|
+
movable: true,
|
|
9
|
+
resizable: false
|
|
10
|
+
}"
|
|
11
|
+
:stencil-size="stencilSize"
|
|
12
|
+
:canvas="canvas"
|
|
13
|
+
:resize-image="{
|
|
14
|
+
adjustStencil: false
|
|
15
|
+
}"
|
|
16
|
+
image-restriction="fit-area"
|
|
17
|
+
:src="src"
|
|
18
|
+
/>
|
|
19
|
+
<div class="ccm-image-thumbnail-editor-controls">
|
|
20
|
+
<a @click="zoomIn"><svg width="24px" height="24px" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="#ffffff"><path d="M8 11h3m3 0h-3m0 0V8m0 3v3M17 17l4 4M3 11a8 8 0 1016 0 8 8 0 00-16 0z" stroke="#ffffff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></a>
|
|
21
|
+
<a @click="zoomOut"><svg width="24px" height="24px" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="#ffffff"><path d="M17 17l4 4M3 11a8 8 0 1016 0 8 8 0 00-16 0zM8 11h6" stroke="#ffffff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></a>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="ccm-image-thumbnail-editor-save">
|
|
24
|
+
<button @click="save" class="btn btn-primary float-end">{{ lang.save }}</button>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
<script>
|
|
29
|
+
/* eslint-disable no-new */
|
|
30
|
+
import { Cropper } from 'vue-advanced-cropper'
|
|
31
|
+
import 'vue-advanced-cropper/dist/style.css'
|
|
32
|
+
export default {
|
|
33
|
+
components: {
|
|
34
|
+
Cropper
|
|
35
|
+
},
|
|
36
|
+
props: {
|
|
37
|
+
width: {
|
|
38
|
+
type: Number,
|
|
39
|
+
required: true
|
|
40
|
+
},
|
|
41
|
+
height: {
|
|
42
|
+
type: Number,
|
|
43
|
+
required: true
|
|
44
|
+
},
|
|
45
|
+
accessToken: {
|
|
46
|
+
type: String,
|
|
47
|
+
required: true
|
|
48
|
+
},
|
|
49
|
+
lang: {
|
|
50
|
+
type: Object,
|
|
51
|
+
required: true
|
|
52
|
+
},
|
|
53
|
+
src: {
|
|
54
|
+
type: String,
|
|
55
|
+
required: true
|
|
56
|
+
},
|
|
57
|
+
uploadUrl: {
|
|
58
|
+
type: String,
|
|
59
|
+
required: true
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
data: () => ({
|
|
63
|
+
image: null,
|
|
64
|
+
saveInProgress: false
|
|
65
|
+
}),
|
|
66
|
+
computed: {
|
|
67
|
+
stencilSize: function() {
|
|
68
|
+
const stencilSize = {}
|
|
69
|
+
stencilSize.width = this.width
|
|
70
|
+
stencilSize.height = this.height
|
|
71
|
+
return stencilSize
|
|
72
|
+
},
|
|
73
|
+
canvas: function() {
|
|
74
|
+
const canvas = {}
|
|
75
|
+
canvas.maxWidth = this.width
|
|
76
|
+
canvas.maxHeight = this.height
|
|
77
|
+
return canvas
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
methods: {
|
|
81
|
+
zoomIn() {
|
|
82
|
+
this.$refs.cropper.zoom(1.2)
|
|
83
|
+
},
|
|
84
|
+
zoomOut() {
|
|
85
|
+
this.$refs.cropper.zoom(0.8)
|
|
86
|
+
},
|
|
87
|
+
save() {
|
|
88
|
+
var my = this
|
|
89
|
+
this.saveInProgress = true
|
|
90
|
+
const { canvas } = this.$refs.cropper.getResult()
|
|
91
|
+
if (canvas) {
|
|
92
|
+
const form = new FormData()
|
|
93
|
+
form.append('ccm_token', this.accessToken)
|
|
94
|
+
canvas.toBlob(blob => {
|
|
95
|
+
form.append('file', blob)
|
|
96
|
+
new ConcreteAjaxRequest({
|
|
97
|
+
url: my.uploadUrl,
|
|
98
|
+
processData: false,
|
|
99
|
+
contentType: false,
|
|
100
|
+
dataType: 'json',
|
|
101
|
+
data: form,
|
|
102
|
+
success: function(r) {
|
|
103
|
+
jQuery.fn.dialog.closeTop()
|
|
104
|
+
ConcreteAlert.notify({
|
|
105
|
+
message: ccmi18n_filemanager.thumbnailImageSaved,
|
|
106
|
+
title: ccmi18n_filemanager.thumbnailImages
|
|
107
|
+
})
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
mounted() {
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div :class="{'card':
|
|
3
|
+
<div :class="{'card': format === 'card', 'card-body': format === 'card', 'process-card': format === 'card'}"
|
|
4
4
|
v-for="process in processes" :key="process.id">
|
|
5
5
|
<div class="row">
|
|
6
6
|
<div class="col-md-9 running-process-name">
|
|
@@ -43,6 +43,11 @@ export default {
|
|
|
43
43
|
processes: {
|
|
44
44
|
type: Array,
|
|
45
45
|
required: true
|
|
46
|
+
},
|
|
47
|
+
format: {
|
|
48
|
+
type: String,
|
|
49
|
+
required: false,
|
|
50
|
+
default: 'card' /* card or empty */
|
|
46
51
|
}
|
|
47
52
|
},
|
|
48
53
|
data: () => ({
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<select @change="componentUpdated"
|
|
3
|
-
<option value=""
|
|
4
|
-
<
|
|
5
|
-
|
|
2
|
+
<select @change="componentUpdated" v-model="selectedFont">
|
|
3
|
+
<option value="__default__" data-font="">Default</option>
|
|
4
|
+
<optgroup label="Theme Fonts">
|
|
5
|
+
<option v-for="font in customFonts" :data-font="font" :value="font">{{ font }}</option>
|
|
6
|
+
</optgroup>
|
|
7
|
+
<optgroup label="Standard Fonts">
|
|
8
|
+
<option v-for="font in standardFonts" :data-font="font" :value="font">{{ font }}</option>
|
|
9
|
+
</optgroup>
|
|
6
10
|
</select>
|
|
7
11
|
</template>
|
|
8
12
|
|
|
9
13
|
<script>
|
|
10
|
-
/*
|
|
14
|
+
/* eslint-disable no-new, no-unused-vars, camelcase, eqeqeq */
|
|
15
|
+
/* globals TomSelect, WebFont */
|
|
11
16
|
export default {
|
|
12
17
|
components: {},
|
|
13
18
|
data() {
|
|
@@ -16,7 +21,16 @@ export default {
|
|
|
16
21
|
}
|
|
17
22
|
},
|
|
18
23
|
mounted() {
|
|
19
|
-
|
|
24
|
+
new TomSelect(this.$el, {
|
|
25
|
+
render: {
|
|
26
|
+
option: function (data, escape) {
|
|
27
|
+
return `<div style="font-family: ${data.font}">${data.text}</div>`
|
|
28
|
+
},
|
|
29
|
+
item: function (item, escape) {
|
|
30
|
+
return `<div style="font-family: ${item.font}">${item.text}</div>`
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
})
|
|
20
34
|
var googleFontFamilies = []
|
|
21
35
|
this.styleValue.style.fonts.forEach(function(font) {
|
|
22
36
|
if (font.type === 'google') {
|
|
@@ -33,10 +47,16 @@ export default {
|
|
|
33
47
|
},
|
|
34
48
|
methods: {
|
|
35
49
|
componentUpdated: function () {
|
|
50
|
+
var componentUpdatedFontFamily = this.selectedFont
|
|
51
|
+
if (this.selectedFont == '__default__') {
|
|
52
|
+
// This is a TomSelect limitation. we want to send an empty string but when
|
|
53
|
+
// I put an empty string in my value the option doesn't get added to the list.
|
|
54
|
+
componentUpdatedFontFamily = ''
|
|
55
|
+
}
|
|
36
56
|
this.$emit('update', {
|
|
37
57
|
variable: this.styleValue.style.variable,
|
|
38
58
|
value: {
|
|
39
|
-
fontFamily:
|
|
59
|
+
fontFamily: componentUpdatedFontFamily
|
|
40
60
|
}
|
|
41
61
|
})
|
|
42
62
|
}
|