Browse Source

Merge pull request #288 in FUI/fineui from ~WINDY/fui:master to master

* commit '5d536e11004e24248a6e97de897ab3e357469ab9':
  update
  BI-16745 multilayerleveltree支持标红,渐进去控件公有方法
es6
guy 7 years ago
parent
commit
d64c40a9ba
  1. 62
      dist/_fineui.min.js
  2. 81
      dist/bundle.js
  3. 52
      dist/bundle.min.js
  4. 18
      dist/case.js
  5. 12
      dist/core.js
  6. 62
      dist/fineui.min.js
  7. 51
      dist/widget.js
  8. 3
      src/case/button/node/node.first.plus.js
  9. 3
      src/case/button/node/node.last.plus.js
  10. 3
      src/case/button/node/node.mid.plus.js
  11. 3
      src/case/button/treeitem/item.first.treeleaf.js
  12. 3
      src/case/button/treeitem/item.last.treeleaf.js
  13. 3
      src/case/button/treeitem/item.mid.treeleaf.js
  14. 6
      src/core/behavior/behavior.highlight.js
  15. 6
      src/core/behavior/behavior.redmark.js
  16. 9
      src/widget/multilayersingletree/multilayersingletree.leveltree.js
  17. 3
      src/widget/multilayersingletree/node/node.first.plus.js
  18. 3
      src/widget/multilayersingletree/node/node.last.plus.js
  19. 3
      src/widget/multilayersingletree/node/node.mid.plus.js
  20. 11
      src/widget/multilayersingletree/treeitem/item.first.treeleaf.js
  21. 11
      src/widget/multilayersingletree/treeitem/item.last.treeleaf.js
  22. 11
      src/widget/multilayersingletree/treeitem/item.mid.treeleaf.js

62
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

81
dist/bundle.js vendored

@ -26110,9 +26110,9 @@ BI.HighlightBehavior = BI.inherit(BI.Behavior, {
function doBe (run) { function doBe (run) {
if (run === true) { if (run === true) {
item.doHighLight.apply(item, args); item.doHighLight && item.doHighLight.apply(item, args);
} else { } else {
item.unHighLight.apply(item, args); item.unHighLight && item.unHighLight.apply(item, args);
} }
} }
@ -26122,7 +26122,7 @@ BI.HighlightBehavior = BI.inherit(BI.Behavior, {
doBe(rule); doBe(rule);
} }
} else { } else {
item.doBehavior.apply(item, args); item.doBehavior && item.doBehavior.apply(item, args);
} }
}); });
} }
@ -26150,12 +26150,12 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if(item instanceof BI.Single) { if(item instanceof BI.Single) {
if (o.rule(item.getValue(), item)) { if (o.rule(item.getValue(), item)) {
item.doRedMark.apply(item, args); item.doRedMark && item.doRedMark.apply(item, args);
} else { } else {
item.unRedMark.apply(item, args); item.doRedMark && item.unRedMark.apply(item, args);
} }
} else { } else {
item.doBehavior.apply(item, args); item.doBehavior && item.doBehavior.apply(item, args);
} }
}); });
} }
@ -71001,7 +71001,8 @@ BI.FirstPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
@ -71182,7 +71183,8 @@ BI.LastPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if(type === BI.Events.CLICK) { if(type === BI.Events.CLICK) {
@ -71262,7 +71264,8 @@ BI.MidPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
@ -71550,7 +71553,8 @@ BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
@ -71740,7 +71744,8 @@ BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
@ -71843,7 +71848,8 @@ BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
@ -91621,6 +91627,11 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: BI.Selection.Single, chooseType: BI.Selection.Single,
behaviors: {
redmark: function () {
return true;
}
},
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
}] }]
@ -91634,8 +91645,8 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
}); });
}, },
populate: function (nodes) { populate: function (nodes, keyword) {
this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0)); this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0), keyword);
}, },
setValue: function (v) { setValue: function (v) {
@ -91763,7 +91774,8 @@ BI.MultiLayerSingleTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.node.on(BI.Controller.EVENT_CHANGE, function (type) { this.node.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能
@ -91846,7 +91858,8 @@ BI.MultiLayerSingleTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.node.on(BI.Controller.EVENT_CHANGE, function (type) { this.node.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能
@ -91929,7 +91942,8 @@ BI.MultiLayerSingleTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.node.on(BI.Controller.EVENT_CHANGE, function (type) { this.node.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能
@ -92011,7 +92025,8 @@ BI.MultiLayerSingleTreeFirstTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.item.on(BI.Controller.EVENT_CHANGE, function (type) { this.item.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能
@ -92038,14 +92053,6 @@ BI.MultiLayerSingleTreeFirstTreeLeafItem = BI.inherit(BI.BasicButton, {
}); });
}, },
doRedMark: function () {
this.item.doRedMark.apply(this.item, arguments);
},
unRedMark: function () {
this.item.unRedMark.apply(this.item, arguments);
},
doHighLight: function () { doHighLight: function () {
this.item.doHighLight.apply(this.item, arguments); this.item.doHighLight.apply(this.item, arguments);
}, },
@ -92107,7 +92114,8 @@ BI.MultiLayerSingleTreeLastTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.item.on(BI.Controller.EVENT_CHANGE, function (type) { this.item.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能
@ -92134,14 +92142,6 @@ BI.MultiLayerSingleTreeLastTreeLeafItem = BI.inherit(BI.BasicButton, {
}); });
}, },
doRedMark: function () {
this.item.doRedMark.apply(this.item, arguments);
},
unRedMark: function () {
this.item.unRedMark.apply(this.item, arguments);
},
doHighLight: function () { doHighLight: function () {
this.item.doHighLight.apply(this.item, arguments); this.item.doHighLight.apply(this.item, arguments);
}, },
@ -92203,7 +92203,8 @@ BI.MultiLayerSingleTreeMidTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.item.on(BI.Controller.EVENT_CHANGE, function (type) { this.item.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能
@ -92230,14 +92231,6 @@ BI.MultiLayerSingleTreeMidTreeLeafItem = BI.inherit(BI.BasicButton, {
}); });
}, },
doRedMark: function () {
this.item.doRedMark.apply(this.item, arguments);
},
unRedMark: function () {
this.item.unRedMark.apply(this.item, arguments);
},
doHighLight: function () { doHighLight: function () {
this.item.doHighLight.apply(this.item, arguments); this.item.doHighLight.apply(this.item, arguments);
}, },

52
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

18
dist/case.js vendored

@ -507,7 +507,8 @@ BI.FirstPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
@ -688,7 +689,8 @@ BI.LastPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if(type === BI.Events.CLICK) { if(type === BI.Events.CLICK) {
@ -768,7 +770,8 @@ BI.MidPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
@ -1056,7 +1059,8 @@ BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
@ -1246,7 +1250,8 @@ BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
@ -1349,7 +1354,8 @@ BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {

12
dist/core.js vendored

@ -26110,9 +26110,9 @@ BI.HighlightBehavior = BI.inherit(BI.Behavior, {
function doBe (run) { function doBe (run) {
if (run === true) { if (run === true) {
item.doHighLight.apply(item, args); item.doHighLight && item.doHighLight.apply(item, args);
} else { } else {
item.unHighLight.apply(item, args); item.unHighLight && item.unHighLight.apply(item, args);
} }
} }
@ -26122,7 +26122,7 @@ BI.HighlightBehavior = BI.inherit(BI.Behavior, {
doBe(rule); doBe(rule);
} }
} else { } else {
item.doBehavior.apply(item, args); item.doBehavior && item.doBehavior.apply(item, args);
} }
}); });
} }
@ -26150,12 +26150,12 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if(item instanceof BI.Single) { if(item instanceof BI.Single) {
if (o.rule(item.getValue(), item)) { if (o.rule(item.getValue(), item)) {
item.doRedMark.apply(item, args); item.doRedMark && item.doRedMark.apply(item, args);
} else { } else {
item.unRedMark.apply(item, args); item.doRedMark && item.unRedMark.apply(item, args);
} }
} else { } else {
item.doBehavior.apply(item, args); item.doBehavior && item.doBehavior.apply(item, args);
} }
}); });
} }

62
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

51
dist/widget.js vendored

@ -6738,6 +6738,11 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: BI.Selection.Single, chooseType: BI.Selection.Single,
behaviors: {
redmark: function () {
return true;
}
},
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
}] }]
@ -6751,8 +6756,8 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
}); });
}, },
populate: function (nodes) { populate: function (nodes, keyword) {
this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0)); this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0), keyword);
}, },
setValue: function (v) { setValue: function (v) {
@ -6880,7 +6885,8 @@ BI.MultiLayerSingleTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.node.on(BI.Controller.EVENT_CHANGE, function (type) { this.node.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能
@ -6963,7 +6969,8 @@ BI.MultiLayerSingleTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.node.on(BI.Controller.EVENT_CHANGE, function (type) { this.node.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能
@ -7046,7 +7053,8 @@ BI.MultiLayerSingleTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.node.on(BI.Controller.EVENT_CHANGE, function (type) { this.node.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能
@ -7128,7 +7136,8 @@ BI.MultiLayerSingleTreeFirstTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.item.on(BI.Controller.EVENT_CHANGE, function (type) { this.item.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能
@ -7155,14 +7164,6 @@ BI.MultiLayerSingleTreeFirstTreeLeafItem = BI.inherit(BI.BasicButton, {
}); });
}, },
doRedMark: function () {
this.item.doRedMark.apply(this.item, arguments);
},
unRedMark: function () {
this.item.unRedMark.apply(this.item, arguments);
},
doHighLight: function () { doHighLight: function () {
this.item.doHighLight.apply(this.item, arguments); this.item.doHighLight.apply(this.item, arguments);
}, },
@ -7224,7 +7225,8 @@ BI.MultiLayerSingleTreeLastTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.item.on(BI.Controller.EVENT_CHANGE, function (type) { this.item.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能
@ -7251,14 +7253,6 @@ BI.MultiLayerSingleTreeLastTreeLeafItem = BI.inherit(BI.BasicButton, {
}); });
}, },
doRedMark: function () {
this.item.doRedMark.apply(this.item, arguments);
},
unRedMark: function () {
this.item.unRedMark.apply(this.item, arguments);
},
doHighLight: function () { doHighLight: function () {
this.item.doHighLight.apply(this.item, arguments); this.item.doHighLight.apply(this.item, arguments);
}, },
@ -7320,7 +7314,8 @@ BI.MultiLayerSingleTreeMidTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.item.on(BI.Controller.EVENT_CHANGE, function (type) { this.item.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能
@ -7347,14 +7342,6 @@ BI.MultiLayerSingleTreeMidTreeLeafItem = BI.inherit(BI.BasicButton, {
}); });
}, },
doRedMark: function () {
this.item.doRedMark.apply(this.item, arguments);
},
unRedMark: function () {
this.item.unRedMark.apply(this.item, arguments);
},
doHighLight: function () { doHighLight: function () {
this.item.doHighLight.apply(this.item, arguments); this.item.doHighLight.apply(this.item, arguments);
}, },

3
src/case/button/node/node.first.plus.js

@ -34,7 +34,8 @@ BI.FirstPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {

3
src/case/button/node/node.last.plus.js

@ -34,7 +34,8 @@ BI.LastPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if(type === BI.Events.CLICK) { if(type === BI.Events.CLICK) {

3
src/case/button/node/node.mid.plus.js

@ -34,7 +34,8 @@ BI.MidPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {

3
src/case/button/treeitem/item.first.treeleaf.js

@ -31,7 +31,8 @@ BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {

3
src/case/button/treeitem/item.last.treeleaf.js

@ -31,7 +31,8 @@ BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {

3
src/case/button/treeitem/item.mid.treeleaf.js

@ -31,7 +31,8 @@ BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) { this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {

6
src/core/behavior/behavior.highlight.js

@ -23,9 +23,9 @@ BI.HighlightBehavior = BI.inherit(BI.Behavior, {
function doBe (run) { function doBe (run) {
if (run === true) { if (run === true) {
item.doHighLight.apply(item, args); item.doHighLight && item.doHighLight.apply(item, args);
} else { } else {
item.unHighLight.apply(item, args); item.unHighLight && item.unHighLight.apply(item, args);
} }
} }
@ -35,7 +35,7 @@ BI.HighlightBehavior = BI.inherit(BI.Behavior, {
doBe(rule); doBe(rule);
} }
} else { } else {
item.doBehavior.apply(item, args); item.doBehavior && item.doBehavior.apply(item, args);
} }
}); });
} }

6
src/core/behavior/behavior.redmark.js

@ -22,12 +22,12 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
BI.each(items, function (i, item) { BI.each(items, function (i, item) {
if(item instanceof BI.Single) { if(item instanceof BI.Single) {
if (o.rule(item.getValue(), item)) { if (o.rule(item.getValue(), item)) {
item.doRedMark.apply(item, args); item.doRedMark && item.doRedMark.apply(item, args);
} else { } else {
item.unRedMark.apply(item, args); item.doRedMark && item.unRedMark.apply(item, args);
} }
} else { } else {
item.doBehavior.apply(item, args); item.doBehavior && item.doBehavior.apply(item, args);
} }
}); });
} }

9
src/widget/multilayersingletree/multilayersingletree.leveltree.js

@ -90,6 +90,11 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: BI.Selection.Single, chooseType: BI.Selection.Single,
behaviors: {
redmark: function () {
return true;
}
},
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
}] }]
@ -103,8 +108,8 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
}); });
}, },
populate: function (nodes) { populate: function (nodes, keyword) {
this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0)); this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0), keyword);
}, },
setValue: function (v) { setValue: function (v) {

3
src/widget/multilayersingletree/node/node.first.plus.js

@ -33,7 +33,8 @@ BI.MultiLayerSingleTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.node.on(BI.Controller.EVENT_CHANGE, function (type) { this.node.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能

3
src/widget/multilayersingletree/node/node.last.plus.js

@ -33,7 +33,8 @@ BI.MultiLayerSingleTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.node.on(BI.Controller.EVENT_CHANGE, function (type) { this.node.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能

3
src/widget/multilayersingletree/node/node.mid.plus.js

@ -33,7 +33,8 @@ BI.MultiLayerSingleTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.node.on(BI.Controller.EVENT_CHANGE, function (type) { this.node.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能

11
src/widget/multilayersingletree/treeitem/item.first.treeleaf.js

@ -32,7 +32,8 @@ BI.MultiLayerSingleTreeFirstTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.item.on(BI.Controller.EVENT_CHANGE, function (type) { this.item.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能
@ -59,14 +60,6 @@ BI.MultiLayerSingleTreeFirstTreeLeafItem = BI.inherit(BI.BasicButton, {
}); });
}, },
doRedMark: function () {
this.item.doRedMark.apply(this.item, arguments);
},
unRedMark: function () {
this.item.unRedMark.apply(this.item, arguments);
},
doHighLight: function () { doHighLight: function () {
this.item.doHighLight.apply(this.item, arguments); this.item.doHighLight.apply(this.item, arguments);
}, },

11
src/widget/multilayersingletree/treeitem/item.last.treeleaf.js

@ -32,7 +32,8 @@ BI.MultiLayerSingleTreeLastTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.item.on(BI.Controller.EVENT_CHANGE, function (type) { this.item.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能
@ -59,14 +60,6 @@ BI.MultiLayerSingleTreeLastTreeLeafItem = BI.inherit(BI.BasicButton, {
}); });
}, },
doRedMark: function () {
this.item.doRedMark.apply(this.item, arguments);
},
unRedMark: function () {
this.item.unRedMark.apply(this.item, arguments);
},
doHighLight: function () { doHighLight: function () {
this.item.doHighLight.apply(this.item, arguments); this.item.doHighLight.apply(this.item, arguments);
}, },

11
src/widget/multilayersingletree/treeitem/item.mid.treeleaf.js

@ -32,7 +32,8 @@ BI.MultiLayerSingleTreeMidTreeLeafItem = BI.inherit(BI.BasicButton, {
hgap: o.hgap, hgap: o.hgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py py: o.py,
keyword: o.keyword
}); });
this.item.on(BI.Controller.EVENT_CHANGE, function (type) { this.item.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {// 本身实现click功能 if (type === BI.Events.CLICK) {// 本身实现click功能
@ -59,14 +60,6 @@ BI.MultiLayerSingleTreeMidTreeLeafItem = BI.inherit(BI.BasicButton, {
}); });
}, },
doRedMark: function () {
this.item.doRedMark.apply(this.item, arguments);
},
unRedMark: function () {
this.item.unRedMark.apply(this.item, arguments);
},
doHighLight: function () { doHighLight: function () {
this.item.doHighLight.apply(this.item, arguments); this.item.doHighLight.apply(this.item, arguments);
}, },

Loading…
Cancel
Save