@@ -28,16 +28,16 @@ require(['jquery', 'jquery/jstree/jquery.jstree'], function($) {
28
28
let nonAnchorNodes = [];
29
29
30
30
function actionBasedOnIsAnchorOnly() {
31
- if(isAnchorOnly){
31
+ if (isAnchorOnly) {
32
32
tree.jstree(true).disable_node(nonAnchorNodes);
33
- }else{
33
+ } else {
34
34
tree.jstree(true).disable_node(anchorNodes);
35
35
}
36
36
}
37
37
38
38
function handleLoadedNode(e, data) {
39
39
const container = $(e.target).closest('div.chooser_container');
40
- if(container.find('input[type="text"].entities').val() !== ''){
40
+ if (container.find('input[type="text"].entities').val() !== '') {
41
41
checkedNodes = container.find('input[type="text"].entities').val().split(',').map(item => item.trim());
42
42
}
43
43
@@ -80,9 +80,9 @@ require(['jquery', 'jquery/jstree/jquery.jstree'], function($) {
80
80
updateChildrenKey(node.children);
81
81
}
82
82
83
- if(node.is_anchor === 1){
83
+ if (node.is_anchor === 1) {
84
84
anchorNodes.push(node.id);
85
- }else{
85
+ } else {
86
86
nonAnchorNodes.push(node.id);
87
87
}
88
88
});
@@ -92,7 +92,7 @@ require(['jquery', 'jquery/jstree/jquery.jstree'], function($) {
92
92
var jstreeConfig = {
93
93
core: {
94
94
data: function (obj, callback) {
95
- if(obj.id != '#' && obj.children.length === 0){
95
+ if (obj.id != '#' && obj.children.length === 0) {
96
96
let data = {
97
97
id: obj.id,
98
98
store: obj.original.store,
@@ -113,7 +113,7 @@ require(['jquery', 'jquery/jstree/jquery.jstree'], function($) {
113
113
console.log(status + ': ' + error);
114
114
}
115
115
});
116
- }else{
116
+ } else {
117
117
let defaultTree = updateChildrenKey( {$ block ->getTreeJson ()});
118
118
callback.call(this, defaultTree);
119
119
}
0 commit comments