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

4
demo/js/main.js

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

2
demo/js/north.js

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

14
dist/core.js vendored

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

14
src/core/widget.js

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

Loading…
Cancel
Save