Browse Source

Merge pull request #962 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit 'a428e74e48fae14dc4861c58a15a05bf641220a5':
  fix: 按照comment修改
  update
  REPORT-18438 fix: textarea设置disabled: true仍可编辑
es6
guy 5 years ago
parent
commit
1cfa833521
  1. 13
      src/base/single/editor/editor.textarea.js
  2. 5
      src/widget/multilayersingletree/multilayersingletree.leveltree.js
  3. 1
      src/widget/singleselect/singleselect.list.js

13
src/base/single/editor/editor.textarea.js

@ -11,8 +11,8 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
value: "" value: ""
}); });
}, },
_init: function () {
BI.TextAreaEditor.superclass._init.apply(this, arguments); render: function() {
var o = this.options, self = this; var o = this.options, self = this;
this.content = BI.createWidget({ this.content = BI.createWidget({
type: "bi.layout", type: "bi.layout",
@ -62,10 +62,10 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
BI.Widget._renderEngine.createElement(document).unbind("mousedown." + self.getName()); BI.Widget._renderEngine.createElement(document).unbind("mousedown." + self.getName());
}); });
if (BI.isKey(o.value)) { if (BI.isKey(o.value)) {
self.setValue(o.value); this.setValue(o.value);
} }
if (BI.isNotNull(o.style)) { if (BI.isNotNull(o.style)) {
self.setStyle(o.style); this.setStyle(o.style);
} }
this._checkWaterMark(); this._checkWaterMark();
}, },
@ -155,6 +155,11 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
BI.TextAreaEditor.superclass._setValid.apply(this, arguments); BI.TextAreaEditor.superclass._setValid.apply(this, arguments);
// this.content.setValid(b); // this.content.setValid(b);
// this.watermark && this.watermark.setValid(b); // this.watermark && this.watermark.setValid(b);
},
_setEnable: function (b) {
BI.TextAreaEditor.superclass._setEnable.apply(this, [b]);
this.content && (this.content.element[0].disabled = !b);
} }
}); });
BI.TextAreaEditor.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextAreaEditor.EVENT_CHANGE = "EVENT_CHANGE";

5
src/widget/multilayersingletree/multilayersingletree.leveltree.js

@ -18,8 +18,11 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
_init: function () { _init: function () {
var o = this.options;
BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments); BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments);
this.storeValue = o.value;
this.initTree(this.options.items); this.initTree(this.options.items);
this.check(); this.check();
@ -106,7 +109,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: false, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType, chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",

1
src/widget/singleselect/singleselect.list.js

@ -60,6 +60,7 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
}, o.logic, { }, o.logic, {
items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, { items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, {
type: "bi.single_select_item", type: "bi.single_select_item",
cls: "bi-list-item-active",
height: 24, height: 24,
forceNotSelected: true, forceNotSelected: true,
text: BI.i18nText("BI-Basic_No_Select"), text: BI.i18nText("BI-Basic_No_Select"),

Loading…
Cancel
Save