Browse Source

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

* commit '4133468906ab31d814217e85ecd581b277bba845':
  REPORT-18389 fix: 限制日期后,年份的选择
  REPORT-18332 feat: allowEdit
  KERNEL-749 事件补充与事件名统一
es6
guy 5 years ago
parent
commit
15a89ae3f8
  1. 2
      src/base/single/button/buttons/button.icon.js
  2. 2
      src/base/single/button/buttons/button.image.js
  3. 10
      src/base/single/editor/editor.multifile.js
  4. 2
      src/base/single/input/checkbox/checkbox.image.js
  5. 2
      src/base/single/input/checkbox/checkbox.js
  6. 2
      src/base/single/input/file.js
  7. 2
      src/base/single/input/radio/radio.image.js
  8. 2
      src/base/single/input/radio/radio.js
  9. 2
      src/case/button/icon/icon.change.js
  10. 2
      src/case/button/icon/icon.trigger.js
  11. 2
      src/case/button/icon/iconhalf/icon.half.image.js
  12. 2
      src/case/button/icon/iconhalf/icon.half.js
  13. 5
      src/case/button/item.singleselect.js
  14. 4
      src/case/button/item.singleselect.radio.js
  15. 5
      src/case/calendar/calendar.year.js
  16. 2
      src/case/colorchooser/colorchooser.custom.js
  17. 2
      src/case/colorchooser/colorchooser.js
  18. 4
      src/case/colorchooser/colorchooser.popup.js
  19. 4
      src/case/colorchooser/colorchooser.popup.simple.js
  20. 2
      src/case/colorchooser/colorchooser.simple.js
  21. 2
      src/case/colorchooser/colorchooser.trigger.js
  22. 2
      src/case/colorchooser/colorchooser.trigger.long.js
  23. 2
      src/case/colorchooser/colorpicker/button/button.colorpicker.js
  24. 2
      src/case/colorchooser/colorpicker/colorpicker.js
  25. 2
      src/case/colorchooser/colorpicker/editor.colorpicker.js
  26. 2
      src/case/colorchooser/colorpicker/editor.colorpicker.simple.js
  27. 2
      src/case/colorchooser/farbtastic/farbtastic.js
  28. 2
      src/case/layer/panel.js
  29. 2
      src/case/toolbar/toolbar.multiselect.js
  30. 2
      src/case/trigger/trigger.editor.js
  31. 2
      src/component/allvaluechooser/pane.allvaluechooser.js
  32. 2
      src/component/treevaluechooser/pane.treevaluechooser.js
  33. 2
      src/component/valuechooser/pane.valuechooser.js
  34. 2
      src/core/listener/listener.show.js
  35. 2
      src/core/utils/aes.js
  36. 5
      src/widget/date/calendar/popup.year.js
  37. 2
      src/widget/multilayerselecttree/multilayerselecttree.leveltree.js
  38. 2
      src/widget/multilayersingletree/multilayersingletree.leveltree.js
  39. 4
      src/widget/multiselect/multiselect.combo.js
  40. 2
      src/widget/multiselectlist/multiselectlist.insert.js
  41. 2
      src/widget/multiselectlist/multiselectlist.insert.nobar.js
  42. 2
      src/widget/multiselectlist/multiselectlist.js
  43. 2
      src/widget/multiselecttree/multiselecttree.js
  44. 4
      src/widget/multiselecttree/multiselecttree.popup.js
  45. 4
      src/widget/singleselect/singleselect.combo.js
  46. 4
      src/widget/singleselect/singleselect.insert.combo.js
  47. 5
      src/widget/singleselect/singleselect.item.js
  48. 17
      src/widget/singleselect/singleselect.trigger.js
  49. 2
      src/widget/singleselect/singleselectlist.insert.js
  50. 2
      src/widget/singletree/singletree.combo.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);

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

@ -83,5 +83,5 @@ BI.ImageButton = BI.inherit(BI.BasicButton, {
}
}
});
BI.ImageButton.EVENT_CHANGE = "ImageButton.EVENT_CHANGE";
BI.ImageButton.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.image_button", BI.ImageButton);

10
src/base/single/editor/editor.multifile.js

@ -82,9 +82,9 @@ BI.MultifileEditor = BI.inherit(BI.Widget, {
this.file.reset();
}
});
BI.MultifileEditor.EVENT_CHANGE = "MultifileEditor.EVENT_CHANGE";
BI.MultifileEditor.EVENT_UPLOADSTART = "MultifileEditor.EVENT_UPLOADSTART";
BI.MultifileEditor.EVENT_ERROR = "MultifileEditor.EVENT_ERROR";
BI.MultifileEditor.EVENT_PROGRESS = "MultifileEditor.EVENT_PROGRESS";
BI.MultifileEditor.EVENT_UPLOADED = "MultifileEditor.EVENT_UPLOADED";
BI.MultifileEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultifileEditor.EVENT_UPLOADSTART = "EVENT_UPLOADSTART";
BI.MultifileEditor.EVENT_ERROR = "EVENT_ERROR";
BI.MultifileEditor.EVENT_PROGRESS = "EVENT_PROGRESS";
BI.MultifileEditor.EVENT_UPLOADED = "EVENT_UPLOADED";
BI.shortcut("bi.multifile_editor", BI.MultifileEditor);

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

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

2
src/base/single/input/checkbox/checkbox.js

@ -56,6 +56,6 @@ BI.Checkbox = BI.inherit(BI.BasicButton, {
}
}
});
BI.Checkbox.EVENT_CHANGE = "Checkbox.EVENT_CHANGE";
BI.Checkbox.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.checkbox", BI.Checkbox);

2
src/base/single/input/file.js

@ -617,7 +617,7 @@
}
}
});
BI.File.EVENT_CHANGE = "BI.File.EVENT_CHANGE";
BI.File.EVENT_CHANGE = "EVENT_CHANGE";
BI.File.EVENT_UPLOADSTART = "EVENT_UPLOADSTART";
BI.File.EVENT_ERROR = "EVENT_ERROR";
BI.File.EVENT_PROGRESS = "EVENT_PROGRESS";

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

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

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

@ -57,6 +57,6 @@ BI.Radio = BI.inherit(BI.BasicButton, {
}
}
});
BI.Radio.EVENT_CHANGE = "Radio.EVENT_CHANGE";
BI.Radio.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.radio", BI.Radio);

2
src/case/button/icon/icon.change.js

@ -79,5 +79,5 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
}
}
});
BI.IconChangeButton.EVENT_CHANGE = "IconChangeButton.EVENT_CHANGE";
BI.IconChangeButton.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.icon_change_button", BI.IconChangeButton);

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

@ -26,5 +26,5 @@ BI.TriggerIconButton = BI.inherit(BI.IconButton, {
}
}
});
BI.TriggerIconButton.EVENT_CHANGE = "TriggerIconButton.EVENT_CHANGE";
BI.TriggerIconButton.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.trigger_icon_button", BI.TriggerIconButton);

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

@ -27,6 +27,6 @@ BI.HalfIconButton = BI.inherit(BI.IconButton, {
}
}
});
BI.HalfIconButton.EVENT_CHANGE = "HalfIconButton.EVENT_CHANGE";
BI.HalfIconButton.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.half_icon_button", BI.HalfIconButton);

2
src/case/button/icon/iconhalf/icon.half.js

@ -35,6 +35,6 @@ BI.HalfButton = BI.inherit(BI.BasicButton, {
}
}
});
BI.HalfButton.EVENT_CHANGE = "HalfIconButton.EVENT_CHANGE";
BI.HalfButton.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.half_button", BI.HalfButton);

5
src/case/button/item.singleselect.js

@ -43,7 +43,7 @@ BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
doClick: function () {
BI.SingleSelectItem.superclass.doClick.apply(this, arguments);
if (this.isValid()) {
this.fireEvent(BI.MultiSelectItem.EVENT_CHANGE, this.getValue(), this);
this.fireEvent(BI.SingleSelectItem.EVENT_CHANGE, this.isSelected(), this);
}
},
@ -51,5 +51,6 @@ BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
BI.SingleSelectItem.superclass.setSelected.apply(this, arguments);
}
});
BI.SingleSelectItem.EVENT_CHANGE = "SingleSelectItem.EVENT_CHANGE";
BI.SingleSelectItem.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_item", BI.SingleSelectItem);

4
src/case/button/item.singleselect.radio.js

@ -56,6 +56,9 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
doClick: function () {
BI.SingleSelectRadioItem.superclass.doClick.apply(this, arguments);
this.radio.setSelected(this.isSelected());
if (this.isValid()) {
this.fireEvent(BI.SingleSelectItem.EVENT_CHANGE, this.isSelected(), this);
}
},
setSelected: function (v) {
@ -65,4 +68,5 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
}
});
BI.SingleSelectItem.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_radio_item", BI.SingleSelectRadioItem);

5
src/case/calendar/calendar.year.js

@ -24,9 +24,12 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
Y = Y | 0;
var start = BI.YearCalendar.getStartYear(Y);
var items = [];
// 对于年控件来说,只要传入的minDate和maxDate的year区间包含v就是合法的
var startDate = BI.parseDateTime(o.min, "%Y-%X-%d");
var endDate = BI.parseDateTime(o.max, "%Y-%X-%d");
BI.each(BI.range(BI.YearCalendar.INTERVAL), function (i) {
var td = {};
if (BI.checkDateVoid(start + i, 1, 1, o.min, o.max)[0]) {
if (BI.checkDateVoid(start + i, 1, 1, BI.print(BI.getDate(startDate.getFullYear(), 0, 1), "%Y-%X-%d"), BI.print(BI.getDate(endDate.getFullYear(), 0, 1), "%Y-%X-%d"))[0]) {
td.disabled = true;
}
td.text = start + i;

2
src/case/colorchooser/colorchooser.custom.js

@ -65,5 +65,5 @@ BI.CustomColorChooser = BI.inherit(BI.Widget, {
return this.editor.getValue();
}
});
BI.CustomColorChooser.EVENT_CHANGE = "CustomColorChooser.EVENT_CHANGE";
BI.CustomColorChooser.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.custom_color_chooser", BI.CustomColorChooser);

2
src/case/colorchooser/colorchooser.js

@ -104,5 +104,5 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
return this.combo.getValue();
}
});
BI.ColorChooser.EVENT_CHANGE = "ColorChooser.EVENT_CHANGE";
BI.ColorChooser.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.color_chooser", BI.ColorChooser);

4
src/case/colorchooser/colorchooser.popup.js

@ -220,6 +220,6 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
return this.colorEditor.getValue();
}
});
BI.ColorChooserPopup.EVENT_VALUE_CHANGE = "ColorChooserPopup.EVENT_VALUE_CHANGE";
BI.ColorChooserPopup.EVENT_CHANGE = "ColorChooserPopup.EVENT_CHANGE";
BI.ColorChooserPopup.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE";
BI.ColorChooserPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.color_chooser_popup", BI.ColorChooserPopup);

4
src/case/colorchooser/colorchooser.popup.simple.js

@ -44,6 +44,6 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
return this.popup.getValue();
}
});
BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE = "ColorChooserPopup.EVENT_VALUE_CHANGE";
BI.SimpleColorChooserPopup.EVENT_CHANGE = "ColorChooserPopup.EVENT_CHANGE";
BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE";
BI.SimpleColorChooserPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.simple_color_chooser_popup", BI.SimpleColorChooserPopup);

2
src/case/colorchooser/colorchooser.simple.js

@ -54,5 +54,5 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
return this.combo.getValue();
}
});
BI.SimpleColorChooser.EVENT_CHANGE = "ColorChooser.EVENT_CHANGE";
BI.SimpleColorChooser.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.simple_color_chooser", BI.SimpleColorChooser);

2
src/case/colorchooser/colorchooser.trigger.js

@ -61,5 +61,5 @@ BI.ColorChooserTrigger = BI.inherit(BI.Trigger, {
}
}
});
BI.ColorChooserTrigger.EVENT_CHANGE = "ColorChooserTrigger.EVENT_CHANGE";
BI.ColorChooserTrigger.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.color_chooser_trigger", BI.ColorChooserTrigger);

2
src/case/colorchooser/colorchooser.trigger.long.js

@ -93,5 +93,5 @@ BI.LongColorChooserTrigger = BI.inherit(BI.Trigger, {
}
}
});
BI.LongColorChooserTrigger.EVENT_CHANGE = "ColorChooserTrigger.EVENT_CHANGE";
BI.LongColorChooserTrigger.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.long_color_chooser_trigger", BI.LongColorChooserTrigger);

2
src/case/colorchooser/colorpicker/button/button.colorpicker.js

@ -56,5 +56,5 @@ BI.ColorPickerButton = BI.inherit(BI.BasicButton, {
BI.Maskers[b ? "show" : "hide"](this.getName());
}
});
BI.ColorPickerButton.EVENT_CHANGE = "ColorPickerButton.EVENT_CHANGE";
BI.ColorPickerButton.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.color_picker_button", BI.ColorPickerButton);

2
src/case/colorchooser/colorpicker/colorpicker.js

@ -186,5 +186,5 @@ BI.ColorPicker = BI.inherit(BI.Widget, {
return this.colors.getValue();
}
});
BI.ColorPicker.EVENT_CHANGE = "ColorPicker.EVENT_CHANGE";
BI.ColorPicker.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.color_picker", BI.ColorPicker);

2
src/case/colorchooser/colorpicker/editor.colorpicker.js

@ -240,5 +240,5 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
}));
}
});
BI.ColorPickerEditor.EVENT_CHANGE = "ColorPickerEditor.EVENT_CHANGE";
BI.ColorPickerEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.color_picker_editor", BI.ColorPickerEditor);

2
src/case/colorchooser/colorpicker/editor.colorpicker.simple.js

@ -106,5 +106,5 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
}));
}
});
BI.SimpleColorPickerEditor.EVENT_CHANGE = "ColorPickerEditor.EVENT_CHANGE";
BI.SimpleColorPickerEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.simple_color_picker_editor", BI.SimpleColorPickerEditor);

2
src/case/colorchooser/farbtastic/farbtastic.js

@ -276,5 +276,5 @@ BI.Farbtastic = BI.inherit(BI.BasicButton, {
return this.value;
}
});
BI.Farbtastic.EVENT_CHANGE = "Farbtastic.EVENT_CHANGE";
BI.Farbtastic.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.farbtastic", BI.Farbtastic);

2
src/case/layer/panel.js

@ -74,6 +74,6 @@ BI.Panel = BI.inherit(BI.Widget, {
this.text.setValue(title);
}
});
BI.Panel.EVENT_CHANGE = "Panel.EVENT_CHANGE";
BI.Panel.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.panel", BI.Panel);

2
src/case/toolbar/toolbar.multiselect.js

@ -135,5 +135,5 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
}
}
});
BI.MultiSelectBar.EVENT_CHANGE = "MultiSelectBar.EVENT_CHANGE";
BI.MultiSelectBar.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.multi_select_bar", BI.MultiSelectBar);

2
src/case/trigger/trigger.editor.js

@ -76,5 +76,5 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
this.editor.setState(text);
}
});
BI.EditorTrigger.EVENT_CHANGE = "BI.EditorTrigger.EVENT_CHANGE";
BI.EditorTrigger.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.editor_trigger", BI.EditorTrigger);

2
src/component/allvaluechooser/pane.allvaluechooser.js

@ -60,5 +60,5 @@ BI.AllValueChooserPane = BI.inherit(BI.AbstractAllValueChooser, {
this.list.populate.apply(this.list, arguments);
}
});
BI.AllValueChooserPane.EVENT_CHANGE = "AllValueChooserPane.EVENT_CHANGE";
BI.AllValueChooserPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);

2
src/component/treevaluechooser/pane.treevaluechooser.js

@ -49,5 +49,5 @@ BI.TreeValueChooserPane = BI.inherit(BI.AbstractTreeValueChooser, {
this.pane.populate.apply(this.pane, arguments);
}
});
BI.TreeValueChooserPane.EVENT_CHANGE = "TreeValueChooserPane.EVENT_CHANGE";
BI.TreeValueChooserPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.tree_value_chooser_pane", BI.TreeValueChooserPane);

2
src/component/valuechooser/pane.valuechooser.js

@ -54,5 +54,5 @@ BI.ValueChooserPane = BI.inherit(BI.AbstractValueChooser, {
this.list.populate.apply(this.list, arguments);
}
});
BI.ValueChooserPane.EVENT_CHANGE = "ValueChooserPane.EVENT_CHANGE";
BI.ValueChooserPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);

2
src/core/listener/listener.show.js

@ -46,4 +46,4 @@ BI.ShowListener = BI.inherit(BI.OB, {
}
}
});
BI.ShowListener.EVENT_CHANGE = "ShowListener.EVENT_CHANGE";
BI.ShowListener.EVENT_CHANGE = "EVENT_CHANGE";

2
src/core/utils/aes.js

@ -2317,7 +2317,7 @@
*
* var ciphertext = BI.aesEncrypt(text, key);
*/
aesEncrypt: function (text, key) {
encrypt: function (text, key) {
key = CryptoJS.enc.Utf8.parse(key);
var cipher = CryptoJS.AES.encrypt(text, key, {
mode: CryptoJS.mode.ECB,

5
src/widget/date/calendar/popup.year.js

@ -95,7 +95,10 @@ BI.YearPopup = BI.inherit(BI.Widget, {
setValue: function (v) {
var o = this.options;
v = BI.parseInt(v);
if (BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]) {
// 对于年控件来说,只要传入的minDate和maxDate的year区间包含v就是合法的
var startDate = BI.parseDateTime(o.min, "%Y-%X-%d");
var endDate = BI.parseDateTime(o.max, "%Y-%X-%d");
if (BI.checkDateVoid(v, 1, 1, BI.print(BI.getDate(startDate.getFullYear(), 0, 1), "%Y-%X-%d"), BI.print(BI.getDate(endDate.getFullYear(), 0, 1), "%Y-%X-%d"))[0]) {
v = BI.getDate().getFullYear();
this.selectedYear = "";
this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));

2
src/widget/multilayerselecttree/multilayerselecttree.leveltree.js

@ -98,7 +98,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
(op.times === 1 && !op.node) && self._populate(ob.items);
callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items), op.node ? op.node.layer + 1 : 0, op.node));
self.setValue(self.storeValue);
(op.times === 1 && !op.node) && BI.nextTick(function () {

2
src/widget/multilayersingletree/multilayersingletree.leveltree.js

@ -98,7 +98,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
(op.times === 1 && !op.node) && self._populate(ob.items);
callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items), op.node ? op.node.layer + 1 : 0, op.node));
self.setValue(self.storeValue);
(op.times === 1 && !op.node) && BI.nextTick(function () {

4
src/widget/multiselect/multiselect.combo.js

@ -13,7 +13,8 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
height: 24,
attributes: {
tabIndex: 0
}
},
allowEdit: true
});
},
@ -35,6 +36,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
text: o.text,
// adapter: this.popup,

2
src/widget/multiselectlist/multiselectlist.insert.js

@ -332,5 +332,5 @@ BI.extend(BI.MultiSelectInsertList, {
REQ_GET_ALL_DATA: -1
});
BI.MultiSelectInsertList.EVENT_CHANGE = "BI.MultiSelectInsertList.EVENT_CHANGE";
BI.MultiSelectInsertList.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.multi_select_insert_list", BI.MultiSelectInsertList);

2
src/widget/multiselectlist/multiselectlist.insert.nobar.js

@ -342,5 +342,5 @@ BI.extend(BI.MultiSelectInsertNoBarList, {
REQ_GET_ALL_DATA: -1
});
BI.MultiSelectInsertNoBarList.EVENT_CHANGE = "BI.MultiSelectInsertNoBarList.EVENT_CHANGE";
BI.MultiSelectInsertNoBarList.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.multi_select_insert_no_bar_list", BI.MultiSelectInsertNoBarList);

2
src/widget/multiselectlist/multiselectlist.js

@ -344,5 +344,5 @@ BI.extend(BI.MultiSelectList, {
REQ_GET_ALL_DATA: -1
});
BI.MultiSelectList.EVENT_CHANGE = "BI.MultiSelectList.EVENT_CHANGE";
BI.MultiSelectList.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.multi_select_list", BI.MultiSelectList);

2
src/widget/multiselecttree/multiselecttree.js

@ -163,5 +163,5 @@ BI.MultiSelectTree = BI.inherit(BI.Single, {
this.adapter.populate.apply(this.adapter, arguments);
}
});
BI.MultiSelectTree.EVENT_CHANGE = "BI.MultiSelectTree.EVENT_CHANGE";
BI.MultiSelectTree.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.multi_select_tree", BI.MultiSelectTree);

4
src/widget/multiselecttree/multiselecttree.popup.js

@ -52,6 +52,6 @@ BI.MultiSelectTreePopup = BI.inherit(BI.Widget, {
}
});
BI.MultiSelectTreePopup.EVENT_AFTER_INIT = "BI.MultiSelectTreePopup.EVENT_AFTER_INIT";
BI.MultiSelectTreePopup.EVENT_CHANGE = "BI.MultiSelectTreePopup.EVENT_CHANGE";
BI.MultiSelectTreePopup.EVENT_AFTER_INIT = "EVENT_AFTER_INIT";
BI.MultiSelectTreePopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.multi_select_tree_popup", BI.MultiSelectTreePopup);

4
src/widget/singleselect/singleselect.combo.js

@ -14,7 +14,8 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
height: 24,
attributes: {
tabIndex: 0
}
},
allowEdit: true
});
},
@ -35,6 +36,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
height: o.height,
// adapter: this.popup,
allowNoSelect: o.allowNoSelect,
allowEdit: o.allowEdit,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
o.itemsCreator(op, function (res) {

4
src/widget/singleselect/singleselect.insert.combo.js

@ -14,7 +14,8 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
height: 24,
attributes: {
tabIndex: 0
}
},
allowEdit: true
});
},
@ -34,6 +35,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
type: "bi.single_select_trigger",
height: o.height,
allowNoSelect: o.allowNoSelect,
allowEdit: o.allowEdit,
// adapter: this.popup,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {

5
src/widget/singleselect/singleselect.item.js

@ -55,6 +55,9 @@ BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
doClick: function () {
BI.SingleSelectComboItem.superclass.doClick.apply(this, arguments);
this.radio.setSelected(this.isSelected());
if (this.isValid()) {
this.fireEvent(BI.SingleSelectComboItem.EVENT_CHANGE, this.isSelected(), this);
}
},
setSelected: function (v) {
@ -63,5 +66,5 @@ BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
}
});
BI.SingleSelectComboItem.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_combo_item", BI.SingleSelectComboItem);

17
src/widget/singleselect/singleselect.trigger.js

@ -23,7 +23,8 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -75,6 +76,20 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
},
getSearcher: function () {

2
src/widget/singleselect/singleselectlist.insert.js

@ -233,5 +233,5 @@ BI.extend(BI.SingleSelectInsertList, {
REQ_GET_ALL_DATA: -1
});
BI.SingleSelectInsertList.EVENT_CHANGE = "BI.SingleSelectInsertList.EVENT_CHANGE";
BI.SingleSelectInsertList.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_insert_list", BI.SingleSelectInsertList);

2
src/widget/singletree/singletree.combo.js

@ -76,6 +76,6 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, {
}
});
BI.SingleTreeCombo.EVENT_CHANGE = "SingleTreeCombo.EVENT_CHANGE";
BI.SingleTreeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.single_tree_combo", BI.SingleTreeCombo);
Loading…
Cancel
Save