Browse Source

KERNEL-749 修改doClick

es6
windy 6 years ago
parent
commit
36b4461d1d
  1. 2
      src/base/single/button/buttons/button.icon.js
  2. 13
      src/base/single/input/checkbox/checkbox.image.js
  3. 2
      src/base/single/input/radio/radio.image.js
  4. 13
      src/case/button/icon/icon.trigger.js
  5. 13
      src/case/button/icon/iconhalf/icon.half.image.js
  6. 4
      src/case/checkbox/check.arrownode.js
  7. 3
      src/case/checkbox/check.first.treenode.js
  8. 3
      src/case/checkbox/check.last.treenode.js
  9. 3
      src/case/checkbox/check.mid.treenode.js
  10. 3
      src/case/checkbox/check.treenode.js

2
src/base/single/button/buttons/button.icon.js

@ -48,5 +48,5 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
} }
} }
}); });
BI.IconButton.EVENT_CHANGE = "IconButton.EVENT_CHANGE"; BI.IconButton.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.icon_button", BI.IconButton); BI.shortcut("bi.icon_button", BI.IconButton);

13
src/base/single/input/checkbox/checkbox.image.js

@ -15,19 +15,8 @@ BI.ImageCheckbox = BI.inherit(BI.IconButton, {
iconWidth: 16, iconWidth: 16,
iconHeight: 16 iconHeight: 16
}); });
},
_init: function () {
BI.ImageCheckbox.superclass._init.apply(this, arguments);
},
doClick: function () {
BI.ImageCheckbox.superclass.doClick.apply(this, arguments);
if(this.isValid()) {
this.fireEvent(BI.Checkbox.EVENT_CHANGE);
}
} }
}); });
BI.ImageCheckbox.EVENT_CHANGE = "EVENT_CHANGE"; BI.ImageCheckbox.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;
BI.shortcut("bi.image_checkbox", BI.ImageCheckbox); BI.shortcut("bi.image_checkbox", BI.ImageCheckbox);

2
src/base/single/input/radio/radio.image.js

@ -28,6 +28,6 @@ BI.ImageRadio = BI.inherit(BI.IconButton, {
} }
} }
}); });
BI.ImageRadio.EVENT_CHANGE = "EVENT_CHANGE"; BI.ImageRadio.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;
BI.shortcut("bi.image_radio", BI.ImageRadio); BI.shortcut("bi.image_radio", BI.ImageRadio);

13
src/case/button/icon/icon.trigger.js

@ -13,18 +13,7 @@ BI.TriggerIconButton = BI.inherit(BI.IconButton, {
baseCls: (conf.baseCls || "") + " bi-trigger-icon-button", baseCls: (conf.baseCls || "") + " bi-trigger-icon-button",
extraCls: "pull-down-font" extraCls: "pull-down-font"
}); });
},
_init: function () {
BI.TriggerIconButton.superclass._init.apply(this, arguments);
},
doClick: function () {
BI.TriggerIconButton.superclass.doClick.apply(this, arguments);
if (this.isValid()) {
this.fireEvent(BI.TriggerIconButton.EVENT_CHANGE, this);
}
} }
}); });
BI.TriggerIconButton.EVENT_CHANGE = "EVENT_CHANGE"; BI.TriggerIconButton.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;
BI.shortcut("bi.trigger_icon_button", BI.TriggerIconButton); BI.shortcut("bi.trigger_icon_button", BI.TriggerIconButton);

13
src/case/button/icon/iconhalf/icon.half.image.js

@ -14,19 +14,8 @@ BI.HalfIconButton = BI.inherit(BI.IconButton, {
iconHeight: 16, iconHeight: 16,
selected: false selected: false
}); });
},
_init: function () {
BI.HalfIconButton.superclass._init.apply(this, arguments);
},
doClick: function () {
BI.HalfIconButton.superclass.doClick.apply(this, arguments);
if(this.isValid()) {
this.fireEvent(BI.HalfIconButton.EVENT_CHANGE);
}
} }
}); });
BI.HalfIconButton.EVENT_CHANGE = "EVENT_CHANGE"; BI.HalfIconButton.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;
BI.shortcut("bi.half_icon_button", BI.HalfIconButton); BI.shortcut("bi.half_icon_button", BI.HalfIconButton);

4
src/case/checkbox/check.arrownode.js

@ -8,9 +8,7 @@ BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
extraCls: "bi-arrow-group-node-checkbox" extraCls: "bi-arrow-group-node-checkbox"
}); });
}, },
_init: function () {
BI.ArrowTreeGroupNodeCheckbox.superclass._init.apply(this, arguments);
},
setSelected: function (v) { setSelected: function (v) {
BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments); BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments);
if(v) { if(v) {

3
src/case/checkbox/check.first.treenode.js

@ -11,10 +11,7 @@ BI.FirstTreeNodeCheckbox = BI.inherit(BI.IconButton, {
iconHeight: 24 iconHeight: 24
}); });
}, },
_init: function () {
BI.FirstTreeNodeCheckbox.superclass._init.apply(this, arguments);
},
setSelected: function (v) { setSelected: function (v) {
BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this, arguments);
if(v === true) { if(v === true) {

3
src/case/checkbox/check.last.treenode.js

@ -11,10 +11,7 @@ BI.LastTreeNodeCheckbox = BI.inherit(BI.IconButton, {
iconHeight: 24 iconHeight: 24
}); });
}, },
_init: function () {
BI.LastTreeNodeCheckbox.superclass._init.apply(this, arguments);
},
setSelected: function (v) { setSelected: function (v) {
BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this, arguments);
if (v === true) { if (v === true) {

3
src/case/checkbox/check.mid.treenode.js

@ -11,10 +11,7 @@ BI.MidTreeNodeCheckbox = BI.inherit(BI.IconButton, {
iconHeight: 24 iconHeight: 24
}); });
}, },
_init: function () {
BI.MidTreeNodeCheckbox.superclass._init.apply(this, arguments);
},
setSelected: function (v) { setSelected: function (v) {
BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this, arguments);
if(v === true) { if(v === true) {

3
src/case/checkbox/check.treenode.js

@ -11,10 +11,7 @@ BI.TreeNodeCheckbox = BI.inherit(BI.IconButton, {
iconHeight: 24 iconHeight: 24
}); });
}, },
_init: function () {
BI.TreeNodeCheckbox.superclass._init.apply(this, arguments);
},
setSelected: function (v) { setSelected: function (v) {
BI.TreeNodeCheckbox.superclass.setSelected.apply(this, arguments); BI.TreeNodeCheckbox.superclass.setSelected.apply(this, arguments);
if(v) { if(v) {

Loading…
Cancel
Save