@concretecms/bedrock 1.5.2 → 1.5.4
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.
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
<th></th>
|
|
26
26
|
<th></th>
|
|
27
27
|
<th>{{ i18n.id }}</th>
|
|
28
|
-
<th :class="getSortColumnClassName('
|
|
29
|
-
<a v-if="enableSort" href="#" @click.prevent="sortBy('
|
|
28
|
+
<th :class="getSortColumnClassName('name')">
|
|
29
|
+
<a v-if="enableSort" href="#" @click.prevent="sortBy('name')">{{ i18n.name }}</a>
|
|
30
30
|
<span v-else>{{ i18n.name }}</span>
|
|
31
31
|
</th>
|
|
32
32
|
<th :class="getSortColumnClassName(dateSortColumn)">
|
|
@@ -99,7 +99,7 @@ export default {
|
|
|
99
99
|
fileList: [],
|
|
100
100
|
selectedFiles: [],
|
|
101
101
|
sortByColumn: '',
|
|
102
|
-
sortByDirection: '
|
|
102
|
+
sortByDirection: 'asc',
|
|
103
103
|
pagination: null,
|
|
104
104
|
queryParams: {
|
|
105
105
|
pagination_page: 'ccm_paging_p',
|
|
@@ -300,7 +300,7 @@ export default {
|
|
|
300
300
|
})
|
|
301
301
|
},
|
|
302
302
|
sortBy(column) {
|
|
303
|
-
if (column === this.sortByColumn || (this.sortByColumn === '' && column ===
|
|
303
|
+
if (column === this.sortByColumn || (this.sortByColumn === '' && column === 'name')) {
|
|
304
304
|
this.sortByDirection = this.sortByDirection === 'asc' ? 'desc' : 'asc'
|
|
305
305
|
}
|
|
306
306
|
|
|
@@ -309,7 +309,7 @@ export default {
|
|
|
309
309
|
getSortColumnClassName(column) {
|
|
310
310
|
let className = ''
|
|
311
311
|
if (this.enableSort) {
|
|
312
|
-
if (column === this.sortByColumn || (this.sortByColumn === '' && column ===
|
|
312
|
+
if (column === this.sortByColumn || (this.sortByColumn === '' && column === 'name')) {
|
|
313
313
|
className = `ccm-results-list-active-sort-${this.sortByDirection}`
|
|
314
314
|
}
|
|
315
315
|
}
|
|
@@ -57,6 +57,11 @@ export default {
|
|
|
57
57
|
components: {
|
|
58
58
|
},
|
|
59
59
|
props: {
|
|
60
|
+
filter: {
|
|
61
|
+
type: String,
|
|
62
|
+
required: false,
|
|
63
|
+
default: '' /* Values are either "" or "assign". If assign, we strip out faux-groups like "Guest" and "Registered Users" */
|
|
64
|
+
},
|
|
60
65
|
mode: {
|
|
61
66
|
type: String,
|
|
62
67
|
required: false,
|
|
@@ -83,7 +88,7 @@ export default {
|
|
|
83
88
|
treeID: function() {
|
|
84
89
|
var my = this
|
|
85
90
|
var removeNodesByKey = []
|
|
86
|
-
if (this.guestGroupTreeNodeID !== null && this.registeredGroupTreeNodeID !== null) {
|
|
91
|
+
if (this.filter === 'assign' && this.guestGroupTreeNodeID !== null && this.registeredGroupTreeNodeID !== null) {
|
|
87
92
|
removeNodesByKey.push(this.guestGroupTreeNodeID)
|
|
88
93
|
removeNodesByKey.push(this.registeredGroupTreeNodeID)
|
|
89
94
|
}
|
|
@@ -148,7 +153,7 @@ export default {
|
|
|
148
153
|
url: CCM_DISPATCHER_FILENAME + '/ccm/system/group/chooser/search',
|
|
149
154
|
method: 'POST',
|
|
150
155
|
data: {
|
|
151
|
-
filter:
|
|
156
|
+
filter: my.filter,
|
|
152
157
|
ccm_token: CCM_SECURITY_TOKEN,
|
|
153
158
|
keywords: my.searchKeywords
|
|
154
159
|
},
|
package/assets/cms/js/tree.js
CHANGED
|
@@ -139,9 +139,7 @@ ConcreteTree.prototype = {
|
|
|
139
139
|
select: function (select, data) {
|
|
140
140
|
if (options.chooseNodeInForm) {
|
|
141
141
|
const keys = my.getSelectedNodeKeys(data.tree.getRootNode(), ajaxData.treeNodeSelectedIDs)
|
|
142
|
-
|
|
143
|
-
options.onSelect(keys)
|
|
144
|
-
}
|
|
142
|
+
options.onSelect(keys)
|
|
145
143
|
}
|
|
146
144
|
},
|
|
147
145
|
|
|
@@ -307,15 +305,18 @@ ConcreteTree.prototype = {
|
|
|
307
305
|
})
|
|
308
306
|
},
|
|
309
307
|
|
|
308
|
+
// Fancytree provides a selected keys array, but it doesn't include the children of closed categories.
|
|
309
|
+
// So we need to walk through the entire tree to get all selected nodes.
|
|
310
310
|
getSelectedNodeKeys: function (node, selected) {
|
|
311
311
|
var my = this
|
|
312
312
|
|
|
313
313
|
// Initialize selected array
|
|
314
314
|
selected = selected || []
|
|
315
315
|
|
|
316
|
-
//
|
|
317
|
-
|
|
318
|
-
|
|
316
|
+
// We need to remove 0 as a selected key, because sometimes it comes from php and means null.
|
|
317
|
+
// See: https://github.com/concretecms/concretecms/issues/12118
|
|
318
|
+
selected = selected.filter(function (value) {
|
|
319
|
+
return parseInt(value) > 0
|
|
319
320
|
})
|
|
320
321
|
|
|
321
322
|
// Walk through all child nodes
|
package/assets/icons/sprites.svg
CHANGED
|
@@ -146,11 +146,7 @@
|
|
|
146
146
|
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
147
147
|
<g id="Page-1" stroke="none" stroke-width="1" fill-rule="evenodd">
|
|
148
148
|
<g id="Dialog---Add-Page-List" transform="translate(-1021.000000, -105.000000)">
|
|
149
|
-
<
|
|
150
|
-
<use xlink:href="#path-1"></use>
|
|
151
|
-
</mask>
|
|
152
|
-
<use id="Rectangle" fill-opacity="0.6" xlink:href="#path-1"></use>
|
|
153
|
-
<g id="Group" mask="url(#mask-2)">
|
|
149
|
+
<g id="Group">
|
|
154
150
|
<g transform="translate(315.000000, 80.000000)">
|
|
155
151
|
<g id="icons8-info-(1)" stroke-width="1" fill="none" fill-rule="evenodd"
|
|
156
152
|
transform="translate(706.000000, 25.000000)">
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
if (window.innerWidth > 992) {
|
|
5
5
|
document.querySelectorAll('.ccm-block-top-navigation-bar .nav-item').forEach(function(everyitem) {
|
|
6
6
|
everyitem.addEventListener('mouseover', function(e) {
|
|
7
|
-
const linkElement = this.querySelector('a[data-
|
|
7
|
+
const linkElement = this.querySelector('a[data-concrete-toggle]')
|
|
8
8
|
if (linkElement != null) {
|
|
9
9
|
const nextElement = linkElement.nextElementSibling
|
|
10
10
|
linkElement.classList.add('show')
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
})
|
|
14
14
|
everyitem.addEventListener('mouseleave', function(e) {
|
|
15
|
-
const linkElement = this.querySelector('a[data-
|
|
15
|
+
const linkElement = this.querySelector('a[data-concrete-toggle]')
|
|
16
16
|
if (linkElement != null) {
|
|
17
17
|
const nextElement = linkElement.nextElementSibling
|
|
18
18
|
linkElement.classList.remove('show')
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
})
|
|
22
22
|
})
|
|
23
23
|
} else {
|
|
24
|
-
$('a[data-
|
|
24
|
+
$('a[data-concrete-toggle]').on('click', function(e) {
|
|
25
25
|
if (!$(this).hasClass('show')) {
|
|
26
26
|
e.preventDefault()
|
|
27
27
|
const $nextElement = $(this).next()
|
package/package.json
CHANGED