@concretecms/bedrock 1.0.0 → 1.1.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.
Files changed (48) hide show
  1. package/assets/account/js/frontend/components/Avatar/Cropper.js +12 -4
  2. package/assets/calendar/js/backend/duration.js +1 -1
  3. package/assets/ckeditor/js/concrete/link.js +5 -4
  4. package/assets/ckeditor/js/concrete/styles.js +2 -2
  5. package/assets/cms/components/BoardInstanceRule.vue +16 -3
  6. package/assets/cms/components/BoardInstanceRuleList.vue +24 -7
  7. package/assets/cms/components/CompletedProcessList.vue +28 -9
  8. package/assets/cms/components/Icon.vue +16 -1
  9. package/assets/cms/components/Pagination.vue +45 -8
  10. package/assets/cms/components/customizer/ColorPageCustomizerWidget.vue +7 -0
  11. package/assets/cms/components/customizer/FontWeightPageCustomizerWidget.vue +7 -1
  12. package/assets/cms/components/customizer/ImagePageCustomizerWidget.vue +13 -3
  13. package/assets/cms/components/customizer/TextTransformPageCustomizerWidget.vue +7 -1
  14. package/assets/cms/components/customizer/ThemeCustomizer.vue +36 -15
  15. package/assets/cms/components/customizer/ThemeCustomizerPreview.vue +11 -1
  16. package/assets/cms/components/customizer/TypePageCustomizerWidget.vue +21 -6
  17. package/assets/cms/components/express/Selector.vue +21 -6
  18. package/assets/cms/components/file-manager/Chooser/ExternalFileProvider.vue +13 -2
  19. package/assets/cms/components/file-manager/Chooser/FileSets.vue +13 -2
  20. package/assets/cms/components/file-manager/Chooser/Files.vue +19 -5
  21. package/assets/cms/components/file-manager/Chooser/SavedSearch.vue +13 -2
  22. package/assets/cms/components/file-manager/Chooser/Search.vue +13 -2
  23. package/assets/cms/components/file-manager/Chooser.vue +64 -8
  24. package/assets/cms/components/form/ConcreteFileDirectoryInput.vue +17 -4
  25. package/assets/cms/components/gallery/GalleryEdit.vue +20 -5
  26. package/assets/cms/components/gallery/ImageDetail.vue +22 -5
  27. package/assets/cms/components/groups/Chooser.vue +17 -4
  28. package/assets/cms/components/page/Chooser/ChooserSearch.vue +15 -2
  29. package/assets/cms/components/page/PageList.vue +15 -3
  30. package/assets/cms/components/user/Chooser/Search.vue +15 -2
  31. package/assets/cms/components/user/Chooser/Users.vue +19 -5
  32. package/assets/cms/components/user/Chooser.vue +15 -2
  33. package/assets/cms/js/edit-mode/style-customizer/color.js +10 -3
  34. package/assets/cms/js/edit-mode/style-customizer/custom.js +1 -1
  35. package/assets/cms/js/edit-mode/style-customizer/inline-toolbar.js +27 -27
  36. package/assets/cms/js/edit-mode/style-customizer/typography.js +8 -1
  37. package/assets/cms/scss/_inline-toolbar.scss +9 -180
  38. package/assets/cms/scss/panels/_shared.scss +1 -1
  39. package/assets/desktop/js/frontend/draft-list.js +0 -17
  40. package/package.json +2 -2
  41. package/.idea/bedrock.iml +0 -8
  42. package/.idea/codeStyles/Project.xml +0 -15
  43. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  44. package/.idea/dataSources.local.xml +0 -4
  45. package/.idea/misc.xml +0 -6
  46. package/.idea/modules.xml +0 -8
  47. package/.idea/vcs.xml +0 -6
  48. package/.idea/workspace.xml +0 -313
@@ -21,16 +21,16 @@
21
21
  </div>
22
22
 
23
23
  <div>
24
- <h5>Custom CSS</h5>
24
+ <h5>{{ i18n.customCSS }}</h5>
25
25
  <div class="card mb-4">
26
26
  <div class="list-group list-group-flush">
27
27
  <div class="list-group-item">
28
28
  <div class="form-check form-switch">
29
29
  <input class="form-check-input" type="checkbox" id="addCustomCSS" v-model="addCustomCss">
30
- <label class="form-check-label" for="addCustomCSS">Add Custom CSS</label>
30
+ <label class="form-check-label" for="addCustomCSS">{{ i18n.addCustomCSS }}</label>
31
31
  </div>
32
32
  <div v-if="addCustomCss" class="d-grid mt-2">
33
- <button class="btn btn-secondary btn-sm" @click="showCustomCssDialog">Edit CSS</button>
33
+ <button class="btn btn-secondary btn-sm" @click="showCustomCssDialog">{{ i18n.editCSS }}</button>
34
34
  </div>
35
35
  </div>
36
36
  </div>
@@ -41,13 +41,13 @@
41
41
  <div data-dialog="save-theme-customizer-changes">
42
42
 
43
43
  <div class="form-group">
44
- <label class="form-label" for="newSkinName">Skin Name</label>
44
+ <label class="form-label" for="newSkinName">{{ i18n.skinName }}</label>
45
45
  <input type="text" :class='{"form-control": true, "is-invalid": invalidSkinName}' name="newSkinName"
46
46
  id="newSkinName" v-model="newSkinName">
47
47
  </div>
48
48
 
49
49
  <div class="dialog-buttons">
50
- <button class="btn btn-primary float-end" @click="createNewSkin" type="button">Create</button>
50
+ <button class="btn btn-primary float-end" @click="createNewSkin" type="button">{{ i18n.create }}</button>
51
51
  </div>
52
52
 
53
53
  </div>
@@ -57,21 +57,21 @@
57
57
  <div data-dialog="save-theme-customizer-styles">
58
58
 
59
59
  <div class="form-group">
60
- <p>Apply customizations to:</p>
60
+ <p>{{ i18n.applyCustomizations }}</p>
61
61
 
62
62
  <div class="form-check">
63
63
  <input class="form-check-input" type="radio" id="applyToThisPage" v-model="applyTo" value="page">
64
- <label class="form-check-label" for="applyToThisPage">This Page</label>
64
+ <label class="form-check-label" for="applyToThisPage">{{ i18n.thisPage }}</label>
65
65
  </div>
66
66
  <div class="form-check">
67
67
  <input class="form-check-input" type="radio" id="applyToEntireSite" v-model="applyTo" value="site">
68
- <label class="form-check-label" for="applyToEntireSite">Entire Site</label>
68
+ <label class="form-check-label" for="applyToEntireSite">{{ i18n.entireSite }}</label>
69
69
  </div>
70
70
 
71
71
  </div>
72
72
 
73
73
  <div class="dialog-buttons">
74
- <button class="btn btn-primary float-end" @click="saveStyles" type="button">Confirm</button>
74
+ <button class="btn btn-primary float-end" @click="saveStyles" type="button">{{ i18n.confirm }}</button>
75
75
  </div>
76
76
 
77
77
  </div>
@@ -80,10 +80,10 @@
80
80
  <div class="d-none">
81
81
  <div data-dialog="delete-theme-customizer-skin">
82
82
 
83
- <p>Are you sure you want to delete this custom skin? This cannot be undone.</p>
83
+ <p>{{ i18n.confirmSkinDeletion }}</p>
84
84
 
85
85
  <div class="dialog-buttons">
86
- <button class="btn btn-primary float-end" @click="deleteSkin" type="button">Delete</button>
86
+ <button class="btn btn-primary float-end" @click="deleteSkin" type="button">{{ i18n.delete }}</button>
87
87
  </div>
88
88
 
89
89
  </div>
@@ -195,7 +195,7 @@ export default {
195
195
  modal: true,
196
196
  width: '800px',
197
197
  height: '70%',
198
- title: 'Custom CSS',
198
+ title: my.i18n.customCSS,
199
199
  onOpen: function() {
200
200
  var editor = ace.edit('theme-customizer-custom-css-editor')
201
201
  editor.setTheme('ace/theme/eclipse')
@@ -254,6 +254,20 @@ export default {
254
254
  },
255
255
  data: function () {
256
256
  return {
257
+ i18n: {
258
+ addCustomCSS: 'Add Custom CSS',
259
+ editCSS: 'Edit CSS',
260
+ skinName: 'Skin Name',
261
+ create: 'Create',
262
+ applyCustomizations: 'Apply customizations to:',
263
+ thisPage: 'This Page',
264
+ entireSite: 'Entire Site',
265
+ confirm: 'Confirm',
266
+ confirmSkinDeletion: 'Are you sure you want to delete this custom skin? This cannot be undone.',
267
+ delete: 'Delete',
268
+ customCSS: 'Custom CSS',
269
+ save: 'Save'
270
+ },
257
271
  invalidSkinName: false,
258
272
  newSkinName: '',
259
273
  addCustomCss: false,
@@ -263,6 +277,13 @@ export default {
263
277
  }
264
278
  },
265
279
  mounted() {
280
+ if (window.ccmi18n_styleCustomizer) {
281
+ for (const key in this.i18n) {
282
+ if (window.ccmi18n_styleCustomizer[key]) {
283
+ this.i18n[key] = window.ccmi18n_styleCustomizer[key]
284
+ }
285
+ }
286
+ }
266
287
  if (this.customCss) {
267
288
  this.addCustomCss = true
268
289
  this.customizerCustomCss = this.customCss
@@ -295,7 +316,7 @@ export default {
295
316
  element: 'div[data-dialog=delete-theme-customizer-skin]',
296
317
  modal: true,
297
318
  width: '400',
298
- title: 'Save',
319
+ title: my.i18n.save,
299
320
  height: 'auto'
300
321
  })
301
322
  })
@@ -305,7 +326,7 @@ export default {
305
326
  element: 'div[data-dialog=save-theme-customizer-changes]',
306
327
  modal: true,
307
328
  width: '400',
308
- title: 'Save',
329
+ title: my.i18n.save,
309
330
  height: 'auto'
310
331
  })
311
332
  })
@@ -315,7 +336,7 @@ export default {
315
336
  element: 'div[data-dialog=save-theme-customizer-styles]',
316
337
  modal: true,
317
338
  width: '400',
318
- title: 'Save',
339
+ title: my.i18n.save,
319
340
  height: 'auto'
320
341
  })
321
342
  })
@@ -7,7 +7,7 @@
7
7
  <div v-if="loadingPreview">
8
8
  <div class="text-center mt-5 display-4 text-secondary">
9
9
  <i class="fa fa-cog fa-spin"></i>
10
- Loading...
10
+ {{ i18n.loading }}
11
11
  </div>
12
12
  </div>
13
13
  </div>
@@ -22,11 +22,21 @@ export default {
22
22
  },
23
23
  data: function () {
24
24
  return {
25
+ i18n: {
26
+ loading: 'Loading...'
27
+ },
25
28
  loadingPreview: true
26
29
  }
27
30
  },
28
31
  mounted() {
29
32
  var my = this
33
+ if (window.ccmi18n_styleCustomizer) {
34
+ for (const key in my.i18n) {
35
+ if (window.ccmi18n_styleCustomizer[key]) {
36
+ my.i18n[key] = window.ccmi18n_styleCustomizer[key]
37
+ }
38
+ }
39
+ }
30
40
  $('iframe[name=ccm-theme-preview-frame]').on('load', function() {
31
41
  my.loadingPreview = false
32
42
  })
@@ -5,7 +5,7 @@
5
5
  </template>
6
6
  <template v-slot:content>
7
7
  <div class="mb-2">
8
- <label class="form-label">Font Family</label>
8
+ <label class="form-label">{{ i18n.fontFamily }}</label>
9
9
  <div class="d-flex">
10
10
  <font-family-page-customizer-widget @update="componentUpdated" v-if="fontFamilySubTypeValue" :style-value="fontFamilySubTypeValue"></font-family-page-customizer-widget>
11
11
  <div class="ms-1 d-flex align-items-center" v-if="colorSubTypeValue">
@@ -14,23 +14,23 @@
14
14
  </div>
15
15
  </div>
16
16
  <div class="mb-2" v-if="fontSizeSubTypeValue">
17
- <label class="form-label">Size</label>
17
+ <label class="form-label">{{ i18n.fontSize }}</label>
18
18
  <size-page-customizer-widget @update="componentUpdated" :style-value="fontSizeSubTypeValue"></size-page-customizer-widget>
19
19
  </div>
20
20
  <div class="mb-2" v-if="fontWeightSubTypeValue">
21
- <label class="form-label">Font Weight</label>
21
+ <label class="form-label">{{ i18n.fontWeight }}</label>
22
22
  <font-weight-page-customizer-widget @update="componentUpdated" :style-value="fontWeightSubTypeValue"></font-weight-page-customizer-widget>
23
23
  </div>
24
24
  <div class="mb-2" v-if="fontStyleSubTypeValue">
25
- <label class="form-label">Font Style</label>
25
+ <label class="form-label">{{ i18n.fontStyle }}</label>
26
26
  <font-style-page-customizer-widget @update="componentUpdated" :style-value="fontStyleSubTypeValue"></font-style-page-customizer-widget>
27
27
  </div>
28
28
  <div class="mb-2" v-if="textDecorationSubTypeValue">
29
- <label class="form-label">Text Decoration</label>
29
+ <label class="form-label">{{ i18n.textDecoration }}</label>
30
30
  <text-decoration-page-customizer-widget @update="componentUpdated" :style-value="textDecorationSubTypeValue"></text-decoration-page-customizer-widget>
31
31
  </div>
32
32
  <div class="mb-2" v-if="textTransformSubTypeValue">
33
- <label class="form-label">Text Transform</label>
33
+ <label class="form-label">{{ i18n.textTransform }}</label>
34
34
  <text-transform-page-customizer-widget @update="componentUpdated" :style-value="textTransformSubTypeValue"></text-transform-page-customizer-widget>
35
35
  </div>
36
36
  </template>
@@ -60,6 +60,14 @@ export default {
60
60
  },
61
61
  data() {
62
62
  return {
63
+ i18n: {
64
+ fontFamily: 'Font Family',
65
+ fontSize: 'Size',
66
+ fontWeight: 'Font Weight',
67
+ fontStyle: 'Font Style',
68
+ textDecoration: 'Text Decoration',
69
+ textTransform: 'Text Transform'
70
+ },
63
71
  fontFamilySubTypeValue: null,
64
72
  colorSubTypeValue: null,
65
73
  fontSizeSubTypeValue: null,
@@ -76,6 +84,13 @@ export default {
76
84
  },
77
85
  mounted() {
78
86
  var my = this
87
+ if (window.ccmi18n_styleCustomizer) {
88
+ for (const key in my.i18n) {
89
+ if (window.ccmi18n_styleCustomizer[key]) {
90
+ my.i18n[key] = window.ccmi18n_styleCustomizer[key]
91
+ }
92
+ }
93
+ }
79
94
  this.styleValue.value.values.forEach(function(styleValue) {
80
95
  if (styleValue.style.type === 'color') {
81
96
  my.colorSubTypeValue = styleValue
@@ -5,7 +5,7 @@
5
5
  <form @submit.prevent="getExpressEntries">
6
6
  <div class="ccm-header-search-form-input input-group">
7
7
  <!--suppress HtmlFormInputWithoutLabel -->
8
- <input type="text" class="form-control border-end-0" placeholder="Search" autocomplete="false"
8
+ <input type="text" class="form-control border-end-0" :placeholder="i18n.search" autocomplete="false"
9
9
  v-model="keywords">
10
10
 
11
11
  <button type="submit" class="input-group-icon">
@@ -30,16 +30,16 @@
30
30
  <th></th>
31
31
  <th :class="getSortColumnClassName('e.exEntryDateCreated')">
32
32
  <a href="#" @click.prevent="sortBy('exEntryDateCreated')">
33
- Date Added
33
+ {{ i18n.dateAdded }}
34
34
  </a>
35
35
  </th>
36
36
  <th :class="getSortColumnClassName('e.exEntryDateModified')">
37
37
  <a href="#" @click.prevent="sortBy('e.exEntryDateModified')">
38
- Date Modified
38
+ {{ i18n.dateModified }}
39
39
  </a>
40
40
  </th>
41
41
  <th>
42
- <span>Name</span>
42
+ <span>{{ i18n.name }}</span>
43
43
  </th>
44
44
  </tr>
45
45
  </thead>
@@ -67,11 +67,11 @@
67
67
 
68
68
  <div class="dialog-buttons">
69
69
  <button class="btn btn-secondary" data-dialog-action="cancel">
70
- Cancel
70
+ {{ i18n.cancel }}
71
71
  </button>
72
72
 
73
73
  <button type="button" @click="selectEntry" :disabled="selectedEntry === null" class="btn btn-primary">
74
- Select
74
+ {{ i18n.select }}
75
75
  </button>
76
76
  </div>
77
77
  </div>
@@ -95,6 +95,14 @@ export default {
95
95
  }
96
96
  },
97
97
  data: () => ({
98
+ i18n: {
99
+ search: 'Search',
100
+ dateAdded: 'Date Added',
101
+ dateModified: 'Date Modified',
102
+ name: 'Name',
103
+ cancel: 'Cancel',
104
+ select: 'Select'
105
+ },
98
106
  keywords: '',
99
107
  selectedEntry: null,
100
108
  currentPage: 1,
@@ -210,6 +218,13 @@ export default {
210
218
  }
211
219
  },
212
220
  mounted() {
221
+ if (window.ccmi18n_express) {
222
+ for (const key in this.i18n) {
223
+ if (window.ccmi18n_express[key]) {
224
+ this.i18n[key] = window.ccmi18n_express[key]
225
+ }
226
+ }
227
+ }
213
228
  this.getExpressEntries()
214
229
  }
215
230
  }
@@ -12,7 +12,7 @@
12
12
  </option>
13
13
  </select>
14
14
 
15
- <input type="text" class="form-control border-end-0" placeholder="Search" autocomplete="false"
15
+ <input type="text" class="form-control border-end-0" :placeholder="i18n.search" autocomplete="false"
16
16
  v-model="searchText">
17
17
  <button type="submit" class="input-group-icon">
18
18
  <svg width="16" height="16">
@@ -27,7 +27,7 @@
27
27
  <span class="search-icon my-4">
28
28
  <Icon icon="search" type="fas" color="#f4f4f4"/>
29
29
  </span>
30
- <p><b>Let's get some info on what you're looking for.</b></p>
30
+ <p><b>{{ i18n.initialExternalFileProviderChooserTip }}</b></p>
31
31
  </div>
32
32
  <div>
33
33
  <files v-if="keywords"
@@ -66,6 +66,10 @@ export default {
66
66
  ConcreteFileDirectoryInput
67
67
  },
68
68
  data: () => ({
69
+ i18n: {
70
+ search: 'Search',
71
+ initialExternalFileProviderChooserTip: "Let's get some info on what you're looking for."
72
+ },
69
73
  uploadDirectoryId: 0,
70
74
  fileTypes: [],
71
75
  searchText: '',
@@ -121,6 +125,13 @@ export default {
121
125
  }
122
126
  },
123
127
  mounted() {
128
+ if (window.ccmi18n_filemanager) {
129
+ for (const key in this.i18n) {
130
+ if (window.ccmi18n_filemanager[key]) {
131
+ this.i18n[key] = window.ccmi18n_filemanager[key]
132
+ }
133
+ }
134
+ }
124
135
  this.formFactor = this.resultsFormFactor
125
136
  this.getFileTypes()
126
137
  this.$refs.folderSelector.selectedDirectoryID = this.extraData.uploadDirectoryId
@@ -4,11 +4,11 @@
4
4
 
5
5
  <div class="form-group row row-cols-auto g-0 align-items-center justify-content-end">
6
6
  <div class="col-auto">
7
- <label for="fileSetSelector" class="me-2">File Set</label>
7
+ <label for="fileSetSelector" class="me-2">{{ i18n.fileSet }}</label>
8
8
  </div>
9
9
  <div class="col-auto">
10
10
  <select id="fileSetSelector" class="form-select file-set-menu" v-model="activeSet">
11
- <option value="" selected>Select a Set</option>
11
+ <option value="" selected>{{ i18n.selectFileSet }}</option>
12
12
  <option v-for="set in sets" :key="set.id" :value="set.id">
13
13
  {{set.name}}
14
14
  </option>
@@ -45,6 +45,10 @@ export default {
45
45
  Files
46
46
  },
47
47
  data: () => ({
48
+ i18n: {
49
+ fileSet: 'File Set',
50
+ selectFileSet: 'Select a Set'
51
+ },
48
52
  sets: [],
49
53
  activeSet: '',
50
54
  selectedFiles: [],
@@ -86,6 +90,13 @@ export default {
86
90
  }
87
91
  },
88
92
  mounted() {
93
+ if (window.ccmi18n_filemanager) {
94
+ for (const key in this.i18n) {
95
+ if (window.ccmi18n_filemanager[key]) {
96
+ this.i18n[key] = window.ccmi18n_filemanager[key]
97
+ }
98
+ }
99
+ }
89
100
  this.formFactor = this.resultsFormFactor
90
101
 
91
102
  this.getSets()
@@ -24,14 +24,14 @@
24
24
  <tr>
25
25
  <th></th>
26
26
  <th></th>
27
- <th>ID</th>
27
+ <th>{{ i18n.id }}</th>
28
28
  <th :class="getSortColumnClassName('fv.fvTitle')">
29
- <a v-if="enableSort" href="#" @click.prevent="sortBy('fv.fvTitle')">Name</a>
30
- <span v-else>Name</span>
29
+ <a v-if="enableSort" href="#" @click.prevent="sortBy('fv.fvTitle')">{{ i18n.name }}</a>
30
+ <span v-else>{{ i18n.name }}</span>
31
31
  </th>
32
32
  <th :class="getSortColumnClassName(dateSortColumn)">
33
- <a v-if="enableSort" href="#" @click.prevent="sortBy(dateSortColumn)">Uploaded</a>
34
- <span v-else>Uploaded</span>
33
+ <a v-if="enableSort" href="#" @click.prevent="sortBy(dateSortColumn)">{{ i18n.uploaded }}</a>
34
+ <span v-else>{{ i18n.uploaded }}</span>
35
35
  </th>
36
36
  </tr>
37
37
  </thead>
@@ -80,6 +80,11 @@ export default {
80
80
  Pagination
81
81
  },
82
82
  data: () => ({
83
+ i18n: {
84
+ id: 'ID',
85
+ name: 'Name',
86
+ uploaded: 'Uploaded'
87
+ },
83
88
  currentPage: 1,
84
89
  rows: false,
85
90
  fileList: [],
@@ -235,6 +240,15 @@ export default {
235
240
  }
236
241
  }
237
242
  },
243
+ mounted: function() {
244
+ if (window.ccmi18n_filemanager) {
245
+ for (const key in this.i18n) {
246
+ if (window.ccmi18n_filemanager[key]) {
247
+ this.i18n[key] = window.ccmi18n_filemanager[key]
248
+ }
249
+ }
250
+ }
251
+ },
238
252
  watch: {
239
253
  selectedFiles(value) {
240
254
  this.$emit('update:selectedFiles', Array.isArray(value) ? value : [value])
@@ -7,11 +7,11 @@
7
7
 
8
8
  <div class="form-group row row-cols-auto g-0 align-items-center justify-content-end">
9
9
  <div class="col-auto">
10
- <label for="searchPresets" class="me-2">Search Presets</label>
10
+ <label for="searchPresets" class="me-2">{{ i18n.searchPresets }}</label>
11
11
  </div>
12
12
  <div class="col-auto">
13
13
  <select id="searchPresets" class="form-select search-presets-menu" v-model="activeSearchPreset">
14
- <option value="" selected>Select a Preset</option>
14
+ <option value="" selected>{{ i18n.selectPreset }}</option>
15
15
  <option v-for="searchPreset in searchPresets" :key="searchPreset.id" :value="searchPreset.id">
16
16
  {{searchPreset.presetName}}
17
17
  </option>
@@ -48,6 +48,10 @@ export default {
48
48
  Files
49
49
  },
50
50
  data: () => ({
51
+ i18n: {
52
+ searchPresets: 'Search Presets',
53
+ selectPreset: 'Select a Preset'
54
+ },
51
55
  activeFolder: '',
52
56
  searchPresets: [],
53
57
  activeSearchPreset: '',
@@ -91,6 +95,13 @@ export default {
91
95
  }
92
96
  },
93
97
  mounted() {
98
+ if (window.ccmi18n_filemanager) {
99
+ for (const key in this.i18n) {
100
+ if (window.ccmi18n_filemanager[key]) {
101
+ this.i18n[key] = window.ccmi18n_filemanager[key]
102
+ }
103
+ }
104
+ }
94
105
  this.formFactor = this.resultsFormFactor
95
106
 
96
107
  this.fetchSearchPresets()
@@ -6,7 +6,7 @@
6
6
  <div class="col-md-4 ms-auto">
7
7
  <form @submit.prevent="search">
8
8
  <div class="ccm-header-search-form-input input-group">
9
- <input type="text" class="form-control border-end-0" placeholder="Search" autocomplete="false" v-model="searchText">
9
+ <input type="text" class="form-control border-end-0" :placeholder="i18n.search" autocomplete="false" v-model="searchText">
10
10
  <button type="submit" class="input-group-icon">
11
11
  <svg width="16" height="16">
12
12
  <use xlink:href="#icon-search"/>
@@ -20,7 +20,7 @@
20
20
  <span class="search-icon my-4">
21
21
  <Icon icon="search" type="fas" color="#f4f4f4"/>
22
22
  </span>
23
- <p><b>Let's get some info on what you're looking for.</b></p>
23
+ <p><b>{{ i18n.initialSearchChooserTip }}</b></p>
24
24
  </div>
25
25
  <div>
26
26
  <files v-if="keywords"
@@ -47,6 +47,10 @@ export default {
47
47
  Files
48
48
  },
49
49
  data: () => ({
50
+ i18n: {
51
+ search: 'Search',
52
+ initialSearchChooserTip: "Let's get some info on what you're looking for."
53
+ },
50
54
  searchText: '',
51
55
  keywords: '',
52
56
  selectedFiles: [],
@@ -83,6 +87,13 @@ export default {
83
87
  }
84
88
  },
85
89
  mounted() {
90
+ if (window.ccmi18n_filemanager) {
91
+ for (const key in this.i18n) {
92
+ if (window.ccmi18n_filemanager[key]) {
93
+ this.i18n[key] = window.ccmi18n_filemanager[key]
94
+ }
95
+ }
96
+ }
86
97
  this.formFactor = this.resultsFormFactor
87
98
  }
88
99
  }
@@ -41,11 +41,11 @@
41
41
  </div>
42
42
  </div>
43
43
  <div class="dialog-buttons">
44
- <button class="btn btn-secondary" data-dialog-action="cancel">Cancel</button>
44
+ <button class="btn btn-secondary" data-dialog-action="cancel">{{ i18n.cancel }}</button>
45
45
 
46
- <button type="button" v-show="isImportExternalFilesMode()" @click="importExternalFiles" :disabled="selectedFiles.length === 0" class="btn btn-primary">Import</button>
47
- <button type="button" v-show="isChooseFilesMode()" @click="chooseFiles" :disabled="selectedFiles.length === 0" class="btn btn-primary">Choose</button>
48
- <button type="button" v-show="isAddNewFilesMode()" @click="uploadFiles" :disabled="uploadReady === false" class="btn btn-primary">Upload</button>
46
+ <button type="button" v-show="isImportExternalFilesMode()" @click="importExternalFiles" :disabled="selectedFiles.length === 0" class="btn btn-primary">{{ i18n.import }}</button>
47
+ <button type="button" v-show="isChooseFilesMode()" @click="chooseFiles" :disabled="selectedFiles.length === 0" class="btn btn-primary">{{ i18n.choose }}</button>
48
+ <button type="button" v-show="isAddNewFilesMode()" @click="uploadFiles" :disabled="uploadReady === false" class="btn btn-primary">{{ i18n.upload }}</button>
49
49
  </div>
50
50
  </div>
51
51
  </template>
@@ -74,6 +74,16 @@ export default {
74
74
  },
75
75
  data() {
76
76
  return {
77
+ i18n: {
78
+ cancel: 'Cancel',
79
+ import: 'Import',
80
+ choose: 'Choose',
81
+ upload: 'Upload',
82
+ recentlyUploaded: 'Recently Uploaded',
83
+ fileManager: 'File Manager',
84
+ search: 'Search',
85
+ uploadFiles: 'Upload Files'
86
+ },
77
87
  filesReadyToUpload: 0,
78
88
  activeNavItem: null,
79
89
  resultsFormFactor: 'grid',
@@ -91,15 +101,15 @@ export default {
91
101
  default: [
92
102
  {
93
103
  key: 'recent-uploads',
94
- title: 'Recently Uploaded'
104
+ title: null // use the detault one if null
95
105
  },
96
106
  {
97
107
  key: 'file-manager',
98
- title: 'File Manager'
108
+ title: null // use the detault one if null
99
109
  },
100
110
  {
101
111
  key: 'search',
102
- title: 'Search'
112
+ title: null // use the detault one if null
103
113
  }
104
114
  ]
105
115
  },
@@ -108,7 +118,7 @@ export default {
108
118
  default: [
109
119
  {
110
120
  key: 'file-upload',
111
- title: 'Upload Files'
121
+ title: null // use the detault one if null
112
122
  }
113
123
  ]
114
124
  },
@@ -122,11 +132,57 @@ export default {
122
132
  },
123
133
  mounted() {
124
134
  var my = this
135
+ if (window.ccmi18n_filemanager) {
136
+ for (const key in my.i18n) {
137
+ if (window.ccmi18n_filemanager[key]) {
138
+ my.i18n[key] = window.ccmi18n_filemanager[key]
139
+ }
140
+ }
141
+ }
142
+ this.applyLocalization()
125
143
  ConcreteEvent.subscribe('FileUploaderFilesReadyToUpload', function(e, filesReadyToUpload) {
126
144
  my.filesReadyToUpload = filesReadyToUpload
127
145
  })
128
146
  },
147
+ watch: {
148
+ choosers() {
149
+ this.applyLocalization()
150
+ },
151
+ uploaders() {
152
+ this.applyLocalization()
153
+ }
154
+ },
129
155
  methods: {
156
+ applyLocalization() {
157
+ if (this.choosers) {
158
+ for (const chooser of this.choosers) {
159
+ if (typeof chooser.title !== 'string') {
160
+ switch (chooser.key) {
161
+ case 'recent-uploads':
162
+ chooser.title = this.i18n.recentlyUploaded
163
+ break
164
+ case 'file-manager':
165
+ chooser.title = this.i18n.fileManager
166
+ break
167
+ case 'search':
168
+ chooser.title = this.i18n.search
169
+ break
170
+ }
171
+ }
172
+ }
173
+ }
174
+ if (this.uploaders) {
175
+ for (const uploader of this.uploaders) {
176
+ if (typeof uploader.title !== 'string') {
177
+ switch (uploader.key) {
178
+ case 'file-upload':
179
+ uploader.title = this.i18n.uploadFiles
180
+ break
181
+ }
182
+ }
183
+ }
184
+ }
185
+ },
130
186
  isImportExternalFilesMode() {
131
187
  return this.activeNavItem.componentKey === 'external-file-provider'
132
188
  },