Browse Source

date_time_combo和bubble

es6
windy 7 years ago
parent
commit
58fa90b163
  1. 10
      demo/js/widget/datetime/demo.datetime.js
  2. 27
      dist/bundle.js
  3. 8
      dist/core.js
  4. 10
      dist/demo.js
  5. 27
      dist/fineui.js
  6. 19
      dist/widget.js
  7. 8
      src/core/controller/controller.bubbles.js
  8. 8
      src/widget/datetime/datetime.combo.js
  9. 10
      src/widget/datetime/datetime.popup.js
  10. 1
      src/widget/datetime/datetime.trigger.js

10
demo/js/widget/datetime/demo.datetime.js

@ -22,7 +22,15 @@ Demo.CustomDateTime = BI.inherit(BI.Widget, {
eventName: BI.DateTimeCombo.EVENT_CANCEL,
action: function () {
}
}]
}],
value: {
year: 2017,
month: 2,
day: 23,
hour: 12,
minute: 11,
second: 1
}
},
top: 200,
left: 200

27
dist/bundle.js vendored

@ -18188,8 +18188,16 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_init: function () {
BI.BubblesController.superclass._init.apply(this, arguments);
var self = this;
this.bubblesManager = {};
this.storeBubbles = {};
BI.Resizers.add("bubbleController" + BI.uniqueId(), function () {
BI.each(self.bubblesManager, function (name) {
self.remove(name);
});
self.bubblesManager = {};
self.storeBubbles = {};
});
},
_createBubble: function (direct, text, height) {
@ -79180,7 +79188,7 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
BI.DateTimeCombo.superclass._init.apply(this, arguments);
var self = this, opts = this.options;
var date = Date.getDate();
this.storeValue = {
this.storeValue = BI.isNotNull(opts.value) ? opts.value : {
year: date.getFullYear(),
month: date.getMonth(),
day: date.getDate(),
@ -79191,13 +79199,15 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.date_time_trigger",
min: this.constants.DATE_MIN_VALUE,
max: this.constants.DATE_MAX_VALUE
max: this.constants.DATE_MAX_VALUE,
value: opts.value
});
this.popup = BI.createWidget({
type: "bi.date_time_popup",
min: this.constants.DATE_MIN_VALUE,
max: this.constants.DATE_MAX_VALUE
max: this.constants.DATE_MAX_VALUE,
value: opts.value
});
self.setValue(this.storeValue);
@ -79396,15 +79406,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
}]
});
var date = Date.getDate();
this.dateCombo.setValue({
year: date.getFullYear(),
month: date.getMonth(),
day: date.getDate()
});
this.hour.setValue(date.getHours());
this.minute.setValue(date.getMinutes());
this.second.setValue(date.getSeconds());
this.setValue(opts.value);
this.dateButton = BI.createWidget({
type: "bi.grid",
@ -79608,6 +79610,7 @@ BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
el: this.text
}]
});
this.setValue(o.value);
},
_printTime: function (v) {

8
dist/core.js vendored

@ -18188,8 +18188,16 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_init: function () {
BI.BubblesController.superclass._init.apply(this, arguments);
var self = this;
this.bubblesManager = {};
this.storeBubbles = {};
BI.Resizers.add("bubbleController" + BI.uniqueId(), function () {
BI.each(self.bubblesManager, function (name) {
self.remove(name);
});
self.bubblesManager = {};
self.storeBubbles = {};
});
},
_createBubble: function (direct, text, height) {

10
dist/demo.js vendored

@ -12337,7 +12337,15 @@ Demo.CustomDateTime = BI.inherit(BI.Widget, {
eventName: BI.DateTimeCombo.EVENT_CANCEL,
action: function () {
}
}]
}],
value: {
year: 2017,
month: 2,
day: 23,
hour: 12,
minute: 11,
second: 1
}
},
top: 200,
left: 200

27
dist/fineui.js vendored

@ -18361,8 +18361,16 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_init: function () {
BI.BubblesController.superclass._init.apply(this, arguments);
var self = this;
this.bubblesManager = {};
this.storeBubbles = {};
BI.Resizers.add("bubbleController" + BI.uniqueId(), function () {
BI.each(self.bubblesManager, function (name) {
self.remove(name);
});
self.bubblesManager = {};
self.storeBubbles = {};
});
},
_createBubble: function (direct, text, height) {
@ -80874,7 +80882,7 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
BI.DateTimeCombo.superclass._init.apply(this, arguments);
var self = this, opts = this.options;
var date = Date.getDate();
this.storeValue = {
this.storeValue = BI.isNotNull(opts.value) ? opts.value : {
year: date.getFullYear(),
month: date.getMonth(),
day: date.getDate(),
@ -80885,13 +80893,15 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.date_time_trigger",
min: this.constants.DATE_MIN_VALUE,
max: this.constants.DATE_MAX_VALUE
max: this.constants.DATE_MAX_VALUE,
value: opts.value
});
this.popup = BI.createWidget({
type: "bi.date_time_popup",
min: this.constants.DATE_MIN_VALUE,
max: this.constants.DATE_MAX_VALUE
max: this.constants.DATE_MAX_VALUE,
value: opts.value
});
self.setValue(this.storeValue);
@ -81090,15 +81100,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
}]
});
var date = Date.getDate();
this.dateCombo.setValue({
year: date.getFullYear(),
month: date.getMonth(),
day: date.getDate()
});
this.hour.setValue(date.getHours());
this.minute.setValue(date.getMinutes());
this.second.setValue(date.getSeconds());
this.setValue(opts.value);
this.dateButton = BI.createWidget({
type: "bi.grid",
@ -81302,6 +81304,7 @@ BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
el: this.text
}]
});
this.setValue(o.value);
},
_printTime: function (v) {

19
dist/widget.js vendored

@ -2758,7 +2758,7 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
BI.DateTimeCombo.superclass._init.apply(this, arguments);
var self = this, opts = this.options;
var date = Date.getDate();
this.storeValue = {
this.storeValue = BI.isNotNull(opts.value) ? opts.value : {
year: date.getFullYear(),
month: date.getMonth(),
day: date.getDate(),
@ -2769,13 +2769,15 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.date_time_trigger",
min: this.constants.DATE_MIN_VALUE,
max: this.constants.DATE_MAX_VALUE
max: this.constants.DATE_MAX_VALUE,
value: opts.value
});
this.popup = BI.createWidget({
type: "bi.date_time_popup",
min: this.constants.DATE_MIN_VALUE,
max: this.constants.DATE_MAX_VALUE
max: this.constants.DATE_MAX_VALUE,
value: opts.value
});
self.setValue(this.storeValue);
@ -2974,15 +2976,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
}]
});
var date = Date.getDate();
this.dateCombo.setValue({
year: date.getFullYear(),
month: date.getMonth(),
day: date.getDate()
});
this.hour.setValue(date.getHours());
this.minute.setValue(date.getMinutes());
this.second.setValue(date.getSeconds());
this.setValue(opts.value);
this.dateButton = BI.createWidget({
type: "bi.grid",
@ -3186,6 +3180,7 @@ BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
el: this.text
}]
});
this.setValue(o.value);
},
_printTime: function (v) {

8
src/core/controller/controller.bubbles.js

@ -16,8 +16,16 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_init: function () {
BI.BubblesController.superclass._init.apply(this, arguments);
var self = this;
this.bubblesManager = {};
this.storeBubbles = {};
BI.Resizers.add("bubbleController" + BI.uniqueId(), function () {
BI.each(self.bubblesManager, function (name) {
self.remove(name);
});
self.bubblesManager = {};
self.storeBubbles = {};
});
},
_createBubble: function (direct, text, height) {

8
src/widget/datetime/datetime.combo.js

@ -21,7 +21,7 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
BI.DateTimeCombo.superclass._init.apply(this, arguments);
var self = this, opts = this.options;
var date = Date.getDate();
this.storeValue = {
this.storeValue = BI.isNotNull(opts.value) ? opts.value : {
year: date.getFullYear(),
month: date.getMonth(),
day: date.getDate(),
@ -32,13 +32,15 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.date_time_trigger",
min: this.constants.DATE_MIN_VALUE,
max: this.constants.DATE_MAX_VALUE
max: this.constants.DATE_MAX_VALUE,
value: opts.value
});
this.popup = BI.createWidget({
type: "bi.date_time_popup",
min: this.constants.DATE_MIN_VALUE,
max: this.constants.DATE_MAX_VALUE
max: this.constants.DATE_MAX_VALUE,
value: opts.value
});
self.setValue(this.storeValue);

10
src/widget/datetime/datetime.popup.js

@ -106,15 +106,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
}]
});
var date = Date.getDate();
this.dateCombo.setValue({
year: date.getFullYear(),
month: date.getMonth(),
day: date.getDate()
});
this.hour.setValue(date.getHours());
this.minute.setValue(date.getMinutes());
this.second.setValue(date.getSeconds());
this.setValue(opts.value);
this.dateButton = BI.createWidget({
type: "bi.grid",

1
src/widget/datetime/datetime.trigger.js

@ -36,6 +36,7 @@ BI.DateTimeTrigger = BI.inherit(BI.Trigger, {
el: this.text
}]
});
this.setValue(o.value);
},
_printTime: function (v) {

Loading…
Cancel
Save