Browse Source

fix_comment

es6
unknown 6 years ago
parent
commit
348db840c9
  1. 6
      src/widget/multilayerselecttree/multilayerselecttree.combo.js
  2. 8
      src/widget/multilayerselecttree/multilayerselecttree.popup.js
  3. 4
      src/widget/multilayerselecttree/multilayerselecttree.trigger.js
  4. 6
      src/widget/multilayersingletree/multilayersingletree.combo.js
  5. 8
      src/widget/multilayersingletree/multilayersingletree.popup.js
  6. 4
      src/widget/multilayersingletree/multilayersingletree.trigger.js

6
src/widget/multilayerselecttree/multilayerselecttree.combo.js

@ -23,11 +23,9 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
render: function () {
var self = this, o = this.options;
var isSync = o.itemsCreator === BI.emptyFn;
var combo = (o.itemsCreator === BI.emptyFn) ? this._getSyncConfig() : this._getAsyncConfig();
var combo = isSync ? this._getSyncConfig() : this._getAsyncConfig();
return !o.allowEdit && isSync ? combo : {
return (!o.allowEdit && o.itemsCreator === BI.emptyFn) ? combo : {
type: "bi.absolute",
items: [{
el: combo,

8
src/widget/multilayerselecttree/multilayerselecttree.popup.js

@ -32,7 +32,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
self.loading();
});
o.itemsCreator(op, function (ob) {
BI.MultiLayerSelectTreePopup.superclass.populate.apply(self, [ob.items]);
self._populate(ob.items);
callback(ob);
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loaded();
@ -64,6 +64,10 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
this.check();
},
_populate: function() {
BI.MultiLayerSelectTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
return this.tree.getValue();
},
@ -74,7 +78,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
BI.MultiLayerSelectTreePopup.superclass.populate.apply(this, arguments);
this._populate(items);
this.tree.populate(items);
}
});

4
src/widget/multilayerselecttree/multilayerselecttree.trigger.js

@ -93,10 +93,6 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
},
_digest: function (v) {
var o = this.options;
if (!BI.isKey(v)) {
return o.valueFormatter(BI.isFunction(o.text) ? o.text() : o.text);
}
return o.valueFormatter(v);
},

6
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -26,11 +26,9 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
render: function () {
var self = this, o = this.options;
var isSync = o.itemsCreator === BI.emptyFn;
var combo = (o.itemsCreator === BI.emptyFn) ? this._getSyncConfig() : this._getAsyncConfig();
var combo = isSync ? this._getSyncConfig() : this._getAsyncConfig();
return !o.allowEdit && isSync ? combo : {
return (!o.allowEdit && o.itemsCreator === BI.emptyFn) ? combo : {
type: "bi.absolute",
items: [{
el: combo,

8
src/widget/multilayersingletree/multilayersingletree.popup.js

@ -31,7 +31,7 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
self.loading();
});
o.itemsCreator(op, function (ob) {
BI.MultiLayerSingleTreePopup.superclass.populate.apply(self, [ob.items]);
self._populate(ob.items);
callback(ob);
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loaded();
@ -63,6 +63,10 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
this.check();
},
_populate: function() {
BI.MultiLayerSingleTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
return this.tree.getValue();
},
@ -73,7 +77,7 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
BI.MultiLayerSingleTreePopup.superclass.populate.apply(this, arguments);
this._populate(items);
this.tree.populate(items);
}
});

4
src/widget/multilayersingletree/multilayersingletree.trigger.js

@ -93,10 +93,6 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
},
_digest: function (v) {
var o = this.options;
if (!BI.isKey(v)) {
return o.valueFormatter(BI.isFunction(o.text) ? o.text() : o.text);
}
return o.valueFormatter(v);
},

Loading…
Cancel
Save