guy 8 years ago
parent
commit
1bc0a53d12
  1. 4
      demo/js/main.js
  2. 2
      demo/js/north.js
  3. 12
      dist/core.js
  4. 12
      src/core/widget.js

4
demo/js/main.js

@ -13,8 +13,8 @@ Demo.Main = BI.inherit(BI.Widget, {
type: "demo.north",
listeners: [{
eventName: Demo.North.EVENT_VALUE_CHANGE,
action: function () {
center.setValue(0);
action: function (v) {
center.setValue(v);
}
}]
}

2
demo/js/north.js

@ -13,7 +13,7 @@ Demo.North = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.Button.EVENT_CHANGE,
action: function () {
self.fireEvent(Demo.North.EVENT_VALUE_CHANGE, 0)
self.fireEvent(Demo.North.EVENT_VALUE_CHANGE, "demo.face")
}
}],
cls: "logo",

12
dist/core.js vendored

@ -14244,11 +14244,15 @@ BI.Widget = BI.inherit(BI.OB, {
if (o.invisible) {
this.element.hide();
}
if (o.disabled) {
this.element.addClass("base-disabled disabled");
if (o.disabled || o.invalid) {
BI.nextTick(BI.bind(function () {
if (this.options.disabled) {
this.setEnable(false);
}
if (o.invalid) {
this.element.addClass("base-invalid invalid");
if (this.options.invalid) {
this.setValid(false);
}
}, this));
}
},

12
src/core/widget.js

@ -106,11 +106,15 @@ BI.Widget = BI.inherit(BI.OB, {
if (o.invisible) {
this.element.hide();
}
if (o.disabled) {
this.element.addClass("base-disabled disabled");
if (o.disabled || o.invalid) {
BI.nextTick(BI.bind(function () {
if (this.options.disabled) {
this.setEnable(false);
}
if (o.invalid) {
this.element.addClass("base-invalid invalid");
if (this.options.invalid) {
this.setValid(false);
}
}, this));
}
},

Loading…
Cancel
Save