Browse Source

Merge pull request #165 in ~GUY/fineui from ~WINDY/fineui:master to master

* commit '6c76c4bc06545447923b1e72bed47b179ef7641b':
  改名
  update
es6
windy 7 years ago
parent
commit
6d80e36e7f
  1. 642
      bi/base.js
  2. 24
      bi/widget.css
  3. 260
      bi/widget.js
  4. 2
      demo/js/widget/filemanager/demo.file.manager.js
  5. 2
      demo/js/widget/numberinterval/demo.number_interval.js
  6. 24
      dist/bundle.css
  7. 260
      dist/bundle.js
  8. 2
      dist/bundle.min.css
  9. 18
      dist/bundle.min.js
  10. 4
      dist/demo.js
  11. 24
      dist/widget.css
  12. 260
      dist/widget.js
  13. 2
      docs/SUMMARY.md
  14. 2
      docs/_book/detailed/number_interval.md
  15. 2
      docs/_book/detailed/text_input/number_editor.md
  16. 2
      docs/detailed/number_interval.md
  17. 2
      docs/detailed/text_input/number_editor.md
  18. 2
      src/css/widget/numbereditor/number.editor.css
  19. 14
      src/css/widget/numberinterval/numberinterval.css
  20. 2
      src/less/widget/numbereditor/number.editor.less
  21. 10
      src/less/widget/numberinterval/numberinterval.less
  22. 4
      src/less/widget/numberinterval/popup.numberinterval.less
  23. 4
      src/less/widget/numericalinterval/popup.numericalinterval.less
  24. 26
      src/widget/numbereditor/number.editor.js
  25. 52
      src/widget/numberinterval/numberinterval.js

642
bi/base.js

@ -16403,68 +16403,68 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
key: function (e) { key: function (e) {
} }
});/** });/**
* 颜色选择 * 颜色选择
* *
* Created by GUY on 2015/11/26. * Created by GUY on 2015/11/26.
* @class BI.RichEditorTextToolbar * @class BI.RichEditorTextToolbar
* @extends BI.Widget * @extends BI.Widget
*/ */
BI.RichEditorTextToolbar = BI.inherit(BI.Widget, { BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-rich-editor-text-toolbar bi-background", baseCls: "bi-rich-editor-text-toolbar bi-background",
buttons: [ buttons: [
{type: "bi.rich_editor_size_chooser"}, {type: "bi.rich_editor_size_chooser"},
{type: "bi.rich_editor_bold_button"}, {type: "bi.rich_editor_bold_button"},
{type: "bi.rich_editor_italic_button"}, {type: "bi.rich_editor_italic_button"},
{type: "bi.rich_editor_underline_button"}, {type: "bi.rich_editor_underline_button"},
{type: "bi.rich_editor_color_chooser"}, {type: "bi.rich_editor_color_chooser"},
{type: "bi.rich_editor_background_color_chooser"}, {type: "bi.rich_editor_background_color_chooser"},
{type: "bi.rich_editor_align_left_button"}, {type: "bi.rich_editor_align_left_button"},
{type: "bi.rich_editor_align_center_button"}, {type: "bi.rich_editor_align_center_button"},
{type: "bi.rich_editor_align_right_button"}, {type: "bi.rich_editor_align_right_button"},
{type: "bi.rich_editor_param_button"}, {type: "bi.rich_editor_param_button"},
], ],
height: 28 height: 28
}); });
}, },
_init: function () { _init: function () {
BI.RichEditorTextToolbar.superclass._init.apply(this, arguments); BI.RichEditorTextToolbar.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
BI.createWidget({ BI.createWidget({
type: "bi.left", type: "bi.left",
element: this, element: this,
items: BI.map(o.buttons, function (i, btn) { items: BI.map(o.buttons, function (i, btn) {
return BI.extend(btn, { return BI.extend(btn, {
editor: o.editor editor: o.editor
}); });
}), }),
hgap: 3, hgap: 3,
vgap: 3 vgap: 3
}) })
}, },
mounted: function () { mounted: function () {
var self = this; var self = this;
if (BI.isIE9Below()) {//IE8下必须要设置unselectable才能不blur输入框 if (BI.isIE9Below()) {//IE8下必须要设置unselectable才能不blur输入框
this.element.mousedown(function () { this.element.mousedown(function () {
self._noSelect(self.element[0]); self._noSelect(self.element[0]);
}); });
this._noSelect(this.element[0]); this._noSelect(this.element[0]);
} }
}, },
_noSelect: function (element) { _noSelect: function (element) {
if (element.setAttribute && element.nodeName.toLowerCase() != 'input' && element.nodeName.toLowerCase() != 'textarea') { if (element.setAttribute && element.nodeName.toLowerCase() != 'input' && element.nodeName.toLowerCase() != 'textarea') {
element.setAttribute('unselectable', 'on'); element.setAttribute('unselectable', 'on');
} }
for (var i = 0; i < element.childNodes.length; i++) { for (var i = 0; i < element.childNodes.length; i++) {
this._noSelect(element.childNodes[i]); this._noSelect(element.childNodes[i]);
} }
} }
}); });
BI.shortcut('bi.rich_editor_text_toolbar', BI.RichEditorTextToolbar);/** BI.shortcut('bi.rich_editor_text_toolbar', BI.RichEditorTextToolbar);/**
* 富文本编辑器 * 富文本编辑器
* *
@ -16745,57 +16745,57 @@ BI.shortcut('bi.rich_editor_text_toolbar', BI.RichEditorTextToolbar);/**
} }
}); });
}()); }());
/** /**
* 颜色选择trigger * 颜色选择trigger
* *
* Created by GUY on 2015/11/26. * Created by GUY on 2015/11/26.
* @class BI.RichEditorBackgroundChooserTrigger * @class BI.RichEditorBackgroundChooserTrigger
* @extends BI.Widget * @extends BI.Widget
*/ */
BI.RichEditorBackgroundChooserTrigger = BI.inherit(BI.Widget, { BI.RichEditorBackgroundChooserTrigger = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.RichEditorBackgroundChooserTrigger.superclass._defaultConfig.apply(this, arguments); var conf = BI.RichEditorBackgroundChooserTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
width: 20, width: 20,
height: 20 height: 20
}); });
}, },
_init: function () { _init: function () {
BI.RichEditorBackgroundChooserTrigger.superclass._init.apply(this, arguments); BI.RichEditorBackgroundChooserTrigger.superclass._init.apply(this, arguments);
this.font = BI.createWidget({ this.font = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: "text-background-font" cls: "text-background-font"
}); });
this.underline = BI.createWidget({ this.underline = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: "text-color-underline-font" cls: "text-color-underline-font"
}); });
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
items: [{ items: [{
el: this.font, el: this.font,
top: 2, top: 2,
left: 2 left: 2
}, { }, {
el: this.underline, el: this.underline,
top: 7, top: 7,
left: 2 left: 2
}] }]
}) })
}, },
setValue: function (color) { setValue: function (color) {
this.underline.element.css("color", color); this.underline.element.css("color", color);
}, },
getValue: function () { getValue: function () {
return this.font.element.css("color"); return this.font.element.css("color");
} }
}); });
BI.shortcut('bi.rich_editor_background_color_chooser_trigger', BI.RichEditorBackgroundChooserTrigger);/** BI.shortcut('bi.rich_editor_background_color_chooser_trigger', BI.RichEditorBackgroundChooserTrigger);/**
* *
* Created by GUY on 2015/11/26. * Created by GUY on 2015/11/26.
@ -17063,214 +17063,214 @@ BI.RichEditorUnderlineButton = BI.inherit(BI.RichEditorAction, {
this.underline.setSelected(false); this.underline.setSelected(false);
}, },
}); });
BI.shortcut("bi.rich_editor_underline_button", BI.RichEditorUnderlineButton)/** BI.shortcut("bi.rich_editor_underline_button", BI.RichEditorUnderlineButton)/**
* 颜色选择trigger * 颜色选择trigger
* *
* Created by GUY on 2015/11/26. * Created by GUY on 2015/11/26.
* @class BI.RichEditorColorChooserTrigger * @class BI.RichEditorColorChooserTrigger
* @extends BI.Widget * @extends BI.Widget
*/ */
BI.RichEditorColorChooserTrigger = BI.inherit(BI.Widget, { BI.RichEditorColorChooserTrigger = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.RichEditorColorChooserTrigger.superclass._defaultConfig.apply(this, arguments); var conf = BI.RichEditorColorChooserTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
width: 20, width: 20,
height: 20 height: 20
}); });
}, },
_init: function () { _init: function () {
BI.RichEditorColorChooserTrigger.superclass._init.apply(this, arguments); BI.RichEditorColorChooserTrigger.superclass._init.apply(this, arguments);
this.font = BI.createWidget({ this.font = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: "text-color-font" cls: "text-color-font"
}); });
this.underline = BI.createWidget({ this.underline = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
cls: "text-color-underline-font" cls: "text-color-underline-font"
}); });
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
items: [{ items: [{
el: this.font, el: this.font,
top: 2, top: 2,
left: 2 left: 2
}, { }, {
el: this.underline, el: this.underline,
top: 7, top: 7,
left: 2 left: 2
}] }]
}) })
}, },
setValue: function (color) { setValue: function (color) {
this.underline.element.css("color", color); this.underline.element.css("color", color);
}, },
getValue: function () { getValue: function () {
return this.font.element.css("color"); return this.font.element.css("color");
} }
}); });
BI.shortcut('bi.rich_editor_color_chooser_trigger', BI.RichEditorColorChooserTrigger);/** BI.shortcut('bi.rich_editor_color_chooser_trigger', BI.RichEditorColorChooserTrigger);/**
* 颜色选择 * 颜色选择
* *
* Created by GUY on 2015/11/26. * Created by GUY on 2015/11/26.
* @class BI.RichEditorBackgroundColorChooser * @class BI.RichEditorBackgroundColorChooser
* @extends BI.RichEditorAction * @extends BI.RichEditorAction
*/ */
BI.RichEditorBackgroundColorChooser = BI.inherit(BI.RichEditorAction, { BI.RichEditorBackgroundColorChooser = BI.inherit(BI.RichEditorAction, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.RichEditorBackgroundColorChooser.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.RichEditorBackgroundColorChooser.superclass._defaultConfig.apply(this, arguments), {
width: 20, width: 20,
height: 20, height: 20,
}); });
}, },
_init: function () { _init: function () {
BI.RichEditorBackgroundColorChooser.superclass._init.apply(this, arguments); BI.RichEditorBackgroundColorChooser.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
this.colorchooser = BI.createWidget({ this.colorchooser = BI.createWidget({
type: "bi.color_chooser", type: "bi.color_chooser",
element: this, element: this,
width: o.width, width: o.width,
height: o.height, height: o.height,
el: { el: {
type: "bi.rich_editor_background_color_chooser_trigger", type: "bi.rich_editor_background_color_chooser_trigger",
title: BI.i18nText("BI-Widget_Background_Colour"), title: BI.i18nText("BI-Widget_Background_Colour"),
cls: "text-toolbar-button" cls: "text-toolbar-button"
} }
}); });
this.colorchooser.on(BI.ColorChooser.EVENT_CHANGE, function () { this.colorchooser.on(BI.ColorChooser.EVENT_CHANGE, function () {
var backgroundColor = this.getValue(); var backgroundColor = this.getValue();
o.editor.element.css({ o.editor.element.css({
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
color: BI.DOM.getContrastColor(backgroundColor) color: BI.DOM.getContrastColor(backgroundColor)
}); });
this.setValue(""); this.setValue("");
}); });
}, },
deactivate: function () { deactivate: function () {
} }
}); });
BI.shortcut('bi.rich_editor_background_color_chooser', BI.RichEditorBackgroundColorChooser);/** BI.shortcut('bi.rich_editor_background_color_chooser', BI.RichEditorBackgroundColorChooser);/**
* 颜色选择 * 颜色选择
* *
* Created by GUY on 2015/11/26. * Created by GUY on 2015/11/26.
* @class BI.RichEditorColorChooser * @class BI.RichEditorColorChooser
* @extends BI.RichEditorAction * @extends BI.RichEditorAction
*/ */
BI.RichEditorColorChooser = BI.inherit(BI.RichEditorAction, { BI.RichEditorColorChooser = BI.inherit(BI.RichEditorAction, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.RichEditorColorChooser.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.RichEditorColorChooser.superclass._defaultConfig.apply(this, arguments), {
width: 20, width: 20,
height: 20, height: 20,
command: "foreColor" command: "foreColor"
}); });
}, },
_init: function () { _init: function () {
BI.RichEditorColorChooser.superclass._init.apply(this, arguments); BI.RichEditorColorChooser.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
this.colorchooser = BI.createWidget({ this.colorchooser = BI.createWidget({
type: "bi.color_chooser", type: "bi.color_chooser",
element: this, element: this,
width: o.width, width: o.width,
height: o.height, height: o.height,
el: { el: {
type: "bi.rich_editor_color_chooser_trigger", type: "bi.rich_editor_color_chooser_trigger",
title: BI.i18nText("BI-Font_Colour"), title: BI.i18nText("BI-Font_Colour"),
cls: "text-toolbar-button" cls: "text-toolbar-button"
} }
}); });
this.colorchooser.on(BI.ColorChooser.EVENT_CHANGE, function () { this.colorchooser.on(BI.ColorChooser.EVENT_CHANGE, function () {
self.doCommand(this.getValue()); self.doCommand(this.getValue());
}); });
}, },
deactivate: function () { deactivate: function () {
this.colorchooser.setValue(""); this.colorchooser.setValue("");
} }
}); });
BI.shortcut('bi.rich_editor_color_chooser', BI.RichEditorColorChooser);/** BI.shortcut('bi.rich_editor_color_chooser', BI.RichEditorColorChooser);/**
* 字体大小选择 * 字体大小选择
* *
* Created by GUY on 2015/11/26. * Created by GUY on 2015/11/26.
* @class BI.RichEditorSizeChooser * @class BI.RichEditorSizeChooser
* @extends BI.RichEditorAction * @extends BI.RichEditorAction
*/ */
BI.RichEditorSizeChooser = BI.inherit(BI.RichEditorAction, { BI.RichEditorSizeChooser = BI.inherit(BI.RichEditorAction, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.RichEditorSizeChooser.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.RichEditorSizeChooser.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-rich-editor-size-chooser bi-border bi-card", baseCls: "bi-rich-editor-size-chooser bi-border bi-card",
command: "FontSize", command: "FontSize",
width: 50, width: 50,
height: 20 height: 20
}); });
}, },
_items: [{ _items: [{
value: 1, value: 1,
text: "1(8pt)" text: "1(8pt)"
}, { }, {
value: 2, value: 2,
text: "2(10pt)" text: "2(10pt)"
}, { }, {
value: 3, value: 3,
text: "3(12pt)" text: "3(12pt)"
}, { }, {
value: 4, value: 4,
text: "4(14pt)" text: "4(14pt)"
}, { }, {
value: 5, value: 5,
text: "5(18pt)" text: "5(18pt)"
}, { }, {
value: 6, value: 6,
text: "6(24pt)" text: "6(24pt)"
}], }],
_init: function () { _init: function () {
BI.RichEditorSizeChooser.superclass._init.apply(this, arguments); BI.RichEditorSizeChooser.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.text_trigger", type: "bi.text_trigger",
readonly: true, readonly: true,
height: o.height, height: o.height,
triggerWidth: 12, triggerWidth: 12,
text: BI.i18nText("BI-Font_Size") text: BI.i18nText("BI-Font_Size")
}); });
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
element: this, element: this,
el: this.trigger, el: this.trigger,
adjustLength: 1, adjustLength: 1,
popup: { popup: {
maxWidth: 70, maxWidth: 70,
minWidth: 70, minWidth: 70,
el: { el: {
type: "bi.button_group", type: "bi.button_group",
items: BI.createItems(this._items, { items: BI.createItems(this._items, {
type: "bi.single_select_item" type: "bi.single_select_item"
}), }),
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
}] }]
} }
} }
}); });
this.combo.on(BI.Combo.EVENT_CHANGE, function () { this.combo.on(BI.Combo.EVENT_CHANGE, function () {
var val = this.getValue()[0]; var val = this.getValue()[0];
self.doCommand(val); self.doCommand(val);
this.hideView(); this.hideView();
this.setValue([]); this.setValue([]);
}) })
} }
}); });
BI.shortcut('bi.rich_editor_size_chooser', BI.RichEditorSizeChooser);/** BI.shortcut('bi.rich_editor_size_chooser', BI.RichEditorSizeChooser);/**
* 富文本编辑器 * 富文本编辑器
* *

24
bi/widget.css

@ -68,11 +68,6 @@
background-color: #191b2b; background-color: #191b2b;
color: #999999; color: #999999;
} }
.bi-fine-tuning-number-editor {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-interactive-arrangement .interactive-arrangement-dragtag-line { .bi-interactive-arrangement .interactive-arrangement-dragtag-line {
z-index: 1000000000; z-index: 1000000000;
background-color: #f07d0a; background-color: #f07d0a;
@ -139,7 +134,12 @@
color: #3f8ce8; color: #3f8ce8;
z-index: 1; z-index: 1;
} }
.bi-numerical-interval .numerical-interval-small-editor { .bi-number-editor {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-number-interval .number-interval-small-editor {
-moz-border-radius-topleft: 2px; -moz-border-radius-topleft: 2px;
-webkit-border-top-left-radius: 2px; -webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px; -moz-border-radius-bottomleft: 2px;
@ -147,7 +147,7 @@
border-top-left-radius: 2px; border-top-left-radius: 2px;
border-bottom-left-radius: 2px; border-bottom-left-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-big-editor { .bi-number-interval .number-interval-big-editor {
-moz-border-radius-topright: 2px; -moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px; -webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px; -moz-border-radius-bottomright: 2px;
@ -155,7 +155,7 @@
border-top-right-radius: 2px; border-top-right-radius: 2px;
border-bottom-right-radius: 2px; border-bottom-right-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-big-combo { .bi-number-interval .number-interval-big-combo {
-moz-border-radius-topleft: 2px; -moz-border-radius-topleft: 2px;
-webkit-border-top-left-radius: 2px; -webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px; -moz-border-radius-bottomleft: 2px;
@ -163,10 +163,10 @@
border-top-left-radius: 2px; border-top-left-radius: 2px;
border-bottom-left-radius: 2px; border-bottom-left-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon { .bi-number-interval .number-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon {
font-size: 14px; font-size: 14px;
} }
.bi-numerical-interval .numerical-interval-small-combo { .bi-number-interval .number-interval-small-combo {
-moz-border-radius-topright: 2px; -moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px; -webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px; -moz-border-radius-bottomright: 2px;
@ -174,10 +174,10 @@
border-top-right-radius: 2px; border-top-right-radius: 2px;
border-bottom-right-radius: 2px; border-bottom-right-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon { .bi-number-interval .number-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon {
font-size: 14px; font-size: 14px;
} }
.bi-numerical-interval.number-error .bi-input { .bi-number-interval.number-error .bi-input {
color: #e85050; color: #e85050;
} }
.bi-page-table-cell { .bi-page-table-cell {

260
bi/widget.js

@ -5376,109 +5376,6 @@ BI.extend(BI.FileManagerNav, {
}); });
BI.FileManagerNav.EVENT_CHANGE = "FileManagerNav.EVENT_CHANGE"; BI.FileManagerNav.EVENT_CHANGE = "FileManagerNav.EVENT_CHANGE";
BI.shortcut("bi.file_manager_nav", BI.FileManagerNav);/** BI.shortcut("bi.file_manager_nav", BI.FileManagerNav);/**
* Created by windy on 2017/3/13.
* 数值微调器
*/
BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.FineTuningNumberEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-fine-tuning-number-editor bi-border",
validationChecker: function () {return true;},
valueFormatter: function (v) {return v;},
value: 0,
errorText: "",
step: 1
})
},
_init: function () {
BI.FineTuningNumberEditor.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
value: o.valueFormatter(o.value),
validationChecker: o.validationChecker,
errorText: o.errorText
});
this.editor.on(BI.TextEditor.EVENT_CHANGE, function () {
o.value = this.getValue();
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE);
});
this.editor.on(BI.TextEditor.EVENT_CONFIRM, function(){
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM);
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(o.step);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM);
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-next-page-h-font bottom-button bi-border-left bi-border-top"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(-o.step);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM);
});
BI.createWidget({
type: "bi.htape",
element: this,
items: [this.editor, {
el: {
type: "bi.grid",
columns: 1,
rows: 2,
items: [{
column: 0,
row: 0,
el: this.topBtn
}, {
column: 0,
row: 1,
el: this.bottomBtn
}]
},
width: 23
}]
});
},
//微调
_finetuning: function(add){
var v = BI.parseFloat(this.getValue());
this.setValue(v.add(add));
},
setUpEnable: function (v) {
this.topBtn.setEnable(!!v);
},
setBottomEnable: function (v) {
this.bottomBtn.setEnable(!!v);
},
getValue: function () {
return this.options.value;
},
setValue: function (v) {
var o = this.options;
o.value = v;
this.editor.setValue(o.valueFormatter(v));
}
});
BI.FineTuningNumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.FineTuningNumberEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.fine_tuning_number_editor", BI.FineTuningNumberEditor);/**
* 交互行为布局 * 交互行为布局
* *
* *
@ -11719,13 +11616,116 @@ BI.MultiTreeSearcher.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiTreeSearcher.EVENT_START = "EVENT_START"; BI.MultiTreeSearcher.EVENT_START = "EVENT_START";
BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP"; BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut('bi.multi_tree_searcher', BI.MultiTreeSearcher);//小于号的值为:0,小于等于号的值为:1 BI.shortcut('bi.multi_tree_searcher', BI.MultiTreeSearcher);/**
* Created by windy on 2017/3/13.
* 数值微调器
*/
BI.NumberEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-number-editor bi-border",
validationChecker: function () {return true;},
valueFormatter: function (v) {return v;},
value: 0,
errorText: "",
step: 1
})
},
_init: function () {
BI.NumberEditor.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
value: o.valueFormatter(o.value),
validationChecker: o.validationChecker,
errorText: o.errorText
});
this.editor.on(BI.TextEditor.EVENT_CHANGE, function () {
o.value = this.getValue();
self.fireEvent(BI.NumberEditor.EVENT_CHANGE);
});
this.editor.on(BI.TextEditor.EVENT_CONFIRM, function(){
self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(o.step);
self.fireEvent(BI.NumberEditor.EVENT_CHANGE);
self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-next-page-h-font bottom-button bi-border-left bi-border-top"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(-o.step);
self.fireEvent(BI.NumberEditor.EVENT_CHANGE);
self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);
});
BI.createWidget({
type: "bi.htape",
element: this,
items: [this.editor, {
el: {
type: "bi.grid",
columns: 1,
rows: 2,
items: [{
column: 0,
row: 0,
el: this.topBtn
}, {
column: 0,
row: 1,
el: this.bottomBtn
}]
},
width: 23
}]
});
},
//微调
_finetuning: function(add){
var v = BI.parseFloat(this.getValue());
this.setValue(v.add(add));
},
setUpEnable: function (v) {
this.topBtn.setEnable(!!v);
},
setBottomEnable: function (v) {
this.bottomBtn.setEnable(!!v);
},
getValue: function () {
return this.options.value;
},
setValue: function (v) {
var o = this.options;
o.value = v;
this.editor.setValue(o.valueFormatter(v));
}
});
BI.NumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.NumberEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.number_editor", BI.NumberEditor);//小于号的值为:0,小于等于号的值为:1
//closeMIn:最小值的符号,closeMax:最大值的符号 //closeMIn:最小值的符号,closeMax:最大值的符号
/** /**
* Created by roy on 15/9/17. * Created by roy on 15/9/17.
* *
*/ */
BI.NumericalInterval = BI.inherit(BI.Single, { BI.NumberInterval = BI.inherit(BI.Single, {
constants: { constants: {
typeError: "typeBubble", typeError: "typeBubble",
numberError: "numberBubble", numberError: "numberBubble",
@ -11741,16 +11741,16 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
numTip: "" numTip: ""
}, },
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.NumericalInterval.superclass._defaultConfig.apply(this, arguments) var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments)
return BI.extend(conf, { return BI.extend(conf, {
extraCls: "bi-numerical-interval", extraCls: "bi-number-interval",
height: 25, height: 25,
validation: "valid" validation: "valid"
}) })
}, },
_init: function () { _init: function () {
var self = this, c = this.constants, o = this.options; var self = this, c = this.constants, o = this.options;
BI.NumericalInterval.superclass._init.apply(this, arguments) BI.NumberInterval.superclass._init.apply(this, arguments)
this.smallEditor = BI.createWidget({ this.smallEditor = BI.createWidget({
type: "bi.editor", type: "bi.editor",
height: o.height - 2, height: o.height - 2,
@ -11769,7 +11769,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
} }
return true; return true;
}, },
cls: "numerical-interval-small-editor bi-border-top bi-border-bottom bi-border-left" cls: "number-interval-small-editor bi-border-top bi-border-bottom bi-border-left"
}); });
this.smallTip = BI.createWidget({ this.smallTip = BI.createWidget({
@ -11806,7 +11806,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
} }
return true; return true;
}, },
cls: "numerical-interval-big-editor bi-border-top bi-border-bottom bi-border-right" cls: "number-interval-big-editor bi-border-top bi-border-bottom bi-border-right"
}); });
this.bigTip = BI.createWidget({ this.bigTip = BI.createWidget({
@ -11826,23 +11826,23 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}); });
//this.smallCombo = BI.createWidget({ //this.smallCombo = BI.createWidget({
// type: "bi.numerical_interval_combo", // type: "bi.number_interval_combo",
// cls: "numerical-interval-small-combo", // cls: "number-interval-small-combo",
// height: o.height, // height: o.height,
// value: o.closemin ? 1 : 0, // value: o.closemin ? 1 : 0,
// offsetStyle: "left" // offsetStyle: "left"
//}); //});
// //
//this.bigCombo = BI.createWidget({ //this.bigCombo = BI.createWidget({
// type: "bi.numerical_interval_combo", // type: "bi.number_interval_combo",
// cls: "numerical-interval-big-combo", // cls: "number-interval-big-combo",
// height: o.height, // height: o.height,
// value: o.closemax ? 1 : 0, // value: o.closemax ? 1 : 0,
// offsetStyle: "left" // offsetStyle: "left"
//}); //});
this.smallCombo = BI.createWidget({ this.smallCombo = BI.createWidget({
type: "bi.icon_combo", type: "bi.icon_combo",
cls: "numerical-interval-small-combo bi-border", cls: "number-interval-small-combo bi-border",
height: o.height - 2, height: o.height - 2,
items: [{ items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")", text: "(" + BI.i18nText("BI-Less_Than") + ")",
@ -11861,7 +11861,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
} }
this.bigCombo = BI.createWidget({ this.bigCombo = BI.createWidget({
type: "bi.icon_combo", type: "bi.icon_combo",
cls: "numerical-interval-big-combo bi-border", cls: "number-interval-big-combo bi-border",
height: o.height - 2, height: o.height - 2,
items: [{ items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")", text: "(" + BI.i18nText("BI-Less_Than") + ")",
@ -12069,7 +12069,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "center" offsetStyle: "center"
}); });
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
}) })
}, },
@ -12082,16 +12082,16 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "center" offsetStyle: "center"
}); });
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "center" offsetStyle: "center"
}); });
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
default: default:
self.fireEvent(BI.NumericalInterval.EVENT_VALID); self.fireEvent(BI.NumberInterval.EVENT_VALID);
} }
}) })
}, },
@ -12119,7 +12119,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
default : default :
break; break;
} }
self.fireEvent(BI.NumericalInterval.EVENT_CHANGE); self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
}); });
}, },
@ -12129,19 +12129,19 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
switch (self._checkValidation()) { switch (self._checkValidation()) {
case c.typeError: case c.typeError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")); self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.numberError: case c.numberError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")); self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")); self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
default : default :
self.fireEvent(BI.NumericalInterval.EVENT_CHANGE); self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
self.fireEvent(BI.NumericalInterval.EVENT_VALID); self.fireEvent(BI.NumberInterval.EVENT_VALID);
} }
}) })
}, },
@ -12242,10 +12242,10 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
return value; return value;
} }
}); });
BI.NumericalInterval.EVENT_CHANGE = "EVENT_CHANGE"; BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumericalInterval.EVENT_VALID = "EVENT_VALID"; BI.NumberInterval.EVENT_VALID = "EVENT_VALID";
BI.NumericalInterval.EVENT_ERROR = "EVENT_ERROR"; BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.numerical_interval", BI.NumericalInterval);/** BI.shortcut("bi.number_interval", BI.NumberInterval);/**
* *
* 表格 * 表格
* *

2
demo/js/widget/filemanager/demo.file.manager.js

@ -46,7 +46,7 @@ Demo.FileManager = BI.inherit(BI.Widget, {
lastModify: 1454316355142 lastModify: 1454316355142
}]; }];
var filemanager = BI.createWidget({ var filemanager = BI.createWidget({
type: "bi.fine_tuning_number_editor", type: "bi.number_editor",
validationChecker: function (v) { validationChecker: function (v) {
return BI.parseFloat(v) <= 100 && BI.parseFloat(v) >= 0 return BI.parseFloat(v) <= 100 && BI.parseFloat(v) >= 0
}, },

2
demo/js/widget/numericalinterval/demo.numerical_interval.js → demo/js/widget/numberinterval/demo.number_interval.js

@ -24,7 +24,7 @@ Demo.NumericalInterval = BI.inherit(BI.Widget, {
return { return {
type: "bi.horizontal_auto", type: "bi.horizontal_auto",
items: [{ items: [{
type: "bi.numerical_interval", type: "bi.number_interval",
ref: function (_ref) { ref: function (_ref) {
self.numerical = _ref; self.numerical = _ref;
}, },

24
dist/bundle.css vendored

@ -3155,11 +3155,6 @@ ul.ztree.zTreeDragUL {
background-color: #191b2b; background-color: #191b2b;
color: #999999; color: #999999;
} }
.bi-fine-tuning-number-editor {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-interactive-arrangement .interactive-arrangement-dragtag-line { .bi-interactive-arrangement .interactive-arrangement-dragtag-line {
z-index: 1000000000; z-index: 1000000000;
background-color: #f07d0a; background-color: #f07d0a;
@ -3226,7 +3221,12 @@ ul.ztree.zTreeDragUL {
color: #3f8ce8; color: #3f8ce8;
z-index: 1; z-index: 1;
} }
.bi-numerical-interval .numerical-interval-small-editor { .bi-number-editor {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-number-interval .number-interval-small-editor {
-moz-border-radius-topleft: 2px; -moz-border-radius-topleft: 2px;
-webkit-border-top-left-radius: 2px; -webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px; -moz-border-radius-bottomleft: 2px;
@ -3234,7 +3234,7 @@ ul.ztree.zTreeDragUL {
border-top-left-radius: 2px; border-top-left-radius: 2px;
border-bottom-left-radius: 2px; border-bottom-left-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-big-editor { .bi-number-interval .number-interval-big-editor {
-moz-border-radius-topright: 2px; -moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px; -webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px; -moz-border-radius-bottomright: 2px;
@ -3242,7 +3242,7 @@ ul.ztree.zTreeDragUL {
border-top-right-radius: 2px; border-top-right-radius: 2px;
border-bottom-right-radius: 2px; border-bottom-right-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-big-combo { .bi-number-interval .number-interval-big-combo {
-moz-border-radius-topleft: 2px; -moz-border-radius-topleft: 2px;
-webkit-border-top-left-radius: 2px; -webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px; -moz-border-radius-bottomleft: 2px;
@ -3250,10 +3250,10 @@ ul.ztree.zTreeDragUL {
border-top-left-radius: 2px; border-top-left-radius: 2px;
border-bottom-left-radius: 2px; border-bottom-left-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon { .bi-number-interval .number-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon {
font-size: 14px; font-size: 14px;
} }
.bi-numerical-interval .numerical-interval-small-combo { .bi-number-interval .number-interval-small-combo {
-moz-border-radius-topright: 2px; -moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px; -webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px; -moz-border-radius-bottomright: 2px;
@ -3261,10 +3261,10 @@ ul.ztree.zTreeDragUL {
border-top-right-radius: 2px; border-top-right-radius: 2px;
border-bottom-right-radius: 2px; border-bottom-right-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon { .bi-number-interval .number-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon {
font-size: 14px; font-size: 14px;
} }
.bi-numerical-interval.number-error .bi-input { .bi-number-interval.number-error .bi-input {
color: #e85050; color: #e85050;
} }
.bi-page-table-cell { .bi-page-table-cell {

260
dist/bundle.js vendored

@ -84004,109 +84004,6 @@ BI.extend(BI.FileManagerNav, {
}); });
BI.FileManagerNav.EVENT_CHANGE = "FileManagerNav.EVENT_CHANGE"; BI.FileManagerNav.EVENT_CHANGE = "FileManagerNav.EVENT_CHANGE";
BI.shortcut("bi.file_manager_nav", BI.FileManagerNav);/** BI.shortcut("bi.file_manager_nav", BI.FileManagerNav);/**
* Created by windy on 2017/3/13.
* 数值微调器
*/
BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.FineTuningNumberEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-fine-tuning-number-editor bi-border",
validationChecker: function () {return true;},
valueFormatter: function (v) {return v;},
value: 0,
errorText: "",
step: 1
})
},
_init: function () {
BI.FineTuningNumberEditor.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
value: o.valueFormatter(o.value),
validationChecker: o.validationChecker,
errorText: o.errorText
});
this.editor.on(BI.TextEditor.EVENT_CHANGE, function () {
o.value = this.getValue();
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE);
});
this.editor.on(BI.TextEditor.EVENT_CONFIRM, function(){
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM);
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(o.step);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM);
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-next-page-h-font bottom-button bi-border-left bi-border-top"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(-o.step);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM);
});
BI.createWidget({
type: "bi.htape",
element: this,
items: [this.editor, {
el: {
type: "bi.grid",
columns: 1,
rows: 2,
items: [{
column: 0,
row: 0,
el: this.topBtn
}, {
column: 0,
row: 1,
el: this.bottomBtn
}]
},
width: 23
}]
});
},
//微调
_finetuning: function(add){
var v = BI.parseFloat(this.getValue());
this.setValue(v.add(add));
},
setUpEnable: function (v) {
this.topBtn.setEnable(!!v);
},
setBottomEnable: function (v) {
this.bottomBtn.setEnable(!!v);
},
getValue: function () {
return this.options.value;
},
setValue: function (v) {
var o = this.options;
o.value = v;
this.editor.setValue(o.valueFormatter(v));
}
});
BI.FineTuningNumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.FineTuningNumberEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.fine_tuning_number_editor", BI.FineTuningNumberEditor);/**
* 交互行为布局 * 交互行为布局
* *
* *
@ -90347,13 +90244,116 @@ BI.MultiTreeSearcher.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiTreeSearcher.EVENT_START = "EVENT_START"; BI.MultiTreeSearcher.EVENT_START = "EVENT_START";
BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP"; BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut('bi.multi_tree_searcher', BI.MultiTreeSearcher);//小于号的值为:0,小于等于号的值为:1 BI.shortcut('bi.multi_tree_searcher', BI.MultiTreeSearcher);/**
* Created by windy on 2017/3/13.
* 数值微调器
*/
BI.NumberEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-number-editor bi-border",
validationChecker: function () {return true;},
valueFormatter: function (v) {return v;},
value: 0,
errorText: "",
step: 1
})
},
_init: function () {
BI.NumberEditor.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
value: o.valueFormatter(o.value),
validationChecker: o.validationChecker,
errorText: o.errorText
});
this.editor.on(BI.TextEditor.EVENT_CHANGE, function () {
o.value = this.getValue();
self.fireEvent(BI.NumberEditor.EVENT_CHANGE);
});
this.editor.on(BI.TextEditor.EVENT_CONFIRM, function(){
self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(o.step);
self.fireEvent(BI.NumberEditor.EVENT_CHANGE);
self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-next-page-h-font bottom-button bi-border-left bi-border-top"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(-o.step);
self.fireEvent(BI.NumberEditor.EVENT_CHANGE);
self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);
});
BI.createWidget({
type: "bi.htape",
element: this,
items: [this.editor, {
el: {
type: "bi.grid",
columns: 1,
rows: 2,
items: [{
column: 0,
row: 0,
el: this.topBtn
}, {
column: 0,
row: 1,
el: this.bottomBtn
}]
},
width: 23
}]
});
},
//微调
_finetuning: function(add){
var v = BI.parseFloat(this.getValue());
this.setValue(v.add(add));
},
setUpEnable: function (v) {
this.topBtn.setEnable(!!v);
},
setBottomEnable: function (v) {
this.bottomBtn.setEnable(!!v);
},
getValue: function () {
return this.options.value;
},
setValue: function (v) {
var o = this.options;
o.value = v;
this.editor.setValue(o.valueFormatter(v));
}
});
BI.NumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.NumberEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.number_editor", BI.NumberEditor);//小于号的值为:0,小于等于号的值为:1
//closeMIn:最小值的符号,closeMax:最大值的符号 //closeMIn:最小值的符号,closeMax:最大值的符号
/** /**
* Created by roy on 15/9/17. * Created by roy on 15/9/17.
* *
*/ */
BI.NumericalInterval = BI.inherit(BI.Single, { BI.NumberInterval = BI.inherit(BI.Single, {
constants: { constants: {
typeError: "typeBubble", typeError: "typeBubble",
numberError: "numberBubble", numberError: "numberBubble",
@ -90369,16 +90369,16 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
numTip: "" numTip: ""
}, },
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.NumericalInterval.superclass._defaultConfig.apply(this, arguments) var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments)
return BI.extend(conf, { return BI.extend(conf, {
extraCls: "bi-numerical-interval", extraCls: "bi-number-interval",
height: 25, height: 25,
validation: "valid" validation: "valid"
}) })
}, },
_init: function () { _init: function () {
var self = this, c = this.constants, o = this.options; var self = this, c = this.constants, o = this.options;
BI.NumericalInterval.superclass._init.apply(this, arguments) BI.NumberInterval.superclass._init.apply(this, arguments)
this.smallEditor = BI.createWidget({ this.smallEditor = BI.createWidget({
type: "bi.editor", type: "bi.editor",
height: o.height - 2, height: o.height - 2,
@ -90397,7 +90397,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
} }
return true; return true;
}, },
cls: "numerical-interval-small-editor bi-border-top bi-border-bottom bi-border-left" cls: "number-interval-small-editor bi-border-top bi-border-bottom bi-border-left"
}); });
this.smallTip = BI.createWidget({ this.smallTip = BI.createWidget({
@ -90434,7 +90434,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
} }
return true; return true;
}, },
cls: "numerical-interval-big-editor bi-border-top bi-border-bottom bi-border-right" cls: "number-interval-big-editor bi-border-top bi-border-bottom bi-border-right"
}); });
this.bigTip = BI.createWidget({ this.bigTip = BI.createWidget({
@ -90454,23 +90454,23 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}); });
//this.smallCombo = BI.createWidget({ //this.smallCombo = BI.createWidget({
// type: "bi.numerical_interval_combo", // type: "bi.number_interval_combo",
// cls: "numerical-interval-small-combo", // cls: "number-interval-small-combo",
// height: o.height, // height: o.height,
// value: o.closemin ? 1 : 0, // value: o.closemin ? 1 : 0,
// offsetStyle: "left" // offsetStyle: "left"
//}); //});
// //
//this.bigCombo = BI.createWidget({ //this.bigCombo = BI.createWidget({
// type: "bi.numerical_interval_combo", // type: "bi.number_interval_combo",
// cls: "numerical-interval-big-combo", // cls: "number-interval-big-combo",
// height: o.height, // height: o.height,
// value: o.closemax ? 1 : 0, // value: o.closemax ? 1 : 0,
// offsetStyle: "left" // offsetStyle: "left"
//}); //});
this.smallCombo = BI.createWidget({ this.smallCombo = BI.createWidget({
type: "bi.icon_combo", type: "bi.icon_combo",
cls: "numerical-interval-small-combo bi-border", cls: "number-interval-small-combo bi-border",
height: o.height - 2, height: o.height - 2,
items: [{ items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")", text: "(" + BI.i18nText("BI-Less_Than") + ")",
@ -90489,7 +90489,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
} }
this.bigCombo = BI.createWidget({ this.bigCombo = BI.createWidget({
type: "bi.icon_combo", type: "bi.icon_combo",
cls: "numerical-interval-big-combo bi-border", cls: "number-interval-big-combo bi-border",
height: o.height - 2, height: o.height - 2,
items: [{ items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")", text: "(" + BI.i18nText("BI-Less_Than") + ")",
@ -90697,7 +90697,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "center" offsetStyle: "center"
}); });
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
}) })
}, },
@ -90710,16 +90710,16 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "center" offsetStyle: "center"
}); });
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "center" offsetStyle: "center"
}); });
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
default: default:
self.fireEvent(BI.NumericalInterval.EVENT_VALID); self.fireEvent(BI.NumberInterval.EVENT_VALID);
} }
}) })
}, },
@ -90747,7 +90747,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
default : default :
break; break;
} }
self.fireEvent(BI.NumericalInterval.EVENT_CHANGE); self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
}); });
}, },
@ -90757,19 +90757,19 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
switch (self._checkValidation()) { switch (self._checkValidation()) {
case c.typeError: case c.typeError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")); self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.numberError: case c.numberError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")); self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")); self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
default : default :
self.fireEvent(BI.NumericalInterval.EVENT_CHANGE); self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
self.fireEvent(BI.NumericalInterval.EVENT_VALID); self.fireEvent(BI.NumberInterval.EVENT_VALID);
} }
}) })
}, },
@ -90870,10 +90870,10 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
return value; return value;
} }
}); });
BI.NumericalInterval.EVENT_CHANGE = "EVENT_CHANGE"; BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumericalInterval.EVENT_VALID = "EVENT_VALID"; BI.NumberInterval.EVENT_VALID = "EVENT_VALID";
BI.NumericalInterval.EVENT_ERROR = "EVENT_ERROR"; BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.numerical_interval", BI.NumericalInterval);/** BI.shortcut("bi.number_interval", BI.NumberInterval);/**
* *
* 表格 * 表格
* *

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

18
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

4
dist/demo.js vendored

@ -7789,7 +7789,7 @@ Demo.FileManager = BI.inherit(BI.Widget, {
lastModify: 1454316355142 lastModify: 1454316355142
}]; }];
var filemanager = BI.createWidget({ var filemanager = BI.createWidget({
type: "bi.fine_tuning_number_editor", type: "bi.number_editor",
validationChecker: function (v) { validationChecker: function (v) {
return BI.parseFloat(v) <= 100 && BI.parseFloat(v) >= 0 return BI.parseFloat(v) <= 100 && BI.parseFloat(v) >= 0
}, },
@ -8002,7 +8002,7 @@ Demo.NumericalInterval = BI.inherit(BI.Widget, {
return { return {
type: "bi.horizontal_auto", type: "bi.horizontal_auto",
items: [{ items: [{
type: "bi.numerical_interval", type: "bi.number_interval",
ref: function (_ref) { ref: function (_ref) {
self.numerical = _ref; self.numerical = _ref;
}, },

24
dist/widget.css vendored

@ -68,11 +68,6 @@
background-color: #191b2b; background-color: #191b2b;
color: #999999; color: #999999;
} }
.bi-fine-tuning-number-editor {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-interactive-arrangement .interactive-arrangement-dragtag-line { .bi-interactive-arrangement .interactive-arrangement-dragtag-line {
z-index: 1000000000; z-index: 1000000000;
background-color: #f07d0a; background-color: #f07d0a;
@ -139,7 +134,12 @@
color: #3f8ce8; color: #3f8ce8;
z-index: 1; z-index: 1;
} }
.bi-numerical-interval .numerical-interval-small-editor { .bi-number-editor {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-number-interval .number-interval-small-editor {
-moz-border-radius-topleft: 2px; -moz-border-radius-topleft: 2px;
-webkit-border-top-left-radius: 2px; -webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px; -moz-border-radius-bottomleft: 2px;
@ -147,7 +147,7 @@
border-top-left-radius: 2px; border-top-left-radius: 2px;
border-bottom-left-radius: 2px; border-bottom-left-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-big-editor { .bi-number-interval .number-interval-big-editor {
-moz-border-radius-topright: 2px; -moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px; -webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px; -moz-border-radius-bottomright: 2px;
@ -155,7 +155,7 @@
border-top-right-radius: 2px; border-top-right-radius: 2px;
border-bottom-right-radius: 2px; border-bottom-right-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-big-combo { .bi-number-interval .number-interval-big-combo {
-moz-border-radius-topleft: 2px; -moz-border-radius-topleft: 2px;
-webkit-border-top-left-radius: 2px; -webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px; -moz-border-radius-bottomleft: 2px;
@ -163,10 +163,10 @@
border-top-left-radius: 2px; border-top-left-radius: 2px;
border-bottom-left-radius: 2px; border-bottom-left-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon { .bi-number-interval .number-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon {
font-size: 14px; font-size: 14px;
} }
.bi-numerical-interval .numerical-interval-small-combo { .bi-number-interval .number-interval-small-combo {
-moz-border-radius-topright: 2px; -moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px; -webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px; -moz-border-radius-bottomright: 2px;
@ -174,10 +174,10 @@
border-top-right-radius: 2px; border-top-right-radius: 2px;
border-bottom-right-radius: 2px; border-bottom-right-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon { .bi-number-interval .number-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon {
font-size: 14px; font-size: 14px;
} }
.bi-numerical-interval.number-error .bi-input { .bi-number-interval.number-error .bi-input {
color: #e85050; color: #e85050;
} }
.bi-page-table-cell { .bi-page-table-cell {

260
dist/widget.js vendored

@ -5376,109 +5376,6 @@ BI.extend(BI.FileManagerNav, {
}); });
BI.FileManagerNav.EVENT_CHANGE = "FileManagerNav.EVENT_CHANGE"; BI.FileManagerNav.EVENT_CHANGE = "FileManagerNav.EVENT_CHANGE";
BI.shortcut("bi.file_manager_nav", BI.FileManagerNav);/** BI.shortcut("bi.file_manager_nav", BI.FileManagerNav);/**
* Created by windy on 2017/3/13.
* 数值微调器
*/
BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.FineTuningNumberEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-fine-tuning-number-editor bi-border",
validationChecker: function () {return true;},
valueFormatter: function (v) {return v;},
value: 0,
errorText: "",
step: 1
})
},
_init: function () {
BI.FineTuningNumberEditor.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
value: o.valueFormatter(o.value),
validationChecker: o.validationChecker,
errorText: o.errorText
});
this.editor.on(BI.TextEditor.EVENT_CHANGE, function () {
o.value = this.getValue();
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE);
});
this.editor.on(BI.TextEditor.EVENT_CONFIRM, function(){
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM);
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(o.step);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM);
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-next-page-h-font bottom-button bi-border-left bi-border-top"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(-o.step);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM);
});
BI.createWidget({
type: "bi.htape",
element: this,
items: [this.editor, {
el: {
type: "bi.grid",
columns: 1,
rows: 2,
items: [{
column: 0,
row: 0,
el: this.topBtn
}, {
column: 0,
row: 1,
el: this.bottomBtn
}]
},
width: 23
}]
});
},
//微调
_finetuning: function(add){
var v = BI.parseFloat(this.getValue());
this.setValue(v.add(add));
},
setUpEnable: function (v) {
this.topBtn.setEnable(!!v);
},
setBottomEnable: function (v) {
this.bottomBtn.setEnable(!!v);
},
getValue: function () {
return this.options.value;
},
setValue: function (v) {
var o = this.options;
o.value = v;
this.editor.setValue(o.valueFormatter(v));
}
});
BI.FineTuningNumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.FineTuningNumberEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.fine_tuning_number_editor", BI.FineTuningNumberEditor);/**
* 交互行为布局 * 交互行为布局
* *
* *
@ -11719,13 +11616,116 @@ BI.MultiTreeSearcher.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiTreeSearcher.EVENT_START = "EVENT_START"; BI.MultiTreeSearcher.EVENT_START = "EVENT_START";
BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP"; BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut('bi.multi_tree_searcher', BI.MultiTreeSearcher);//小于号的值为:0,小于等于号的值为:1 BI.shortcut('bi.multi_tree_searcher', BI.MultiTreeSearcher);/**
* Created by windy on 2017/3/13.
* 数值微调器
*/
BI.NumberEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-number-editor bi-border",
validationChecker: function () {return true;},
valueFormatter: function (v) {return v;},
value: 0,
errorText: "",
step: 1
})
},
_init: function () {
BI.NumberEditor.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
value: o.valueFormatter(o.value),
validationChecker: o.validationChecker,
errorText: o.errorText
});
this.editor.on(BI.TextEditor.EVENT_CHANGE, function () {
o.value = this.getValue();
self.fireEvent(BI.NumberEditor.EVENT_CHANGE);
});
this.editor.on(BI.TextEditor.EVENT_CONFIRM, function(){
self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(o.step);
self.fireEvent(BI.NumberEditor.EVENT_CHANGE);
self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
trigger: "lclick,",
cls: "column-next-page-h-font bottom-button bi-border-left bi-border-top"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(-o.step);
self.fireEvent(BI.NumberEditor.EVENT_CHANGE);
self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);
});
BI.createWidget({
type: "bi.htape",
element: this,
items: [this.editor, {
el: {
type: "bi.grid",
columns: 1,
rows: 2,
items: [{
column: 0,
row: 0,
el: this.topBtn
}, {
column: 0,
row: 1,
el: this.bottomBtn
}]
},
width: 23
}]
});
},
//微调
_finetuning: function(add){
var v = BI.parseFloat(this.getValue());
this.setValue(v.add(add));
},
setUpEnable: function (v) {
this.topBtn.setEnable(!!v);
},
setBottomEnable: function (v) {
this.bottomBtn.setEnable(!!v);
},
getValue: function () {
return this.options.value;
},
setValue: function (v) {
var o = this.options;
o.value = v;
this.editor.setValue(o.valueFormatter(v));
}
});
BI.NumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.NumberEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.number_editor", BI.NumberEditor);//小于号的值为:0,小于等于号的值为:1
//closeMIn:最小值的符号,closeMax:最大值的符号 //closeMIn:最小值的符号,closeMax:最大值的符号
/** /**
* Created by roy on 15/9/17. * Created by roy on 15/9/17.
* *
*/ */
BI.NumericalInterval = BI.inherit(BI.Single, { BI.NumberInterval = BI.inherit(BI.Single, {
constants: { constants: {
typeError: "typeBubble", typeError: "typeBubble",
numberError: "numberBubble", numberError: "numberBubble",
@ -11741,16 +11741,16 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
numTip: "" numTip: ""
}, },
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.NumericalInterval.superclass._defaultConfig.apply(this, arguments) var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments)
return BI.extend(conf, { return BI.extend(conf, {
extraCls: "bi-numerical-interval", extraCls: "bi-number-interval",
height: 25, height: 25,
validation: "valid" validation: "valid"
}) })
}, },
_init: function () { _init: function () {
var self = this, c = this.constants, o = this.options; var self = this, c = this.constants, o = this.options;
BI.NumericalInterval.superclass._init.apply(this, arguments) BI.NumberInterval.superclass._init.apply(this, arguments)
this.smallEditor = BI.createWidget({ this.smallEditor = BI.createWidget({
type: "bi.editor", type: "bi.editor",
height: o.height - 2, height: o.height - 2,
@ -11769,7 +11769,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
} }
return true; return true;
}, },
cls: "numerical-interval-small-editor bi-border-top bi-border-bottom bi-border-left" cls: "number-interval-small-editor bi-border-top bi-border-bottom bi-border-left"
}); });
this.smallTip = BI.createWidget({ this.smallTip = BI.createWidget({
@ -11806,7 +11806,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
} }
return true; return true;
}, },
cls: "numerical-interval-big-editor bi-border-top bi-border-bottom bi-border-right" cls: "number-interval-big-editor bi-border-top bi-border-bottom bi-border-right"
}); });
this.bigTip = BI.createWidget({ this.bigTip = BI.createWidget({
@ -11826,23 +11826,23 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}); });
//this.smallCombo = BI.createWidget({ //this.smallCombo = BI.createWidget({
// type: "bi.numerical_interval_combo", // type: "bi.number_interval_combo",
// cls: "numerical-interval-small-combo", // cls: "number-interval-small-combo",
// height: o.height, // height: o.height,
// value: o.closemin ? 1 : 0, // value: o.closemin ? 1 : 0,
// offsetStyle: "left" // offsetStyle: "left"
//}); //});
// //
//this.bigCombo = BI.createWidget({ //this.bigCombo = BI.createWidget({
// type: "bi.numerical_interval_combo", // type: "bi.number_interval_combo",
// cls: "numerical-interval-big-combo", // cls: "number-interval-big-combo",
// height: o.height, // height: o.height,
// value: o.closemax ? 1 : 0, // value: o.closemax ? 1 : 0,
// offsetStyle: "left" // offsetStyle: "left"
//}); //});
this.smallCombo = BI.createWidget({ this.smallCombo = BI.createWidget({
type: "bi.icon_combo", type: "bi.icon_combo",
cls: "numerical-interval-small-combo bi-border", cls: "number-interval-small-combo bi-border",
height: o.height - 2, height: o.height - 2,
items: [{ items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")", text: "(" + BI.i18nText("BI-Less_Than") + ")",
@ -11861,7 +11861,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
} }
this.bigCombo = BI.createWidget({ this.bigCombo = BI.createWidget({
type: "bi.icon_combo", type: "bi.icon_combo",
cls: "numerical-interval-big-combo bi-border", cls: "number-interval-big-combo bi-border",
height: o.height - 2, height: o.height - 2,
items: [{ items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")", text: "(" + BI.i18nText("BI-Less_Than") + ")",
@ -12069,7 +12069,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "center" offsetStyle: "center"
}); });
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
}) })
}, },
@ -12082,16 +12082,16 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "center" offsetStyle: "center"
}); });
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "center" offsetStyle: "center"
}); });
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
default: default:
self.fireEvent(BI.NumericalInterval.EVENT_VALID); self.fireEvent(BI.NumberInterval.EVENT_VALID);
} }
}) })
}, },
@ -12119,7 +12119,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
default : default :
break; break;
} }
self.fireEvent(BI.NumericalInterval.EVENT_CHANGE); self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
}); });
}, },
@ -12129,19 +12129,19 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
switch (self._checkValidation()) { switch (self._checkValidation()) {
case c.typeError: case c.typeError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")); self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.numberError: case c.numberError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")); self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")); self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
default : default :
self.fireEvent(BI.NumericalInterval.EVENT_CHANGE); self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
self.fireEvent(BI.NumericalInterval.EVENT_VALID); self.fireEvent(BI.NumberInterval.EVENT_VALID);
} }
}) })
}, },
@ -12242,10 +12242,10 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
return value; return value;
} }
}); });
BI.NumericalInterval.EVENT_CHANGE = "EVENT_CHANGE"; BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumericalInterval.EVENT_VALID = "EVENT_VALID"; BI.NumberInterval.EVENT_VALID = "EVENT_VALID";
BI.NumericalInterval.EVENT_ERROR = "EVENT_ERROR"; BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.numerical_interval", BI.NumericalInterval);/** BI.shortcut("bi.number_interval", BI.NumberInterval);/**
* *
* 表格 * 表格
* *

2
docs/SUMMARY.md

@ -154,7 +154,7 @@
* 文本框控件 * 文本框控件
* [text_editor](detailed/text_input/bi.text_editor.md) * [text_editor](detailed/text_input/bi.text_editor.md)
* [search_editor](detailed/text_input/bi.search_editor.md) * [search_editor](detailed/text_input/bi.search_editor.md)
* [finetuning_number_editor](detailed/text_input/finetuning_number_editor.md) * [number_editor](detailed/text_input/number_editor.md)
* [year_combo](detailed/year_combo.md) * [year_combo](detailed/year_combo.md)
* [month_combo](detailed/month_combo.md) * [month_combo](detailed/month_combo.md)
* [quarter_combo](detailed/quarter_combo.md) * [quarter_combo](detailed/quarter_combo.md)

2
docs/_book/detailed/numeric_interval.md → docs/_book/detailed/number_interval.md

@ -8,7 +8,7 @@
{% common %} {% common %}
```javascript ```javascript
BI.createWidget({ BI.createWidget({
type: "bi.numerical_interval", type: "bi.number_interval",
element: '#wrapper', element: '#wrapper',
width: 500 width: 500
}); });

2
docs/detailed/text_input/finetuning_number_editor.md → docs/_book/detailed/text_input/number_editor.md

@ -8,7 +8,7 @@
{% common %} {% common %}
```javascript ```javascript
BI.createWidget({ BI.createWidget({
type: 'bi.fine_tuning_number_editor', type: 'bi.number_editor',
element: '#wrapper', element: '#wrapper',
width: 300 width: 300
}); });

2
docs/detailed/numeric_interval.md → docs/detailed/number_interval.md

@ -8,7 +8,7 @@
{% common %} {% common %}
```javascript ```javascript
BI.createWidget({ BI.createWidget({
type: "bi.numerical_interval", type: "bi.number_interval",
element: '#wrapper', element: '#wrapper',
width: 500 width: 500
}); });

2
docs/_book/detailed/text_input/finetuning_number_editor.md → docs/detailed/text_input/number_editor.md

@ -8,7 +8,7 @@
{% common %} {% common %}
```javascript ```javascript
BI.createWidget({ BI.createWidget({
type: 'bi.fine_tuning_number_editor', type: 'bi.number_editor',
element: '#wrapper', element: '#wrapper',
width: 300 width: 300
}); });

2
src/css/widget/finetuningnumbereditor/finetuning.number.editor.css → src/css/widget/numbereditor/number.editor.css

@ -1,4 +1,4 @@
.bi-fine-tuning-number-editor { .bi-number-editor {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;

14
src/css/widget/numericalinterval/numericalinterval.css → src/css/widget/numberinterval/numberinterval.css

@ -1,4 +1,4 @@
.bi-numerical-interval .numerical-interval-small-editor { .bi-number-interval .number-interval-small-editor {
-moz-border-radius-topleft: 2px; -moz-border-radius-topleft: 2px;
-webkit-border-top-left-radius: 2px; -webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px; -moz-border-radius-bottomleft: 2px;
@ -6,7 +6,7 @@
border-top-left-radius: 2px; border-top-left-radius: 2px;
border-bottom-left-radius: 2px; border-bottom-left-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-big-editor { .bi-number-interval .number-interval-big-editor {
-moz-border-radius-topright: 2px; -moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px; -webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px; -moz-border-radius-bottomright: 2px;
@ -14,7 +14,7 @@
border-top-right-radius: 2px; border-top-right-radius: 2px;
border-bottom-right-radius: 2px; border-bottom-right-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-big-combo { .bi-number-interval .number-interval-big-combo {
-moz-border-radius-topleft: 2px; -moz-border-radius-topleft: 2px;
-webkit-border-top-left-radius: 2px; -webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px; -moz-border-radius-bottomleft: 2px;
@ -22,10 +22,10 @@
border-top-left-radius: 2px; border-top-left-radius: 2px;
border-bottom-left-radius: 2px; border-bottom-left-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon { .bi-number-interval .number-interval-big-combo .bi-icon-combo-trigger .icon-combo-trigger-icon {
font-size: 14px; font-size: 14px;
} }
.bi-numerical-interval .numerical-interval-small-combo { .bi-number-interval .number-interval-small-combo {
-moz-border-radius-topright: 2px; -moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px; -webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px; -moz-border-radius-bottomright: 2px;
@ -33,9 +33,9 @@
border-top-right-radius: 2px; border-top-right-radius: 2px;
border-bottom-right-radius: 2px; border-bottom-right-radius: 2px;
} }
.bi-numerical-interval .numerical-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon { .bi-number-interval .number-interval-small-combo .bi-icon-combo-trigger .icon-combo-trigger-icon {
font-size: 14px; font-size: 14px;
} }
.bi-numerical-interval.number-error .bi-input { .bi-number-interval.number-error .bi-input {
color: #e85050; color: #e85050;
} }

2
src/less/widget/finetuningnumbereditor/finetuning.number.editor.less → src/less/widget/numbereditor/number.editor.less

@ -1,6 +1,6 @@
@import "../../bibase"; @import "../../bibase";
.bi-fine-tuning-number-editor { .bi-number-editor {
.border-radius(2px); .border-radius(2px);
& .top-button { & .top-button {
} }

10
src/less/widget/numericalinterval/numericalinterval.less → src/less/widget/numberinterval/numberinterval.less

@ -1,13 +1,13 @@
@import "../../bibase"; @import "../../bibase";
.bi-numerical-interval { .bi-number-interval {
& .numerical-interval-small-editor { & .number-interval-small-editor {
.border-corner-left-radius(2px, 2px); .border-corner-left-radius(2px, 2px);
} }
& .numerical-interval-big-editor { & .number-interval-big-editor {
.border-corner-right-radius(2px, 2px); .border-corner-right-radius(2px, 2px);
} }
& .numerical-interval-big-combo { & .number-interval-big-combo {
.border-corner-left-radius(2px, 2px); .border-corner-left-radius(2px, 2px);
& .bi-icon-combo-trigger { & .bi-icon-combo-trigger {
& .icon-combo-trigger-icon { & .icon-combo-trigger-icon {
@ -16,7 +16,7 @@
} }
} }
& .numerical-interval-small-combo { & .number-interval-small-combo {
.border-corner-right-radius(2px, 2px); .border-corner-right-radius(2px, 2px);
& .bi-icon-combo-trigger { & .bi-icon-combo-trigger {
& .icon-combo-trigger-icon { & .icon-combo-trigger-icon {

4
src/less/widget/numberinterval/popup.numberinterval.less

@ -0,0 +1,4 @@
@import "../../bibase";
.bi-number-interval-popup{
}

4
src/less/widget/numericalinterval/popup.numericalinterval.less

@ -1,4 +0,0 @@
@import "../../bibase";
.bi-numerical-interval-popup{
}

26
src/widget/finetuningnumbereditor/finetuning.number.editor.js → src/widget/numbereditor/number.editor.js

@ -2,10 +2,10 @@
* Created by windy on 2017/3/13. * Created by windy on 2017/3/13.
* 数值微调器 * 数值微调器
*/ */
BI.FineTuningNumberEditor = BI.inherit(BI.Widget, { BI.NumberEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.FineTuningNumberEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-fine-tuning-number-editor bi-border", baseCls: "bi-number-editor bi-border",
validationChecker: function () {return true;}, validationChecker: function () {return true;},
valueFormatter: function (v) {return v;}, valueFormatter: function (v) {return v;},
value: 0, value: 0,
@ -15,7 +15,7 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
}, },
_init: function () { _init: function () {
BI.FineTuningNumberEditor.superclass._init.apply(this, arguments); BI.NumberEditor.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.sign_editor", type: "bi.sign_editor",
@ -26,10 +26,10 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
}); });
this.editor.on(BI.TextEditor.EVENT_CHANGE, function () { this.editor.on(BI.TextEditor.EVENT_CHANGE, function () {
o.value = this.getValue(); o.value = this.getValue();
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE); self.fireEvent(BI.NumberEditor.EVENT_CHANGE);
}); });
this.editor.on(BI.TextEditor.EVENT_CONFIRM, function(){ this.editor.on(BI.TextEditor.EVENT_CONFIRM, function(){
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM); self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);
}); });
this.topBtn = BI.createWidget({ this.topBtn = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
@ -38,8 +38,8 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
}); });
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function(){ this.topBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(o.step); self._finetuning(o.step);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE); self.fireEvent(BI.NumberEditor.EVENT_CHANGE);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM); self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);
}); });
this.bottomBtn = BI.createWidget({ this.bottomBtn = BI.createWidget({
type: "bi.icon_button", type: "bi.icon_button",
@ -48,8 +48,8 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
}); });
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function(){ this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(-o.step); self._finetuning(-o.step);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE); self.fireEvent(BI.NumberEditor.EVENT_CHANGE);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM); self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);
}); });
BI.createWidget({ BI.createWidget({
type: "bi.htape", type: "bi.htape",
@ -99,6 +99,6 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
} }
}); });
BI.FineTuningNumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.NumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.FineTuningNumberEditor.EVENT_CHANGE = "EVENT_CHANGE"; BI.NumberEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.fine_tuning_number_editor", BI.FineTuningNumberEditor); BI.shortcut("bi.number_editor", BI.NumberEditor);

52
src/widget/numericalinterval/numericalinterval.js → src/widget/numberinterval/numberinterval.js

@ -4,7 +4,7 @@
* Created by roy on 15/9/17. * Created by roy on 15/9/17.
* *
*/ */
BI.NumericalInterval = BI.inherit(BI.Single, { BI.NumberInterval = BI.inherit(BI.Single, {
constants: { constants: {
typeError: "typeBubble", typeError: "typeBubble",
numberError: "numberBubble", numberError: "numberBubble",
@ -20,16 +20,16 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
numTip: "" numTip: ""
}, },
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.NumericalInterval.superclass._defaultConfig.apply(this, arguments) var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments)
return BI.extend(conf, { return BI.extend(conf, {
extraCls: "bi-numerical-interval", extraCls: "bi-number-interval",
height: 25, height: 25,
validation: "valid" validation: "valid"
}) })
}, },
_init: function () { _init: function () {
var self = this, c = this.constants, o = this.options; var self = this, c = this.constants, o = this.options;
BI.NumericalInterval.superclass._init.apply(this, arguments) BI.NumberInterval.superclass._init.apply(this, arguments)
this.smallEditor = BI.createWidget({ this.smallEditor = BI.createWidget({
type: "bi.editor", type: "bi.editor",
height: o.height - 2, height: o.height - 2,
@ -48,7 +48,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
} }
return true; return true;
}, },
cls: "numerical-interval-small-editor bi-border-top bi-border-bottom bi-border-left" cls: "number-interval-small-editor bi-border-top bi-border-bottom bi-border-left"
}); });
this.smallTip = BI.createWidget({ this.smallTip = BI.createWidget({
@ -85,7 +85,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
} }
return true; return true;
}, },
cls: "numerical-interval-big-editor bi-border-top bi-border-bottom bi-border-right" cls: "number-interval-big-editor bi-border-top bi-border-bottom bi-border-right"
}); });
this.bigTip = BI.createWidget({ this.bigTip = BI.createWidget({
@ -105,23 +105,23 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}); });
//this.smallCombo = BI.createWidget({ //this.smallCombo = BI.createWidget({
// type: "bi.numerical_interval_combo", // type: "bi.number_interval_combo",
// cls: "numerical-interval-small-combo", // cls: "number-interval-small-combo",
// height: o.height, // height: o.height,
// value: o.closemin ? 1 : 0, // value: o.closemin ? 1 : 0,
// offsetStyle: "left" // offsetStyle: "left"
//}); //});
// //
//this.bigCombo = BI.createWidget({ //this.bigCombo = BI.createWidget({
// type: "bi.numerical_interval_combo", // type: "bi.number_interval_combo",
// cls: "numerical-interval-big-combo", // cls: "number-interval-big-combo",
// height: o.height, // height: o.height,
// value: o.closemax ? 1 : 0, // value: o.closemax ? 1 : 0,
// offsetStyle: "left" // offsetStyle: "left"
//}); //});
this.smallCombo = BI.createWidget({ this.smallCombo = BI.createWidget({
type: "bi.icon_combo", type: "bi.icon_combo",
cls: "numerical-interval-small-combo bi-border", cls: "number-interval-small-combo bi-border",
height: o.height - 2, height: o.height - 2,
items: [{ items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")", text: "(" + BI.i18nText("BI-Less_Than") + ")",
@ -140,7 +140,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
} }
this.bigCombo = BI.createWidget({ this.bigCombo = BI.createWidget({
type: "bi.icon_combo", type: "bi.icon_combo",
cls: "numerical-interval-big-combo bi-border", cls: "number-interval-big-combo bi-border",
height: o.height - 2, height: o.height - 2,
items: [{ items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")", text: "(" + BI.i18nText("BI-Less_Than") + ")",
@ -348,7 +348,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "center" offsetStyle: "center"
}); });
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
}) })
}, },
@ -361,16 +361,16 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "center" offsetStyle: "center"
}); });
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "center" offsetStyle: "center"
}); });
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
default: default:
self.fireEvent(BI.NumericalInterval.EVENT_VALID); self.fireEvent(BI.NumberInterval.EVENT_VALID);
} }
}) })
}, },
@ -398,7 +398,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
default : default :
break; break;
} }
self.fireEvent(BI.NumericalInterval.EVENT_CHANGE); self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
}); });
}, },
@ -408,19 +408,19 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
switch (self._checkValidation()) { switch (self._checkValidation()) {
case c.typeError: case c.typeError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data")); self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.numberError: case c.numberError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value")); self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value")); self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
default : default :
self.fireEvent(BI.NumericalInterval.EVENT_CHANGE); self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
self.fireEvent(BI.NumericalInterval.EVENT_VALID); self.fireEvent(BI.NumberInterval.EVENT_VALID);
} }
}) })
}, },
@ -521,7 +521,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
return value; return value;
} }
}); });
BI.NumericalInterval.EVENT_CHANGE = "EVENT_CHANGE"; BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumericalInterval.EVENT_VALID = "EVENT_VALID"; BI.NumberInterval.EVENT_VALID = "EVENT_VALID";
BI.NumericalInterval.EVENT_ERROR = "EVENT_ERROR"; BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.numerical_interval", BI.NumericalInterval); BI.shortcut("bi.number_interval", BI.NumberInterval);
Loading…
Cancel
Save