Browse Source

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

* commit 'ec09f56020ffb78c8209bf8abbc96227e4611d7c':
  BI-41100 refactor: 删date_time_select && float_center_adapt
es6
windy 5 years ago
parent
commit
a6f150d5e9
  1. 304
      dist/bundle.ie.js
  2. 62
      dist/bundle.ie.min.js
  3. 304
      dist/bundle.js
  4. 62
      dist/bundle.min.js
  5. 73
      dist/core.js
  6. 304
      dist/fineui.ie.js
  7. 60
      dist/fineui.ie.min.js
  8. 304
      dist/fineui.js
  9. 61
      dist/fineui.min.js
  10. 304
      dist/fineui_without_jquery_polyfill.js
  11. 2
      dist/utils.min.js
  12. 231
      dist/widget.js
  13. 74
      src/core/wrapper/layout/adapt/float.center.js
  14. 102
      src/widget/datetime/datetime.popup.js
  15. 112
      src/widget/datetime/datetime.select.js
  16. 1
      src/widget/datetimepane/card.static.datetimepane.js
  17. 9
      src/widget/dynamicdatetime/dynamicdatetime.popup.js
  18. 5
      src/widget/dynamicdatetime/dynamicdatetime.timeselect.js
  19. 3
      src/widget/numbereditor/number.editor.js

304
dist/bundle.ie.js vendored

@ -31035,79 +31035,6 @@ BI.HorizontalAutoLayout = BI.inherit(BI.Layout, {
}
});
BI.shortcut("bi.horizontal_auto", BI.HorizontalAutoLayout);/**
* 浮动的居中布局
*/
BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.FloatCenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-float-center-adapt-layout",
items: [],
hgap: 0,
vgap: 0,
tgap: 0,
bgap: 0,
lgap: 0,
rgap: 0
});
},
render: function () {
BI.FloatCenterAdaptLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("float_center_adapt布局不需要resize");
},
addItem: function () {
// do nothing
throw new Error("cannot be added");
},
mounted: function () {
var self = this;
var width = this.left.element.outerWidth(),
height = this.left.element.outerHeight();
this.left.element.width(width).height(height).css("float", "none");
BI.remove(this._children, function (i, wi) {
if (wi === self.container) {
delete self._children[i];
}
});
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.left]
});
},
stroke: function (items) {
var self = this, o = this.options;
this.left = BI.createWidget({
type: "bi.vertical",
items: items,
hgap: o.hgap,
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap
});
this.container = BI.createWidget({
type: "bi.left",
element: this,
items: [this.left]
});
},
populate: function (items) {
BI.FloatCenterAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.float_center_adapt", BI.FloatCenterAdaptLayout);/**
* 浮动的水平居中布局
*/
BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
@ -60306,71 +60233,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
this.dateSelect = BI.createWidget({
type: "bi.vertical_adapt",
cls: "bi-border-top",
items: [{
type: "bi.label",
text: BI.i18nText("BI-Basic_Time"),
width: 45
}, {
type: "bi.date_time_select",
max: 23,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.hour = _ref;
}
}, {
type: "bi.label",
text: ":",
width: 15
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.minute = _ref;
}
}, {
type: "bi.label",
text: ":",
width: 15
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.second = _ref;
}
}]
});
this.setValue(opts.value);
this.dateButton = BI.createWidget({
type: "bi.grid",
items: [[this.cancelButton, this.okButton]]
@ -60381,13 +60243,23 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
items: [{
el: this.dateCombo
}, {
el: this.dateSelect,
el: {
type: "bi.center_adapt",
cls: "bi-split-top",
items: [{
type: "bi.dynamic_date_time_select",
ref: function (_ref) {
self.timeSelect = _ref;
}
}]
},
height: 50
}, {
el: this.dateButton,
height: 30
}]
});
this.setValue(opts.value);
},
setValue: function (v) {
@ -60399,30 +60271,31 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
month: date.getMonth() + 1,
day: date.getDate()
});
this.hour.setValue(date.getHours());
this.minute.setValue(date.getMinutes());
this.second.setValue(date.getSeconds());
this.timeSelect.setValue({
hour: date.getHours(),
minute: date.getMinutes(),
second: date.getSeconds()
});
} else {
this.dateCombo.setValue({
year: value.year,
month: value.month,
day: value.day
});
this.hour.setValue(value.hour);
this.minute.setValue(value.minute);
this.second.setValue(value.second);
this.timeSelect.setValue({
hour: value.hour,
minute: value.minute,
second: value.second
});
}
},
getValue: function () {
return {
return BI.extend({
year: this.dateCombo.getValue().year,
month: this.dateCombo.getValue().month,
day: this.dateCombo.getValue().day,
hour: this.hour.getValue(),
minute: this.minute.getValue(),
second: this.second.getValue()
};
day: this.dateCombo.getValue().day
}, this.timeSelect.getValue());
}
});
BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE";
@ -60432,117 +60305,6 @@ BI.shortcut("bi.date_time_popup", BI.DateTimePopup);
/**
* Created by Urthur on 2017/7/14.
*/
BI.DateTimeSelect = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-date-time-select bi-border",
max: 23,
min: 0
});
},
_init: function () {
BI.DateTimeSelect.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
value: this._alertInEditorValue(o.min),
allowBlank: false,
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
validationChecker: function (v) {
return BI.isNaturalNumber(v);
}
});
this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () {
self._finetuning(0);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(1);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
cls: "column-next-page-h-font bottom-button bi-border-left"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(-1);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this._finetuning(0);
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: 30
}]
});
},
_alertOutEditorValue: function (v) {
if (v > this.options.max) {
v = this.options.min;
}
if (v < this.options.min) {
v = this.options.max;
}
return BI.parseInt(v);
},
_alertInEditorValue: function (v) {
if (v > this.options.max) {
v = this.options.min;
}
if (v < this.options.min) {
v = this.options.max;
}
v = v < 10 ? "0" + v : v;
return v;
},
_finetuning: function (add) {
var v = BI.parseInt(this._alertOutEditorValue(this.editor.getValue()));
this.editor.setValue(this._alertInEditorValue(v + add));
},
getValue: function () {
var v = this.editor.getValue();
return this._alertOutEditorValue(v);
},
setValue: function (v) {
this.editor.setValue(this._alertInEditorValue(v));
this._finetuning(0);
}
});
BI.DateTimeSelect.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.date_time_select", BI.DateTimeSelect);/**
* Created by Urthur on 2017/7/14.
*/
BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4
@ -60675,6 +60437,7 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
}, this.calendar, {
el: {
type: "bi.dynamic_date_time_select",
cls: "bi-split-top",
ref: function () {
self.timeSelect = this;
},
@ -63285,15 +63048,10 @@ BI.extend(BI.DynamicDateTimeCombo, {
}, {
el: {
type: "bi.dynamic_date_time_select",
cls: "bi-split-top",
ref: function () {
self.timeSelect = this;
},
listeners: [{
eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,
action: function () {
}
}]
}
},
height: 40
}]
@ -63401,7 +63159,7 @@ BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE = "BUTTON_CLEAR_EVENT_CHANGE";
BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-date-time-select bi-split-top"
baseCls: "bi-date-time-select"
},
render: function () {
@ -63442,8 +63200,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat
}],
width: 60,
height: 24
},
lgap: 14
}
}, {
type: "bi.label",
text: ":",
@ -72676,7 +72433,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
height: o.height - 2,
allowBlank: o.allowBlank,
value: o.valueFormatter(o.value),
validationChecker: o.validationChecker,
@ -72714,6 +72471,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
});
BI.createWidget({
type: "bi.htape",
height: o.height - 2,
element: this,
items: [this.editor, {
el: {

62
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

304
dist/bundle.js vendored

@ -31035,79 +31035,6 @@ BI.HorizontalAutoLayout = BI.inherit(BI.Layout, {
}
});
BI.shortcut("bi.horizontal_auto", BI.HorizontalAutoLayout);/**
* 浮动的居中布局
*/
BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.FloatCenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-float-center-adapt-layout",
items: [],
hgap: 0,
vgap: 0,
tgap: 0,
bgap: 0,
lgap: 0,
rgap: 0
});
},
render: function () {
BI.FloatCenterAdaptLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("float_center_adapt布局不需要resize");
},
addItem: function () {
// do nothing
throw new Error("cannot be added");
},
mounted: function () {
var self = this;
var width = this.left.element.outerWidth(),
height = this.left.element.outerHeight();
this.left.element.width(width).height(height).css("float", "none");
BI.remove(this._children, function (i, wi) {
if (wi === self.container) {
delete self._children[i];
}
});
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.left]
});
},
stroke: function (items) {
var self = this, o = this.options;
this.left = BI.createWidget({
type: "bi.vertical",
items: items,
hgap: o.hgap,
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap
});
this.container = BI.createWidget({
type: "bi.left",
element: this,
items: [this.left]
});
},
populate: function (items) {
BI.FloatCenterAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.float_center_adapt", BI.FloatCenterAdaptLayout);/**
* 浮动的水平居中布局
*/
BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
@ -60710,71 +60637,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
this.dateSelect = BI.createWidget({
type: "bi.vertical_adapt",
cls: "bi-border-top",
items: [{
type: "bi.label",
text: BI.i18nText("BI-Basic_Time"),
width: 45
}, {
type: "bi.date_time_select",
max: 23,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.hour = _ref;
}
}, {
type: "bi.label",
text: ":",
width: 15
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.minute = _ref;
}
}, {
type: "bi.label",
text: ":",
width: 15
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.second = _ref;
}
}]
});
this.setValue(opts.value);
this.dateButton = BI.createWidget({
type: "bi.grid",
items: [[this.cancelButton, this.okButton]]
@ -60785,13 +60647,23 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
items: [{
el: this.dateCombo
}, {
el: this.dateSelect,
el: {
type: "bi.center_adapt",
cls: "bi-split-top",
items: [{
type: "bi.dynamic_date_time_select",
ref: function (_ref) {
self.timeSelect = _ref;
}
}]
},
height: 50
}, {
el: this.dateButton,
height: 30
}]
});
this.setValue(opts.value);
},
setValue: function (v) {
@ -60803,30 +60675,31 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
month: date.getMonth() + 1,
day: date.getDate()
});
this.hour.setValue(date.getHours());
this.minute.setValue(date.getMinutes());
this.second.setValue(date.getSeconds());
this.timeSelect.setValue({
hour: date.getHours(),
minute: date.getMinutes(),
second: date.getSeconds()
});
} else {
this.dateCombo.setValue({
year: value.year,
month: value.month,
day: value.day
});
this.hour.setValue(value.hour);
this.minute.setValue(value.minute);
this.second.setValue(value.second);
this.timeSelect.setValue({
hour: value.hour,
minute: value.minute,
second: value.second
});
}
},
getValue: function () {
return {
return BI.extend({
year: this.dateCombo.getValue().year,
month: this.dateCombo.getValue().month,
day: this.dateCombo.getValue().day,
hour: this.hour.getValue(),
minute: this.minute.getValue(),
second: this.second.getValue()
};
day: this.dateCombo.getValue().day
}, this.timeSelect.getValue());
}
});
BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE";
@ -60836,117 +60709,6 @@ BI.shortcut("bi.date_time_popup", BI.DateTimePopup);
/**
* Created by Urthur on 2017/7/14.
*/
BI.DateTimeSelect = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-date-time-select bi-border",
max: 23,
min: 0
});
},
_init: function () {
BI.DateTimeSelect.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
value: this._alertInEditorValue(o.min),
allowBlank: false,
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
validationChecker: function (v) {
return BI.isNaturalNumber(v);
}
});
this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () {
self._finetuning(0);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(1);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
cls: "column-next-page-h-font bottom-button bi-border-left"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(-1);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this._finetuning(0);
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: 30
}]
});
},
_alertOutEditorValue: function (v) {
if (v > this.options.max) {
v = this.options.min;
}
if (v < this.options.min) {
v = this.options.max;
}
return BI.parseInt(v);
},
_alertInEditorValue: function (v) {
if (v > this.options.max) {
v = this.options.min;
}
if (v < this.options.min) {
v = this.options.max;
}
v = v < 10 ? "0" + v : v;
return v;
},
_finetuning: function (add) {
var v = BI.parseInt(this._alertOutEditorValue(this.editor.getValue()));
this.editor.setValue(this._alertInEditorValue(v + add));
},
getValue: function () {
var v = this.editor.getValue();
return this._alertOutEditorValue(v);
},
setValue: function (v) {
this.editor.setValue(this._alertInEditorValue(v));
this._finetuning(0);
}
});
BI.DateTimeSelect.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.date_time_select", BI.DateTimeSelect);/**
* Created by Urthur on 2017/7/14.
*/
BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4
@ -61079,6 +60841,7 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
}, this.calendar, {
el: {
type: "bi.dynamic_date_time_select",
cls: "bi-split-top",
ref: function () {
self.timeSelect = this;
},
@ -63689,15 +63452,10 @@ BI.extend(BI.DynamicDateTimeCombo, {
}, {
el: {
type: "bi.dynamic_date_time_select",
cls: "bi-split-top",
ref: function () {
self.timeSelect = this;
},
listeners: [{
eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,
action: function () {
}
}]
}
},
height: 40
}]
@ -63805,7 +63563,7 @@ BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE = "BUTTON_CLEAR_EVENT_CHANGE";
BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-date-time-select bi-split-top"
baseCls: "bi-date-time-select"
},
render: function () {
@ -63846,8 +63604,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat
}],
width: 60,
height: 24
},
lgap: 14
}
}, {
type: "bi.label",
text: ":",
@ -73080,7 +72837,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
height: o.height - 2,
allowBlank: o.allowBlank,
value: o.valueFormatter(o.value),
validationChecker: o.validationChecker,
@ -73118,6 +72875,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
});
BI.createWidget({
type: "bi.htape",
height: o.height - 2,
element: this,
items: [this.editor, {
el: {

62
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

73
dist/core.js vendored

@ -31035,79 +31035,6 @@ BI.HorizontalAutoLayout = BI.inherit(BI.Layout, {
}
});
BI.shortcut("bi.horizontal_auto", BI.HorizontalAutoLayout);/**
* 浮动的居中布局
*/
BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.FloatCenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-float-center-adapt-layout",
items: [],
hgap: 0,
vgap: 0,
tgap: 0,
bgap: 0,
lgap: 0,
rgap: 0
});
},
render: function () {
BI.FloatCenterAdaptLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("float_center_adapt布局不需要resize");
},
addItem: function () {
// do nothing
throw new Error("cannot be added");
},
mounted: function () {
var self = this;
var width = this.left.element.outerWidth(),
height = this.left.element.outerHeight();
this.left.element.width(width).height(height).css("float", "none");
BI.remove(this._children, function (i, wi) {
if (wi === self.container) {
delete self._children[i];
}
});
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.left]
});
},
stroke: function (items) {
var self = this, o = this.options;
this.left = BI.createWidget({
type: "bi.vertical",
items: items,
hgap: o.hgap,
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap
});
this.container = BI.createWidget({
type: "bi.left",
element: this,
items: [this.left]
});
},
populate: function (items) {
BI.FloatCenterAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.float_center_adapt", BI.FloatCenterAdaptLayout);/**
* 浮动的水平居中布局
*/
BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {

304
dist/fineui.ie.js vendored

@ -31280,79 +31280,6 @@ BI.HorizontalAutoLayout = BI.inherit(BI.Layout, {
}
});
BI.shortcut("bi.horizontal_auto", BI.HorizontalAutoLayout);/**
* 浮动的居中布局
*/
BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.FloatCenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-float-center-adapt-layout",
items: [],
hgap: 0,
vgap: 0,
tgap: 0,
bgap: 0,
lgap: 0,
rgap: 0
});
},
render: function () {
BI.FloatCenterAdaptLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("float_center_adapt布局不需要resize");
},
addItem: function () {
// do nothing
throw new Error("cannot be added");
},
mounted: function () {
var self = this;
var width = this.left.element.outerWidth(),
height = this.left.element.outerHeight();
this.left.element.width(width).height(height).css("float", "none");
BI.remove(this._children, function (i, wi) {
if (wi === self.container) {
delete self._children[i];
}
});
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.left]
});
},
stroke: function (items) {
var self = this, o = this.options;
this.left = BI.createWidget({
type: "bi.vertical",
items: items,
hgap: o.hgap,
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap
});
this.container = BI.createWidget({
type: "bi.left",
element: this,
items: [this.left]
});
},
populate: function (items) {
BI.FloatCenterAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.float_center_adapt", BI.FloatCenterAdaptLayout);/**
* 浮动的水平居中布局
*/
BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
@ -60551,71 +60478,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
this.dateSelect = BI.createWidget({
type: "bi.vertical_adapt",
cls: "bi-border-top",
items: [{
type: "bi.label",
text: BI.i18nText("BI-Basic_Time"),
width: 45
}, {
type: "bi.date_time_select",
max: 23,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.hour = _ref;
}
}, {
type: "bi.label",
text: ":",
width: 15
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.minute = _ref;
}
}, {
type: "bi.label",
text: ":",
width: 15
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.second = _ref;
}
}]
});
this.setValue(opts.value);
this.dateButton = BI.createWidget({
type: "bi.grid",
items: [[this.cancelButton, this.okButton]]
@ -60626,13 +60488,23 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
items: [{
el: this.dateCombo
}, {
el: this.dateSelect,
el: {
type: "bi.center_adapt",
cls: "bi-split-top",
items: [{
type: "bi.dynamic_date_time_select",
ref: function (_ref) {
self.timeSelect = _ref;
}
}]
},
height: 50
}, {
el: this.dateButton,
height: 30
}]
});
this.setValue(opts.value);
},
setValue: function (v) {
@ -60644,30 +60516,31 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
month: date.getMonth() + 1,
day: date.getDate()
});
this.hour.setValue(date.getHours());
this.minute.setValue(date.getMinutes());
this.second.setValue(date.getSeconds());
this.timeSelect.setValue({
hour: date.getHours(),
minute: date.getMinutes(),
second: date.getSeconds()
});
} else {
this.dateCombo.setValue({
year: value.year,
month: value.month,
day: value.day
});
this.hour.setValue(value.hour);
this.minute.setValue(value.minute);
this.second.setValue(value.second);
this.timeSelect.setValue({
hour: value.hour,
minute: value.minute,
second: value.second
});
}
},
getValue: function () {
return {
return BI.extend({
year: this.dateCombo.getValue().year,
month: this.dateCombo.getValue().month,
day: this.dateCombo.getValue().day,
hour: this.hour.getValue(),
minute: this.minute.getValue(),
second: this.second.getValue()
};
day: this.dateCombo.getValue().day
}, this.timeSelect.getValue());
}
});
BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE";
@ -60677,117 +60550,6 @@ BI.shortcut("bi.date_time_popup", BI.DateTimePopup);
/**
* Created by Urthur on 2017/7/14.
*/
BI.DateTimeSelect = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-date-time-select bi-border",
max: 23,
min: 0
});
},
_init: function () {
BI.DateTimeSelect.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
value: this._alertInEditorValue(o.min),
allowBlank: false,
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
validationChecker: function (v) {
return BI.isNaturalNumber(v);
}
});
this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () {
self._finetuning(0);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(1);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
cls: "column-next-page-h-font bottom-button bi-border-left"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(-1);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this._finetuning(0);
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: 30
}]
});
},
_alertOutEditorValue: function (v) {
if (v > this.options.max) {
v = this.options.min;
}
if (v < this.options.min) {
v = this.options.max;
}
return BI.parseInt(v);
},
_alertInEditorValue: function (v) {
if (v > this.options.max) {
v = this.options.min;
}
if (v < this.options.min) {
v = this.options.max;
}
v = v < 10 ? "0" + v : v;
return v;
},
_finetuning: function (add) {
var v = BI.parseInt(this._alertOutEditorValue(this.editor.getValue()));
this.editor.setValue(this._alertInEditorValue(v + add));
},
getValue: function () {
var v = this.editor.getValue();
return this._alertOutEditorValue(v);
},
setValue: function (v) {
this.editor.setValue(this._alertInEditorValue(v));
this._finetuning(0);
}
});
BI.DateTimeSelect.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.date_time_select", BI.DateTimeSelect);/**
* Created by Urthur on 2017/7/14.
*/
BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4
@ -60920,6 +60682,7 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
}, this.calendar, {
el: {
type: "bi.dynamic_date_time_select",
cls: "bi-split-top",
ref: function () {
self.timeSelect = this;
},
@ -63530,15 +63293,10 @@ BI.extend(BI.DynamicDateTimeCombo, {
}, {
el: {
type: "bi.dynamic_date_time_select",
cls: "bi-split-top",
ref: function () {
self.timeSelect = this;
},
listeners: [{
eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,
action: function () {
}
}]
}
},
height: 40
}]
@ -63646,7 +63404,7 @@ BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE = "BUTTON_CLEAR_EVENT_CHANGE";
BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-date-time-select bi-split-top"
baseCls: "bi-date-time-select"
},
render: function () {
@ -63687,8 +63445,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat
}],
width: 60,
height: 24
},
lgap: 14
}
}, {
type: "bi.label",
text: ":",
@ -72921,7 +72678,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
height: o.height - 2,
allowBlank: o.allowBlank,
value: o.valueFormatter(o.value),
validationChecker: o.validationChecker,
@ -72959,6 +72716,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
});
BI.createWidget({
type: "bi.htape",
height: o.height - 2,
element: this,
items: [this.editor, {
el: {

60
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

304
dist/fineui.js vendored

@ -31280,79 +31280,6 @@ BI.HorizontalAutoLayout = BI.inherit(BI.Layout, {
}
});
BI.shortcut("bi.horizontal_auto", BI.HorizontalAutoLayout);/**
* 浮动的居中布局
*/
BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.FloatCenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-float-center-adapt-layout",
items: [],
hgap: 0,
vgap: 0,
tgap: 0,
bgap: 0,
lgap: 0,
rgap: 0
});
},
render: function () {
BI.FloatCenterAdaptLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("float_center_adapt布局不需要resize");
},
addItem: function () {
// do nothing
throw new Error("cannot be added");
},
mounted: function () {
var self = this;
var width = this.left.element.outerWidth(),
height = this.left.element.outerHeight();
this.left.element.width(width).height(height).css("float", "none");
BI.remove(this._children, function (i, wi) {
if (wi === self.container) {
delete self._children[i];
}
});
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.left]
});
},
stroke: function (items) {
var self = this, o = this.options;
this.left = BI.createWidget({
type: "bi.vertical",
items: items,
hgap: o.hgap,
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap
});
this.container = BI.createWidget({
type: "bi.left",
element: this,
items: [this.left]
});
},
populate: function (items) {
BI.FloatCenterAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.float_center_adapt", BI.FloatCenterAdaptLayout);/**
* 浮动的水平居中布局
*/
BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
@ -60955,71 +60882,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
this.dateSelect = BI.createWidget({
type: "bi.vertical_adapt",
cls: "bi-border-top",
items: [{
type: "bi.label",
text: BI.i18nText("BI-Basic_Time"),
width: 45
}, {
type: "bi.date_time_select",
max: 23,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.hour = _ref;
}
}, {
type: "bi.label",
text: ":",
width: 15
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.minute = _ref;
}
}, {
type: "bi.label",
text: ":",
width: 15
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.second = _ref;
}
}]
});
this.setValue(opts.value);
this.dateButton = BI.createWidget({
type: "bi.grid",
items: [[this.cancelButton, this.okButton]]
@ -61030,13 +60892,23 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
items: [{
el: this.dateCombo
}, {
el: this.dateSelect,
el: {
type: "bi.center_adapt",
cls: "bi-split-top",
items: [{
type: "bi.dynamic_date_time_select",
ref: function (_ref) {
self.timeSelect = _ref;
}
}]
},
height: 50
}, {
el: this.dateButton,
height: 30
}]
});
this.setValue(opts.value);
},
setValue: function (v) {
@ -61048,30 +60920,31 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
month: date.getMonth() + 1,
day: date.getDate()
});
this.hour.setValue(date.getHours());
this.minute.setValue(date.getMinutes());
this.second.setValue(date.getSeconds());
this.timeSelect.setValue({
hour: date.getHours(),
minute: date.getMinutes(),
second: date.getSeconds()
});
} else {
this.dateCombo.setValue({
year: value.year,
month: value.month,
day: value.day
});
this.hour.setValue(value.hour);
this.minute.setValue(value.minute);
this.second.setValue(value.second);
this.timeSelect.setValue({
hour: value.hour,
minute: value.minute,
second: value.second
});
}
},
getValue: function () {
return {
return BI.extend({
year: this.dateCombo.getValue().year,
month: this.dateCombo.getValue().month,
day: this.dateCombo.getValue().day,
hour: this.hour.getValue(),
minute: this.minute.getValue(),
second: this.second.getValue()
};
day: this.dateCombo.getValue().day
}, this.timeSelect.getValue());
}
});
BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE";
@ -61081,117 +60954,6 @@ BI.shortcut("bi.date_time_popup", BI.DateTimePopup);
/**
* Created by Urthur on 2017/7/14.
*/
BI.DateTimeSelect = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-date-time-select bi-border",
max: 23,
min: 0
});
},
_init: function () {
BI.DateTimeSelect.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
value: this._alertInEditorValue(o.min),
allowBlank: false,
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
validationChecker: function (v) {
return BI.isNaturalNumber(v);
}
});
this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () {
self._finetuning(0);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(1);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
cls: "column-next-page-h-font bottom-button bi-border-left"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(-1);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this._finetuning(0);
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: 30
}]
});
},
_alertOutEditorValue: function (v) {
if (v > this.options.max) {
v = this.options.min;
}
if (v < this.options.min) {
v = this.options.max;
}
return BI.parseInt(v);
},
_alertInEditorValue: function (v) {
if (v > this.options.max) {
v = this.options.min;
}
if (v < this.options.min) {
v = this.options.max;
}
v = v < 10 ? "0" + v : v;
return v;
},
_finetuning: function (add) {
var v = BI.parseInt(this._alertOutEditorValue(this.editor.getValue()));
this.editor.setValue(this._alertInEditorValue(v + add));
},
getValue: function () {
var v = this.editor.getValue();
return this._alertOutEditorValue(v);
},
setValue: function (v) {
this.editor.setValue(this._alertInEditorValue(v));
this._finetuning(0);
}
});
BI.DateTimeSelect.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.date_time_select", BI.DateTimeSelect);/**
* Created by Urthur on 2017/7/14.
*/
BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4
@ -61324,6 +61086,7 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
}, this.calendar, {
el: {
type: "bi.dynamic_date_time_select",
cls: "bi-split-top",
ref: function () {
self.timeSelect = this;
},
@ -63934,15 +63697,10 @@ BI.extend(BI.DynamicDateTimeCombo, {
}, {
el: {
type: "bi.dynamic_date_time_select",
cls: "bi-split-top",
ref: function () {
self.timeSelect = this;
},
listeners: [{
eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,
action: function () {
}
}]
}
},
height: 40
}]
@ -64050,7 +63808,7 @@ BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE = "BUTTON_CLEAR_EVENT_CHANGE";
BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-date-time-select bi-split-top"
baseCls: "bi-date-time-select"
},
render: function () {
@ -64091,8 +63849,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat
}],
width: 60,
height: 24
},
lgap: 14
}
}, {
type: "bi.label",
text: ":",
@ -73325,7 +73082,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
height: o.height - 2,
allowBlank: o.allowBlank,
value: o.valueFormatter(o.value),
validationChecker: o.validationChecker,
@ -73363,6 +73120,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
});
BI.createWidget({
type: "bi.htape",
height: o.height - 2,
element: this,
items: [this.editor, {
el: {

61
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

304
dist/fineui_without_jquery_polyfill.js vendored

@ -19984,79 +19984,6 @@ BI.HorizontalAutoLayout = BI.inherit(BI.Layout, {
}
});
BI.shortcut("bi.horizontal_auto", BI.HorizontalAutoLayout);/**
* 浮动的居中布局
*/
BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.FloatCenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-float-center-adapt-layout",
items: [],
hgap: 0,
vgap: 0,
tgap: 0,
bgap: 0,
lgap: 0,
rgap: 0
});
},
render: function () {
BI.FloatCenterAdaptLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("float_center_adapt布局不需要resize");
},
addItem: function () {
// do nothing
throw new Error("cannot be added");
},
mounted: function () {
var self = this;
var width = this.left.element.outerWidth(),
height = this.left.element.outerHeight();
this.left.element.width(width).height(height).css("float", "none");
BI.remove(this._children, function (i, wi) {
if (wi === self.container) {
delete self._children[i];
}
});
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.left]
});
},
stroke: function (items) {
var self = this, o = this.options;
this.left = BI.createWidget({
type: "bi.vertical",
items: items,
hgap: o.hgap,
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap
});
this.container = BI.createWidget({
type: "bi.left",
element: this,
items: [this.left]
});
},
populate: function (items) {
BI.FloatCenterAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.float_center_adapt", BI.FloatCenterAdaptLayout);/**
* 浮动的水平居中布局
*/
BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
@ -43752,71 +43679,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
this.dateSelect = BI.createWidget({
type: "bi.vertical_adapt",
cls: "bi-border-top",
items: [{
type: "bi.label",
text: BI.i18nText("BI-Basic_Time"),
width: 45
}, {
type: "bi.date_time_select",
max: 23,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.hour = _ref;
}
}, {
type: "bi.label",
text: ":",
width: 15
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.minute = _ref;
}
}, {
type: "bi.label",
text: ":",
width: 15
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.second = _ref;
}
}]
});
this.setValue(opts.value);
this.dateButton = BI.createWidget({
type: "bi.grid",
items: [[this.cancelButton, this.okButton]]
@ -43827,13 +43689,23 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
items: [{
el: this.dateCombo
}, {
el: this.dateSelect,
el: {
type: "bi.center_adapt",
cls: "bi-split-top",
items: [{
type: "bi.dynamic_date_time_select",
ref: function (_ref) {
self.timeSelect = _ref;
}
}]
},
height: 50
}, {
el: this.dateButton,
height: 30
}]
});
this.setValue(opts.value);
},
setValue: function (v) {
@ -43845,30 +43717,31 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
month: date.getMonth() + 1,
day: date.getDate()
});
this.hour.setValue(date.getHours());
this.minute.setValue(date.getMinutes());
this.second.setValue(date.getSeconds());
this.timeSelect.setValue({
hour: date.getHours(),
minute: date.getMinutes(),
second: date.getSeconds()
});
} else {
this.dateCombo.setValue({
year: value.year,
month: value.month,
day: value.day
});
this.hour.setValue(value.hour);
this.minute.setValue(value.minute);
this.second.setValue(value.second);
this.timeSelect.setValue({
hour: value.hour,
minute: value.minute,
second: value.second
});
}
},
getValue: function () {
return {
return BI.extend({
year: this.dateCombo.getValue().year,
month: this.dateCombo.getValue().month,
day: this.dateCombo.getValue().day,
hour: this.hour.getValue(),
minute: this.minute.getValue(),
second: this.second.getValue()
};
day: this.dateCombo.getValue().day
}, this.timeSelect.getValue());
}
});
BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE";
@ -43878,117 +43751,6 @@ BI.shortcut("bi.date_time_popup", BI.DateTimePopup);
/**
* Created by Urthur on 2017/7/14.
*/
BI.DateTimeSelect = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-date-time-select bi-border",
max: 23,
min: 0
});
},
_init: function () {
BI.DateTimeSelect.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
value: this._alertInEditorValue(o.min),
allowBlank: false,
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
validationChecker: function (v) {
return BI.isNaturalNumber(v);
}
});
this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () {
self._finetuning(0);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(1);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
cls: "column-next-page-h-font bottom-button bi-border-left"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(-1);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this._finetuning(0);
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: 30
}]
});
},
_alertOutEditorValue: function (v) {
if (v > this.options.max) {
v = this.options.min;
}
if (v < this.options.min) {
v = this.options.max;
}
return BI.parseInt(v);
},
_alertInEditorValue: function (v) {
if (v > this.options.max) {
v = this.options.min;
}
if (v < this.options.min) {
v = this.options.max;
}
v = v < 10 ? "0" + v : v;
return v;
},
_finetuning: function (add) {
var v = BI.parseInt(this._alertOutEditorValue(this.editor.getValue()));
this.editor.setValue(this._alertInEditorValue(v + add));
},
getValue: function () {
var v = this.editor.getValue();
return this._alertOutEditorValue(v);
},
setValue: function (v) {
this.editor.setValue(this._alertInEditorValue(v));
this._finetuning(0);
}
});
BI.DateTimeSelect.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.date_time_select", BI.DateTimeSelect);/**
* Created by Urthur on 2017/7/14.
*/
BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4
@ -44121,6 +43883,7 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
}, this.calendar, {
el: {
type: "bi.dynamic_date_time_select",
cls: "bi-split-top",
ref: function () {
self.timeSelect = this;
},
@ -46731,15 +46494,10 @@ BI.extend(BI.DynamicDateTimeCombo, {
}, {
el: {
type: "bi.dynamic_date_time_select",
cls: "bi-split-top",
ref: function () {
self.timeSelect = this;
},
listeners: [{
eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,
action: function () {
}
}]
}
},
height: 40
}]
@ -46847,7 +46605,7 @@ BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE = "BUTTON_CLEAR_EVENT_CHANGE";
BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-date-time-select bi-split-top"
baseCls: "bi-date-time-select"
},
render: function () {
@ -46888,8 +46646,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat
}],
width: 60,
height: 24
},
lgap: 14
}
}, {
type: "bi.label",
text: ":",
@ -56122,7 +55879,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
height: o.height - 2,
allowBlank: o.allowBlank,
value: o.valueFormatter(o.value),
validationChecker: o.validationChecker,
@ -56160,6 +55917,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
});
BI.createWidget({
type: "bi.htape",
height: o.height - 2,
element: this,
items: [this.editor, {
el: {

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

231
dist/widget.js vendored

@ -1194,71 +1194,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
this.dateSelect = BI.createWidget({
type: "bi.vertical_adapt",
cls: "bi-border-top",
items: [{
type: "bi.label",
text: BI.i18nText("BI-Basic_Time"),
width: 45
}, {
type: "bi.date_time_select",
max: 23,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.hour = _ref;
}
}, {
type: "bi.label",
text: ":",
width: 15
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.minute = _ref;
}
}, {
type: "bi.label",
text: ":",
width: 15
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.second = _ref;
}
}]
});
this.setValue(opts.value);
this.dateButton = BI.createWidget({
type: "bi.grid",
items: [[this.cancelButton, this.okButton]]
@ -1269,13 +1204,23 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
items: [{
el: this.dateCombo
}, {
el: this.dateSelect,
el: {
type: "bi.center_adapt",
cls: "bi-split-top",
items: [{
type: "bi.dynamic_date_time_select",
ref: function (_ref) {
self.timeSelect = _ref;
}
}]
},
height: 50
}, {
el: this.dateButton,
height: 30
}]
});
this.setValue(opts.value);
},
setValue: function (v) {
@ -1287,30 +1232,31 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
month: date.getMonth() + 1,
day: date.getDate()
});
this.hour.setValue(date.getHours());
this.minute.setValue(date.getMinutes());
this.second.setValue(date.getSeconds());
this.timeSelect.setValue({
hour: date.getHours(),
minute: date.getMinutes(),
second: date.getSeconds()
});
} else {
this.dateCombo.setValue({
year: value.year,
month: value.month,
day: value.day
});
this.hour.setValue(value.hour);
this.minute.setValue(value.minute);
this.second.setValue(value.second);
this.timeSelect.setValue({
hour: value.hour,
minute: value.minute,
second: value.second
});
}
},
getValue: function () {
return {
return BI.extend({
year: this.dateCombo.getValue().year,
month: this.dateCombo.getValue().month,
day: this.dateCombo.getValue().day,
hour: this.hour.getValue(),
minute: this.minute.getValue(),
second: this.second.getValue()
};
day: this.dateCombo.getValue().day
}, this.timeSelect.getValue());
}
});
BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE";
@ -1320,117 +1266,6 @@ BI.shortcut("bi.date_time_popup", BI.DateTimePopup);
/**
* Created by Urthur on 2017/7/14.
*/
BI.DateTimeSelect = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-date-time-select bi-border",
max: 23,
min: 0
});
},
_init: function () {
BI.DateTimeSelect.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
value: this._alertInEditorValue(o.min),
allowBlank: false,
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
validationChecker: function (v) {
return BI.isNaturalNumber(v);
}
});
this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () {
self._finetuning(0);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(1);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
cls: "column-next-page-h-font bottom-button bi-border-left"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(-1);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this._finetuning(0);
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: 30
}]
});
},
_alertOutEditorValue: function (v) {
if (v > this.options.max) {
v = this.options.min;
}
if (v < this.options.min) {
v = this.options.max;
}
return BI.parseInt(v);
},
_alertInEditorValue: function (v) {
if (v > this.options.max) {
v = this.options.min;
}
if (v < this.options.min) {
v = this.options.max;
}
v = v < 10 ? "0" + v : v;
return v;
},
_finetuning: function (add) {
var v = BI.parseInt(this._alertOutEditorValue(this.editor.getValue()));
this.editor.setValue(this._alertInEditorValue(v + add));
},
getValue: function () {
var v = this.editor.getValue();
return this._alertOutEditorValue(v);
},
setValue: function (v) {
this.editor.setValue(this._alertInEditorValue(v));
this._finetuning(0);
}
});
BI.DateTimeSelect.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.date_time_select", BI.DateTimeSelect);/**
* Created by Urthur on 2017/7/14.
*/
BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4
@ -1563,6 +1398,7 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
}, this.calendar, {
el: {
type: "bi.dynamic_date_time_select",
cls: "bi-split-top",
ref: function () {
self.timeSelect = this;
},
@ -4173,15 +4009,10 @@ BI.extend(BI.DynamicDateTimeCombo, {
}, {
el: {
type: "bi.dynamic_date_time_select",
cls: "bi-split-top",
ref: function () {
self.timeSelect = this;
},
listeners: [{
eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,
action: function () {
}
}]
}
},
height: 40
}]
@ -4289,7 +4120,7 @@ BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE = "BUTTON_CLEAR_EVENT_CHANGE";
BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-date-time-select bi-split-top"
baseCls: "bi-date-time-select"
},
render: function () {
@ -4330,8 +4161,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat
}],
width: 60,
height: 24
},
lgap: 14
}
}, {
type: "bi.label",
text: ":",
@ -13564,7 +13394,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
height: o.height - 2,
allowBlank: o.allowBlank,
value: o.valueFormatter(o.value),
validationChecker: o.validationChecker,
@ -13602,6 +13432,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
});
BI.createWidget({
type: "bi.htape",
height: o.height - 2,
element: this,
items: [this.editor, {
el: {

74
src/core/wrapper/layout/adapt/float.center.js

@ -1,74 +0,0 @@
/**
* 浮动的居中布局
*/
BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.FloatCenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-float-center-adapt-layout",
items: [],
hgap: 0,
vgap: 0,
tgap: 0,
bgap: 0,
lgap: 0,
rgap: 0
});
},
render: function () {
BI.FloatCenterAdaptLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("float_center_adapt布局不需要resize");
},
addItem: function () {
// do nothing
throw new Error("cannot be added");
},
mounted: function () {
var self = this;
var width = this.left.element.outerWidth(),
height = this.left.element.outerHeight();
this.left.element.width(width).height(height).css("float", "none");
BI.remove(this._children, function (i, wi) {
if (wi === self.container) {
delete self._children[i];
}
});
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.left]
});
},
stroke: function (items) {
var self = this, o = this.options;
this.left = BI.createWidget({
type: "bi.vertical",
items: items,
hgap: o.hgap,
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap
});
this.container = BI.createWidget({
type: "bi.left",
element: this,
items: [this.left]
});
},
populate: function (items) {
BI.FloatCenterAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.float_center_adapt", BI.FloatCenterAdaptLayout);

102
src/widget/datetime/datetime.popup.js

@ -44,71 +44,6 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
this.dateSelect = BI.createWidget({
type: "bi.vertical_adapt",
cls: "bi-border-top",
items: [{
type: "bi.label",
text: BI.i18nText("BI-Basic_Time"),
width: 45
}, {
type: "bi.date_time_select",
max: 23,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.hour = _ref;
}
}, {
type: "bi.label",
text: ":",
width: 15
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.minute = _ref;
}
}, {
type: "bi.label",
text: ":",
width: 15
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.second = _ref;
}
}]
});
this.setValue(opts.value);
this.dateButton = BI.createWidget({
type: "bi.grid",
items: [[this.cancelButton, this.okButton]]
@ -119,13 +54,23 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
items: [{
el: this.dateCombo
}, {
el: this.dateSelect,
el: {
type: "bi.center_adapt",
cls: "bi-split-top",
items: [{
type: "bi.dynamic_date_time_select",
ref: function (_ref) {
self.timeSelect = _ref;
}
}]
},
height: 50
}, {
el: this.dateButton,
height: 30
}]
});
this.setValue(opts.value);
},
setValue: function (v) {
@ -137,30 +82,31 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
month: date.getMonth() + 1,
day: date.getDate()
});
this.hour.setValue(date.getHours());
this.minute.setValue(date.getMinutes());
this.second.setValue(date.getSeconds());
this.timeSelect.setValue({
hour: date.getHours(),
minute: date.getMinutes(),
second: date.getSeconds()
});
} else {
this.dateCombo.setValue({
year: value.year,
month: value.month,
day: value.day
});
this.hour.setValue(value.hour);
this.minute.setValue(value.minute);
this.second.setValue(value.second);
this.timeSelect.setValue({
hour: value.hour,
minute: value.minute,
second: value.second
});
}
},
getValue: function () {
return {
return BI.extend({
year: this.dateCombo.getValue().year,
month: this.dateCombo.getValue().month,
day: this.dateCombo.getValue().day,
hour: this.hour.getValue(),
minute: this.minute.getValue(),
second: this.second.getValue()
};
day: this.dateCombo.getValue().day
}, this.timeSelect.getValue());
}
});
BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE";

112
src/widget/datetime/datetime.select.js

@ -1,112 +0,0 @@
/**
* Created by Urthur on 2017/7/14.
*/
BI.DateTimeSelect = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DateTimeSelect.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-date-time-select bi-border",
max: 23,
min: 0
});
},
_init: function () {
BI.DateTimeSelect.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
value: this._alertInEditorValue(o.min),
allowBlank: false,
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
validationChecker: function (v) {
return BI.isNaturalNumber(v);
}
});
this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () {
self._finetuning(0);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this.topBtn = BI.createWidget({
type: "bi.icon_button",
cls: "column-pre-page-h-font top-button bi-border-left bi-border-bottom"
});
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(1);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this.bottomBtn = BI.createWidget({
type: "bi.icon_button",
cls: "column-next-page-h-font bottom-button bi-border-left"
});
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(-1);
self.fireEvent(BI.DateTimeSelect.EVENT_CONFIRM);
});
this._finetuning(0);
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: 30
}]
});
},
_alertOutEditorValue: function (v) {
if (v > this.options.max) {
v = this.options.min;
}
if (v < this.options.min) {
v = this.options.max;
}
return BI.parseInt(v);
},
_alertInEditorValue: function (v) {
if (v > this.options.max) {
v = this.options.min;
}
if (v < this.options.min) {
v = this.options.max;
}
v = v < 10 ? "0" + v : v;
return v;
},
_finetuning: function (add) {
var v = BI.parseInt(this._alertOutEditorValue(this.editor.getValue()));
this.editor.setValue(this._alertInEditorValue(v + add));
},
getValue: function () {
var v = this.editor.getValue();
return this._alertOutEditorValue(v);
},
setValue: function (v) {
this.editor.setValue(this._alertInEditorValue(v));
this._finetuning(0);
}
});
BI.DateTimeSelect.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.date_time_select", BI.DateTimeSelect);

1
src/widget/datetimepane/card.static.datetimepane.js

@ -71,6 +71,7 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
}, this.calendar, {
el: {
type: "bi.dynamic_date_time_select",
cls: "bi-split-top",
ref: function () {
self.timeSelect = this;
},

9
src/widget/dynamicdatetime/dynamicdatetime.popup.js

@ -123,15 +123,10 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, {
}, {
el: {
type: "bi.dynamic_date_time_select",
cls: "bi-split-top",
ref: function () {
self.timeSelect = this;
},
listeners: [{
eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,
action: function () {
}
}]
}
},
height: 40
}]

5
src/widget/dynamicdatetime/dynamicdatetime.timeselect.js

@ -1,7 +1,7 @@
BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-date-time-select bi-split-top"
baseCls: "bi-date-time-select"
},
render: function () {
@ -42,8 +42,7 @@ BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
}],
width: 60,
height: 24
},
lgap: 14
}
}, {
type: "bi.label",
text: ":",

3
src/widget/numbereditor/number.editor.js

@ -24,7 +24,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
height: o.height - 2,
allowBlank: o.allowBlank,
value: o.valueFormatter(o.value),
validationChecker: o.validationChecker,
@ -62,6 +62,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
});
BI.createWidget({
type: "bi.htape",
height: o.height - 2,
element: this,
items: [this.editor, {
el: {

Loading…
Cancel
Save