guy 4 years ago
parent
commit
172ddbcd88
  1. 10
      src/base/single/button/button.basic.js
  2. 6
      src/case/segment/button.segment.js

10
src/base/single/button/button.basic.js

@ -381,12 +381,18 @@ BI.BasicButton = BI.inherit(BI.Single, {
setText: function (text) { setText: function (text) {
this.options.text = text; this.options.text = text;
this.options.setText && this.options.setText.call(this, text);
}, },
getText: function () { getText: function () {
return this.options.text; return this.options.text;
}, },
setValue: function (text) {
BI.BasicButton.superclass.setValue.apply(this, arguments);
this.options.setText && this.options.setText.call(this, text);
},
_setEnable: function (enable) { _setEnable: function (enable) {
BI.BasicButton.superclass._setEnable.apply(this, arguments); BI.BasicButton.superclass._setEnable.apply(this, arguments);
if (enable === true) { if (enable === true) {
@ -404,10 +410,6 @@ BI.BasicButton = BI.inherit(BI.Single, {
empty: function () { empty: function () {
BI.Widget._renderEngine.createElement(document).unbind("mouseup." + this.getName()); BI.Widget._renderEngine.createElement(document).unbind("mouseup." + this.getName());
BI.BasicButton.superclass.empty.apply(this, arguments); BI.BasicButton.superclass.empty.apply(this, arguments);
},
destroy: function () {
BI.BasicButton.superclass.destroy.apply(this, arguments);
} }
}); });
BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE"; BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";

6
src/case/segment/button.segment.js

@ -41,10 +41,6 @@ BI.SegmentButton = BI.inherit(BI.BasicButton, {
setText: function (text) { setText: function (text) {
BI.SegmentButton.superclass.setText.apply(this, arguments); BI.SegmentButton.superclass.setText.apply(this, arguments);
this.text.setText(text); this.text.setText(text);
},
destroy: function () {
BI.SegmentButton.superclass.destroy.apply(this, arguments);
} }
}); });
BI.shortcut("bi.segment_button", BI.SegmentButton); BI.shortcut("bi.segment_button", BI.SegmentButton);

Loading…
Cancel
Save