Browse Source

无JIRA任务 fix: 同步搜索trigger和popup共享items需要clone

es6
windy 5 years ago
parent
commit
7bdb6567bc
  1. 35
      dist/2.0/fineui.ie.js
  2. 53
      dist/2.0/fineui.js
  3. 35
      dist/bundle.ie.js
  4. 53
      dist/bundle.js
  5. 35
      dist/fineui.ie.js
  6. 53
      dist/fineui.js
  7. 53
      dist/fineui_without_jquery_polyfill.js
  8. 35
      dist/widget.js
  9. 11
      src/widget/multilayerselecttree/multilayerselecttree.trigger.js
  10. 1
      src/widget/multilayerselecttree/node/node.first.plus.js
  11. 1
      src/widget/multilayerselecttree/node/node.last.plus.js
  12. 1
      src/widget/multilayerselecttree/node/node.mid.plus.js
  13. 1
      src/widget/multilayerselecttree/node/node.plus.js
  14. 8
      src/widget/multilayersingletree/multilayersingletree.trigger.js

35
dist/2.0/fineui.ie.js vendored

@ -69124,7 +69124,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
return v;
},
itemsCreator: BI.emptyFn,
watermark: BI.i18nText("BI-Basic_Search")
watermark: BI.i18nText("BI-Basic_Search"),
allowSearchValue: false
};
},
@ -69132,7 +69133,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -69241,8 +69243,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -69315,6 +69317,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -69365,6 +69368,7 @@ BI.MultiLayerSelectTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -69468,6 +69472,7 @@ BI.MultiLayerSelectTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -69567,6 +69572,7 @@ BI.MultiLayerSelectTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -69666,6 +69672,7 @@ BI.MultiLayerSelectTreePlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -70297,7 +70304,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -70406,8 +70414,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -70481,6 +70489,7 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -76074,9 +76083,9 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM);
});
@ -76377,9 +76386,9 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});
@ -76693,9 +76702,9 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});

53
dist/2.0/fineui.js vendored

@ -69528,7 +69528,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
return v;
},
itemsCreator: BI.emptyFn,
watermark: BI.i18nText("BI-Basic_Search")
watermark: BI.i18nText("BI-Basic_Search"),
allowSearchValue: false
};
},
@ -69536,7 +69537,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -69645,8 +69647,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -69719,6 +69721,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -69769,6 +69772,7 @@ BI.MultiLayerSelectTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -69872,6 +69876,7 @@ BI.MultiLayerSelectTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -69971,6 +69976,7 @@ BI.MultiLayerSelectTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -70070,6 +70076,7 @@ BI.MultiLayerSelectTreePlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -70701,7 +70708,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -70810,8 +70818,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -70885,6 +70893,7 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -76478,9 +76487,9 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM);
});
@ -76781,9 +76790,9 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});
@ -77097,9 +77106,9 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});
@ -89590,7 +89599,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
}
return oldWatch.call(this, model, expOrFn, function () {
options && options.store && pushTarget(options.store);
var res = cb.apply(this, arguments);
try {
var res = cb.apply(this, arguments);
} catch (e) {
console.error(e);
}
options && options.store && popTarget();
return res;
}, options);
@ -89627,7 +89640,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
pushContext(context);
pushed = true;
}
var result = _create.apply(this, arguments);
try {
var result = _create.apply(this, arguments);
} catch (e) {
console.error(e);
}
pushed && popContext();
return result;
};
@ -89636,7 +89653,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
var old = BI.Loader.prototype[name];
BI.Loader.prototype[name] = function () {
pushContext(this);
var result = old.apply(this, arguments);
try {
var result = old.apply(this, arguments);
} catch (e) {
console.error(e);
}
popContext();
return result;
};

35
dist/bundle.ie.js vendored

@ -69124,7 +69124,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
return v;
},
itemsCreator: BI.emptyFn,
watermark: BI.i18nText("BI-Basic_Search")
watermark: BI.i18nText("BI-Basic_Search"),
allowSearchValue: false
};
},
@ -69132,7 +69133,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -69241,8 +69243,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -69315,6 +69317,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -69365,6 +69368,7 @@ BI.MultiLayerSelectTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -69468,6 +69472,7 @@ BI.MultiLayerSelectTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -69567,6 +69572,7 @@ BI.MultiLayerSelectTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -69666,6 +69672,7 @@ BI.MultiLayerSelectTreePlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -70297,7 +70304,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -70406,8 +70414,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -70481,6 +70489,7 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -76074,9 +76083,9 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM);
});
@ -76377,9 +76386,9 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});
@ -76693,9 +76702,9 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});

53
dist/bundle.js vendored

@ -69528,7 +69528,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
return v;
},
itemsCreator: BI.emptyFn,
watermark: BI.i18nText("BI-Basic_Search")
watermark: BI.i18nText("BI-Basic_Search"),
allowSearchValue: false
};
},
@ -69536,7 +69537,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -69645,8 +69647,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -69719,6 +69721,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -69769,6 +69772,7 @@ BI.MultiLayerSelectTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -69872,6 +69876,7 @@ BI.MultiLayerSelectTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -69971,6 +69976,7 @@ BI.MultiLayerSelectTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -70070,6 +70076,7 @@ BI.MultiLayerSelectTreePlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -70701,7 +70708,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -70810,8 +70818,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -70885,6 +70893,7 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -76478,9 +76487,9 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM);
});
@ -76781,9 +76790,9 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});
@ -77097,9 +77106,9 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});
@ -89590,7 +89599,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
}
return oldWatch.call(this, model, expOrFn, function () {
options && options.store && pushTarget(options.store);
var res = cb.apply(this, arguments);
try {
var res = cb.apply(this, arguments);
} catch (e) {
console.error(e);
}
options && options.store && popTarget();
return res;
}, options);
@ -89627,7 +89640,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
pushContext(context);
pushed = true;
}
var result = _create.apply(this, arguments);
try {
var result = _create.apply(this, arguments);
} catch (e) {
console.error(e);
}
pushed && popContext();
return result;
};
@ -89636,7 +89653,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
var old = BI.Loader.prototype[name];
BI.Loader.prototype[name] = function () {
pushContext(this);
var result = old.apply(this, arguments);
try {
var result = old.apply(this, arguments);
} catch (e) {
console.error(e);
}
popContext();
return result;
};

35
dist/fineui.ie.js vendored

@ -69369,7 +69369,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
return v;
},
itemsCreator: BI.emptyFn,
watermark: BI.i18nText("BI-Basic_Search")
watermark: BI.i18nText("BI-Basic_Search"),
allowSearchValue: false
};
},
@ -69377,7 +69378,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -69486,8 +69488,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -69560,6 +69562,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -69610,6 +69613,7 @@ BI.MultiLayerSelectTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -69713,6 +69717,7 @@ BI.MultiLayerSelectTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -69812,6 +69817,7 @@ BI.MultiLayerSelectTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -69911,6 +69917,7 @@ BI.MultiLayerSelectTreePlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -70542,7 +70549,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -70651,8 +70659,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -70726,6 +70734,7 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -76319,9 +76328,9 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM);
});
@ -76622,9 +76631,9 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});
@ -76938,9 +76947,9 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});

53
dist/fineui.js vendored

@ -69773,7 +69773,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
return v;
},
itemsCreator: BI.emptyFn,
watermark: BI.i18nText("BI-Basic_Search")
watermark: BI.i18nText("BI-Basic_Search"),
allowSearchValue: false
};
},
@ -69781,7 +69782,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -69890,8 +69892,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -69964,6 +69966,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -70014,6 +70017,7 @@ BI.MultiLayerSelectTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -70117,6 +70121,7 @@ BI.MultiLayerSelectTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -70216,6 +70221,7 @@ BI.MultiLayerSelectTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -70315,6 +70321,7 @@ BI.MultiLayerSelectTreePlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -70946,7 +70953,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -71055,8 +71063,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -71130,6 +71138,7 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -76723,9 +76732,9 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM);
});
@ -77026,9 +77035,9 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});
@ -77342,9 +77351,9 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});
@ -90419,7 +90428,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);(function () {
}
return oldWatch.call(this, model, expOrFn, function () {
options && options.store && pushTarget(options.store);
var res = cb.apply(this, arguments);
try {
var res = cb.apply(this, arguments);
} catch (e) {
console.error(e);
}
options && options.store && popTarget();
return res;
}, options);
@ -90456,7 +90469,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);(function () {
pushContext(context);
pushed = true;
}
var result = _create.apply(this, arguments);
try {
var result = _create.apply(this, arguments);
} catch (e) {
console.error(e);
}
pushed && popContext();
return result;
};
@ -90465,7 +90482,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);(function () {
var old = BI.Loader.prototype[name];
BI.Loader.prototype[name] = function () {
pushContext(this);
var result = old.apply(this, arguments);
try {
var result = old.apply(this, arguments);
} catch (e) {
console.error(e);
}
popContext();
return result;
};

53
dist/fineui_without_jquery_polyfill.js vendored

@ -52073,7 +52073,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
return v;
},
itemsCreator: BI.emptyFn,
watermark: BI.i18nText("BI-Basic_Search")
watermark: BI.i18nText("BI-Basic_Search"),
allowSearchValue: false
};
},
@ -52081,7 +52082,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -52190,8 +52192,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -52264,6 +52266,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -52314,6 +52317,7 @@ BI.MultiLayerSelectTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -52417,6 +52421,7 @@ BI.MultiLayerSelectTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -52516,6 +52521,7 @@ BI.MultiLayerSelectTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -52615,6 +52621,7 @@ BI.MultiLayerSelectTreePlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -53246,7 +53253,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -53355,8 +53363,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -53430,6 +53438,7 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -59023,9 +59032,9 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM);
});
@ -59326,9 +59335,9 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});
@ -59642,9 +59651,9 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});
@ -72135,7 +72144,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
}
return oldWatch.call(this, model, expOrFn, function () {
options && options.store && pushTarget(options.store);
var res = cb.apply(this, arguments);
try {
var res = cb.apply(this, arguments);
} catch (e) {
console.error(e);
}
options && options.store && popTarget();
return res;
}, options);
@ -72172,7 +72185,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
pushContext(context);
pushed = true;
}
var result = _create.apply(this, arguments);
try {
var result = _create.apply(this, arguments);
} catch (e) {
console.error(e);
}
pushed && popContext();
return result;
};
@ -72181,7 +72198,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
var old = BI.Loader.prototype[name];
BI.Loader.prototype[name] = function () {
pushContext(this);
var result = old.apply(this, arguments);
try {
var result = old.apply(this, arguments);
} catch (e) {
console.error(e);
}
popContext();
return result;
};

35
dist/widget.js vendored

@ -7184,7 +7184,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
return v;
},
itemsCreator: BI.emptyFn,
watermark: BI.i18nText("BI-Basic_Search")
watermark: BI.i18nText("BI-Basic_Search"),
allowSearchValue: false
};
},
@ -7192,7 +7193,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -7301,8 +7303,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -7375,6 +7377,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -7425,6 +7428,7 @@ BI.MultiLayerSelectTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -7528,6 +7532,7 @@ BI.MultiLayerSelectTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -7627,6 +7632,7 @@ BI.MultiLayerSelectTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -7726,6 +7732,7 @@ BI.MultiLayerSelectTreePlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,
@ -8357,7 +8364,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -8466,8 +8474,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -8541,6 +8549,7 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {
@ -14134,9 +14143,9 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM);
});
@ -14437,9 +14446,9 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});
@ -14753,9 +14762,9 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
var checked = this.getSearcher().hasChecked();
var val = {
type: BI.Selection.Multi,
value: checked ? this.getValue() : {}
value: checked ? {1: 1} : {}
};
this.getSearcher().setState(val);
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
});

11
src/widget/multilayerselecttree/multilayerselecttree.trigger.js

@ -11,7 +11,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
return v;
},
itemsCreator: BI.emptyFn,
watermark: BI.i18nText("BI-Basic_Search")
watermark: BI.i18nText("BI-Basic_Search"),
allowSearchValue: false
};
},
@ -19,7 +20,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -128,8 +130,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -202,6 +204,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {

1
src/widget/multilayerselecttree/node/node.first.plus.js

@ -30,6 +30,7 @@ BI.MultiLayerSelectTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,

1
src/widget/multilayerselecttree/node/node.last.plus.js

@ -30,6 +30,7 @@ BI.MultiLayerSelectTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,

1
src/widget/multilayerselecttree/node/node.mid.plus.js

@ -30,6 +30,7 @@ BI.MultiLayerSelectTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,

1
src/widget/multilayerselecttree/node/node.plus.js

@ -30,6 +30,7 @@ BI.MultiLayerSelectTreePlusGroupNode = BI.inherit(BI.NodeButton, {
},
id: o.id,
pId: o.pId,
keyword: o.keyword,
open: o.open,
height: o.height,
hgap: o.hgap,

8
src/widget/multilayersingletree/multilayersingletree.trigger.js

@ -20,7 +20,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
var self = this, o = this.options;
if(o.itemsCreator === BI.emptyFn) {
this.tree = new BI.Tree();
this.tree.initTree(BI.Tree.treeFormat(o.items));
this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));
this.tree.initTree(this.nodes);
}
var content = {
type: "bi.htape",
@ -129,8 +130,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
_getSearchItems: function(keyword) {
var o = this.options;
var findingText = BI.Func.getSearchResult(o.items, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(o.items, keyword, "value") : {find: [], match: []};
var findingText = BI.Func.getSearchResult(this.nodes, keyword, "text");
var findingValue = o.allowSearchValue ? BI.Func.getSearchResult(this.nodes, keyword, "value") : {find: [], match: []};
var textItems = findingText.find.concat(findingText.match);
var valueItems = findingValue.find.concat(findingValue.match);
return this._fillTreeStructure4Search(BI.uniqBy(textItems.concat(valueItems), "id"));
@ -204,6 +205,7 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
this.options.items = items;
this.nodes = BI.Tree.treeFormat(BI.deepClone(items));
},
setValue: function (v) {

Loading…
Cancel
Save