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

24
bi/widget.css

@ -68,11 +68,6 @@
background-color: #191b2b;
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 {
z-index: 1000000000;
background-color: #f07d0a;
@ -139,7 +134,12 @@
color: #3f8ce8;
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;
-webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px;
@ -147,7 +147,7 @@
border-top-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;
-webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px;
@ -155,7 +155,7 @@
border-top-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;
-webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px;
@ -163,10 +163,10 @@
border-top-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;
}
.bi-numerical-interval .numerical-interval-small-combo {
.bi-number-interval .number-interval-small-combo {
-moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px;
@ -174,10 +174,10 @@
border-top-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;
}
.bi-numerical-interval.number-error .bi-input {
.bi-number-interval.number-error .bi-input {
color: #e85050;
}
.bi-page-table-cell {

260
bi/widget.js

@ -5376,109 +5376,6 @@ BI.extend(BI.FileManagerNav, {
});
BI.FileManagerNav.EVENT_CHANGE = "FileManagerNav.EVENT_CHANGE";
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_STOP = "EVENT_STOP";
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:最大值的符号
/**
* Created by roy on 15/9/17.
*
*/
BI.NumericalInterval = BI.inherit(BI.Single, {
BI.NumberInterval = BI.inherit(BI.Single, {
constants: {
typeError: "typeBubble",
numberError: "numberBubble",
@ -11741,16 +11741,16 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
numTip: ""
},
_defaultConfig: function () {
var conf = BI.NumericalInterval.superclass._defaultConfig.apply(this, arguments)
var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments)
return BI.extend(conf, {
extraCls: "bi-numerical-interval",
extraCls: "bi-number-interval",
height: 25,
validation: "valid"
})
},
_init: function () {
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({
type: "bi.editor",
height: o.height - 2,
@ -11769,7 +11769,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}
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({
@ -11806,7 +11806,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}
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({
@ -11826,23 +11826,23 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
});
//this.smallCombo = BI.createWidget({
// type: "bi.numerical_interval_combo",
// cls: "numerical-interval-small-combo",
// type: "bi.number_interval_combo",
// cls: "number-interval-small-combo",
// height: o.height,
// value: o.closemin ? 1 : 0,
// offsetStyle: "left"
//});
//
//this.bigCombo = BI.createWidget({
// type: "bi.numerical_interval_combo",
// cls: "numerical-interval-big-combo",
// type: "bi.number_interval_combo",
// cls: "number-interval-big-combo",
// height: o.height,
// value: o.closemax ? 1 : 0,
// offsetStyle: "left"
//});
this.smallCombo = BI.createWidget({
type: "bi.icon_combo",
cls: "numerical-interval-small-combo bi-border",
cls: "number-interval-small-combo bi-border",
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
@ -11861,7 +11861,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}
this.bigCombo = BI.createWidget({
type: "bi.icon_combo",
cls: "numerical-interval-big-combo bi-border",
cls: "number-interval-big-combo bi-border",
height: o.height - 2,
items: [{
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, {
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, {
offsetStyle: "center"
});
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "center"
});
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
default:
self.fireEvent(BI.NumericalInterval.EVENT_VALID);
self.fireEvent(BI.NumberInterval.EVENT_VALID);
}
})
},
@ -12119,7 +12119,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
default :
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()) {
case c.typeError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.numberError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.signalError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
default :
self.fireEvent(BI.NumericalInterval.EVENT_CHANGE);
self.fireEvent(BI.NumericalInterval.EVENT_VALID);
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
self.fireEvent(BI.NumberInterval.EVENT_VALID);
}
})
},
@ -12242,10 +12242,10 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
return value;
}
});
BI.NumericalInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumericalInterval.EVENT_VALID = "EVENT_VALID";
BI.NumericalInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.numerical_interval", BI.NumericalInterval);/**
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberInterval.EVENT_VALID = "EVENT_VALID";
BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR";
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
}];
var filemanager = BI.createWidget({
type: "bi.fine_tuning_number_editor",
type: "bi.number_editor",
validationChecker: function (v) {
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 {
type: "bi.horizontal_auto",
items: [{
type: "bi.numerical_interval",
type: "bi.number_interval",
ref: function (_ref) {
self.numerical = _ref;
},

24
dist/bundle.css vendored

@ -3155,11 +3155,6 @@ ul.ztree.zTreeDragUL {
background-color: #191b2b;
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 {
z-index: 1000000000;
background-color: #f07d0a;
@ -3226,7 +3221,12 @@ ul.ztree.zTreeDragUL {
color: #3f8ce8;
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;
-webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px;
@ -3234,7 +3234,7 @@ ul.ztree.zTreeDragUL {
border-top-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;
-webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px;
@ -3242,7 +3242,7 @@ ul.ztree.zTreeDragUL {
border-top-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;
-webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px;
@ -3250,10 +3250,10 @@ ul.ztree.zTreeDragUL {
border-top-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;
}
.bi-numerical-interval .numerical-interval-small-combo {
.bi-number-interval .number-interval-small-combo {
-moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px;
@ -3261,10 +3261,10 @@ ul.ztree.zTreeDragUL {
border-top-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;
}
.bi-numerical-interval.number-error .bi-input {
.bi-number-interval.number-error .bi-input {
color: #e85050;
}
.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.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_STOP = "EVENT_STOP";
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:最大值的符号
/**
* Created by roy on 15/9/17.
*
*/
BI.NumericalInterval = BI.inherit(BI.Single, {
BI.NumberInterval = BI.inherit(BI.Single, {
constants: {
typeError: "typeBubble",
numberError: "numberBubble",
@ -90369,16 +90369,16 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
numTip: ""
},
_defaultConfig: function () {
var conf = BI.NumericalInterval.superclass._defaultConfig.apply(this, arguments)
var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments)
return BI.extend(conf, {
extraCls: "bi-numerical-interval",
extraCls: "bi-number-interval",
height: 25,
validation: "valid"
})
},
_init: function () {
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({
type: "bi.editor",
height: o.height - 2,
@ -90397,7 +90397,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}
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({
@ -90434,7 +90434,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}
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({
@ -90454,23 +90454,23 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
});
//this.smallCombo = BI.createWidget({
// type: "bi.numerical_interval_combo",
// cls: "numerical-interval-small-combo",
// type: "bi.number_interval_combo",
// cls: "number-interval-small-combo",
// height: o.height,
// value: o.closemin ? 1 : 0,
// offsetStyle: "left"
//});
//
//this.bigCombo = BI.createWidget({
// type: "bi.numerical_interval_combo",
// cls: "numerical-interval-big-combo",
// type: "bi.number_interval_combo",
// cls: "number-interval-big-combo",
// height: o.height,
// value: o.closemax ? 1 : 0,
// offsetStyle: "left"
//});
this.smallCombo = BI.createWidget({
type: "bi.icon_combo",
cls: "numerical-interval-small-combo bi-border",
cls: "number-interval-small-combo bi-border",
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
@ -90489,7 +90489,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}
this.bigCombo = BI.createWidget({
type: "bi.icon_combo",
cls: "numerical-interval-big-combo bi-border",
cls: "number-interval-big-combo bi-border",
height: o.height - 2,
items: [{
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, {
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, {
offsetStyle: "center"
});
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "center"
});
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
default:
self.fireEvent(BI.NumericalInterval.EVENT_VALID);
self.fireEvent(BI.NumberInterval.EVENT_VALID);
}
})
},
@ -90747,7 +90747,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
default :
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()) {
case c.typeError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.numberError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.signalError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
default :
self.fireEvent(BI.NumericalInterval.EVENT_CHANGE);
self.fireEvent(BI.NumericalInterval.EVENT_VALID);
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
self.fireEvent(BI.NumberInterval.EVENT_VALID);
}
})
},
@ -90870,10 +90870,10 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
return value;
}
});
BI.NumericalInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumericalInterval.EVENT_VALID = "EVENT_VALID";
BI.NumericalInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.numerical_interval", BI.NumericalInterval);/**
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberInterval.EVENT_VALID = "EVENT_VALID";
BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.number_interval", BI.NumberInterval);/**
*
* 表格
*

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

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

24
dist/widget.css vendored

@ -68,11 +68,6 @@
background-color: #191b2b;
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 {
z-index: 1000000000;
background-color: #f07d0a;
@ -139,7 +134,12 @@
color: #3f8ce8;
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;
-webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px;
@ -147,7 +147,7 @@
border-top-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;
-webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px;
@ -155,7 +155,7 @@
border-top-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;
-webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px;
@ -163,10 +163,10 @@
border-top-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;
}
.bi-numerical-interval .numerical-interval-small-combo {
.bi-number-interval .number-interval-small-combo {
-moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px;
@ -174,10 +174,10 @@
border-top-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;
}
.bi-numerical-interval.number-error .bi-input {
.bi-number-interval.number-error .bi-input {
color: #e85050;
}
.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.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_STOP = "EVENT_STOP";
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:最大值的符号
/**
* Created by roy on 15/9/17.
*
*/
BI.NumericalInterval = BI.inherit(BI.Single, {
BI.NumberInterval = BI.inherit(BI.Single, {
constants: {
typeError: "typeBubble",
numberError: "numberBubble",
@ -11741,16 +11741,16 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
numTip: ""
},
_defaultConfig: function () {
var conf = BI.NumericalInterval.superclass._defaultConfig.apply(this, arguments)
var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments)
return BI.extend(conf, {
extraCls: "bi-numerical-interval",
extraCls: "bi-number-interval",
height: 25,
validation: "valid"
})
},
_init: function () {
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({
type: "bi.editor",
height: o.height - 2,
@ -11769,7 +11769,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}
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({
@ -11806,7 +11806,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}
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({
@ -11826,23 +11826,23 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
});
//this.smallCombo = BI.createWidget({
// type: "bi.numerical_interval_combo",
// cls: "numerical-interval-small-combo",
// type: "bi.number_interval_combo",
// cls: "number-interval-small-combo",
// height: o.height,
// value: o.closemin ? 1 : 0,
// offsetStyle: "left"
//});
//
//this.bigCombo = BI.createWidget({
// type: "bi.numerical_interval_combo",
// cls: "numerical-interval-big-combo",
// type: "bi.number_interval_combo",
// cls: "number-interval-big-combo",
// height: o.height,
// value: o.closemax ? 1 : 0,
// offsetStyle: "left"
//});
this.smallCombo = BI.createWidget({
type: "bi.icon_combo",
cls: "numerical-interval-small-combo bi-border",
cls: "number-interval-small-combo bi-border",
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
@ -11861,7 +11861,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}
this.bigCombo = BI.createWidget({
type: "bi.icon_combo",
cls: "numerical-interval-big-combo bi-border",
cls: "number-interval-big-combo bi-border",
height: o.height - 2,
items: [{
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, {
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, {
offsetStyle: "center"
});
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "center"
});
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
default:
self.fireEvent(BI.NumericalInterval.EVENT_VALID);
self.fireEvent(BI.NumberInterval.EVENT_VALID);
}
})
},
@ -12119,7 +12119,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
default :
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()) {
case c.typeError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.numberError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.signalError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
default :
self.fireEvent(BI.NumericalInterval.EVENT_CHANGE);
self.fireEvent(BI.NumericalInterval.EVENT_VALID);
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
self.fireEvent(BI.NumberInterval.EVENT_VALID);
}
})
},
@ -12242,10 +12242,10 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
return value;
}
});
BI.NumericalInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumericalInterval.EVENT_VALID = "EVENT_VALID";
BI.NumericalInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.numerical_interval", BI.NumericalInterval);/**
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberInterval.EVENT_VALID = "EVENT_VALID";
BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.number_interval", BI.NumberInterval);/**
*
* 表格
*

2
docs/SUMMARY.md

@ -154,7 +154,7 @@
* 文本框控件
* [text_editor](detailed/text_input/bi.text_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)
* [month_combo](detailed/month_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 %}
```javascript
BI.createWidget({
type: "bi.numerical_interval",
type: "bi.number_interval",
element: '#wrapper',
width: 500
});

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

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

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

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

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

@ -8,7 +8,7 @@
{% common %}
```javascript
BI.createWidget({
type: 'bi.fine_tuning_number_editor',
type: 'bi.number_editor',
element: '#wrapper',
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;
-moz-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;
-webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px;
@ -6,7 +6,7 @@
border-top-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;
-webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px;
@ -14,7 +14,7 @@
border-top-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;
-webkit-border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px;
@ -22,10 +22,10 @@
border-top-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;
}
.bi-numerical-interval .numerical-interval-small-combo {
.bi-number-interval .number-interval-small-combo {
-moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px;
@ -33,9 +33,9 @@
border-top-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;
}
.bi-numerical-interval.number-error .bi-input {
.bi-number-interval.number-error .bi-input {
color: #e85050;
}

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

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

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

@ -1,13 +1,13 @@
@import "../../bibase";
.bi-numerical-interval {
& .numerical-interval-small-editor {
.bi-number-interval {
& .number-interval-small-editor {
.border-corner-left-radius(2px, 2px);
}
& .numerical-interval-big-editor {
& .number-interval-big-editor {
.border-corner-right-radius(2px, 2px);
}
& .numerical-interval-big-combo {
& .number-interval-big-combo {
.border-corner-left-radius(2px, 2px);
& .bi-icon-combo-trigger {
& .icon-combo-trigger-icon {
@ -16,7 +16,7 @@
}
}
& .numerical-interval-small-combo {
& .number-interval-small-combo {
.border-corner-right-radius(2px, 2px);
& .bi-icon-combo-trigger {
& .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.
* 数值微调器
*/
BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
BI.NumberEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.FineTuningNumberEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-fine-tuning-number-editor bi-border",
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,
@ -15,7 +15,7 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
},
_init: function () {
BI.FineTuningNumberEditor.superclass._init.apply(this, arguments);
BI.NumberEditor.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
@ -26,10 +26,10 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
});
this.editor.on(BI.TextEditor.EVENT_CHANGE, function () {
o.value = this.getValue();
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE);
self.fireEvent(BI.NumberEditor.EVENT_CHANGE);
});
this.editor.on(BI.TextEditor.EVENT_CONFIRM, function(){
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM);
self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
@ -38,8 +38,8 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(o.step);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM);
self.fireEvent(BI.NumberEditor.EVENT_CHANGE);
self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
@ -48,8 +48,8 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function(){
self._finetuning(-o.step);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CHANGE);
self.fireEvent(BI.FineTuningNumberEditor.EVENT_CONFIRM);
self.fireEvent(BI.NumberEditor.EVENT_CHANGE);
self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);
});
BI.createWidget({
type: "bi.htape",
@ -99,6 +99,6 @@ BI.FineTuningNumberEditor = BI.inherit(BI.Widget, {
}
});
BI.FineTuningNumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.FineTuningNumberEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.fine_tuning_number_editor", BI.FineTuningNumberEditor);
BI.NumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.NumberEditor.EVENT_CHANGE = "EVENT_CHANGE";
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.
*
*/
BI.NumericalInterval = BI.inherit(BI.Single, {
BI.NumberInterval = BI.inherit(BI.Single, {
constants: {
typeError: "typeBubble",
numberError: "numberBubble",
@ -20,16 +20,16 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
numTip: ""
},
_defaultConfig: function () {
var conf = BI.NumericalInterval.superclass._defaultConfig.apply(this, arguments)
var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments)
return BI.extend(conf, {
extraCls: "bi-numerical-interval",
extraCls: "bi-number-interval",
height: 25,
validation: "valid"
})
},
_init: function () {
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({
type: "bi.editor",
height: o.height - 2,
@ -48,7 +48,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}
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({
@ -85,7 +85,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}
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({
@ -105,23 +105,23 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
});
//this.smallCombo = BI.createWidget({
// type: "bi.numerical_interval_combo",
// cls: "numerical-interval-small-combo",
// type: "bi.number_interval_combo",
// cls: "number-interval-small-combo",
// height: o.height,
// value: o.closemin ? 1 : 0,
// offsetStyle: "left"
//});
//
//this.bigCombo = BI.createWidget({
// type: "bi.numerical_interval_combo",
// cls: "numerical-interval-big-combo",
// type: "bi.number_interval_combo",
// cls: "number-interval-big-combo",
// height: o.height,
// value: o.closemax ? 1 : 0,
// offsetStyle: "left"
//});
this.smallCombo = BI.createWidget({
type: "bi.icon_combo",
cls: "numerical-interval-small-combo bi-border",
cls: "number-interval-small-combo bi-border",
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
@ -140,7 +140,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
}
this.bigCombo = BI.createWidget({
type: "bi.icon_combo",
cls: "numerical-interval-big-combo bi-border",
cls: "number-interval-big-combo bi-border",
height: o.height - 2,
items: [{
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, {
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, {
offsetStyle: "center"
});
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "center"
});
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
default:
self.fireEvent(BI.NumericalInterval.EVENT_VALID);
self.fireEvent(BI.NumberInterval.EVENT_VALID);
}
})
},
@ -398,7 +398,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
default :
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()) {
case c.typeError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Input_Data"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.numberError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Number_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.signalError:
self._setTitle(BI.i18nText("BI-Numerical_Interval_Signal_Value"));
self.fireEvent(BI.NumericalInterval.EVENT_ERROR);
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
default :
self.fireEvent(BI.NumericalInterval.EVENT_CHANGE);
self.fireEvent(BI.NumericalInterval.EVENT_VALID);
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
self.fireEvent(BI.NumberInterval.EVENT_VALID);
}
})
},
@ -521,7 +521,7 @@ BI.NumericalInterval = BI.inherit(BI.Single, {
return value;
}
});
BI.NumericalInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumericalInterval.EVENT_VALID = "EVENT_VALID";
BI.NumericalInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.numerical_interval", BI.NumericalInterval);
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberInterval.EVENT_VALID = "EVENT_VALID";
BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.number_interval", BI.NumberInterval);
Loading…
Cancel
Save