Browse Source

Merge pull request #367 in FUI/fineui from ~WINDY/fui:master to master

* commit '4ed28bb6e4321161646015a7689ada1c28f88de9':
  调试用fineui.js
  update
  BI-19047
  update
  update
es6
guy 6 years ago
parent
commit
bb34abe638
  1. 22
      Gruntfile.js
  2. 22
      demo/js/widget/date/demo.datepane.js
  3. 30
      dist/_fineui.min.js
  4. 35
      dist/bundle.js
  5. 28
      dist/bundle.min.js
  6. 9
      dist/case.js
  7. 22
      dist/demo.js
  8. 30
      dist/fineui.min.js
  9. 26
      dist/widget.js
  10. 9
      src/case/richeditor/niceditor/niceditor.js
  11. 24
      src/widget/datetimepane/card.static.datetimepane.js
  12. 1
      src/widget/timeinterval/dateinterval.js
  13. 1
      src/widget/timeinterval/timeinterval.js

22
Gruntfile.js

@ -110,11 +110,31 @@ module.exports = function (grunt) {
dest: "dist/bundle.css"
},
fineuiJs: {
fineuiMinJs: {
src: ["dist/_fineui.min.js", "src/base/formula/formulaeditor.js"],
dest: "dist/fineui.min.js"
},
fineuiJs: {
src: ["dist/polyfill.js", "dist/core.js", "dist/fix/fix.js", "src/third/**/*.js",
"src/base/formula/config.js",
"src/base/pane.js",
"src/base/single/single.js",
"src/base/single/text.js",
"src/base/single/button/button.basic.js",
"src/base/single/button/button.node.js",
"src/base/single/tip/tip.js",
"src/base/combination/group.button.js",
"src/base/combination/tree.button.js",
"src/base/combination/map.button.js",
"src/base/tree/treeview.js",
"src/base/tree/asynctree.js",
"src/base/tree/parttree.js",
"src/base/**/*.js",
"dist/case.js", "dist/widget.js", "dist/fix/fix.compact.js", "dist/router.js", "ui/js/**/*.js"],
dest: "dist/fineui.js"
},
fineuiCss: {
src: ["dist/core.css", "dist/base.css", "dist/widget.css", "ui/css/app.css", "ui/css/**/*.css"],
dest: "dist/fineui.css"

22
demo/js/widget/date/demo.datepane.js

@ -35,17 +35,17 @@ Demo.DatePane = BI.inherit(BI.Widget, {
}
}, {
type: "bi.dynamic_date_time_pane",
// value: {
// type: 1,
// value: {
// year: 2017,
// month: 12,
// day: 11,
// hour: 12,
// minute: 12,
// second: 12
// }
// },
value: {
type: 1,
value: {
year: 2017,
month: 12,
day: 11,
hour: 12,
minute: 12,
second: 12
}
},
ref: function (_ref) {
self.dateTimePane = _ref;
},

30
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

35
dist/bundle.js vendored

@ -83082,10 +83082,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
BI.createWidget({
type: "bi.vertical",
element: this,
items: [{
type: "bi.layout",
height: 1
}, this.instance = this.addInstance()]
items: [this.instance = this.addInstance()]
});
},
@ -83093,7 +83090,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
var o = this.options;
var conf = {
ne: this,
height: o.height - 1,
height: o.height,
maxHeight: o.maxHeight ? o.maxHeight : null
};
if (this.element[0].contentEditable || !!window.opera) {
@ -83164,7 +83161,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
scrollable: false
});
this.elm.element.css({
minHeight: (o.height - 8) + "px",
minHeight: BI.isNumber(o.height) ? (o.height - 8) + "px" : o.height,
outline: "none"
}).html(o.value);
@ -89305,8 +89302,20 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar
max: o.max
});
this.datePicker.on(BI.DatePicker.EVENT_CHANGE, function () {
self.selectedTime = BI.extend(self.datePicker.getValue(), self.timeSelect.getValue());
var value = self.datePicker.getValue();
var monthDay = BI.getDate(value.year, value.month - 1, 1).getMonthDays();
var day = self.selectedTime.day || 0;
if (day > monthDay) {
day = monthDay;
}
self.selectedTime = BI.extend(self.selectedTime, {
year: value.year,
month: value.month,
day: day
});
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
self.fireEvent("EVENT_CHANGE");
});
this.calendar = BI.createWidget({
@ -89333,7 +89342,13 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar
type: "bi.dynamic_date_time_select",
ref: function () {
self.timeSelect = this;
}
},
listeners: [{
eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}]
},
height: 40
}]
@ -89369,7 +89384,7 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar
_setCalenderValue: function (date) {
this.calendar.setSelect(BI.Calendar.getPageByDateJSON(date));
this.calendar.setValue(date);
this.selectedTime = BI.extend(date, this.timeSelect.getValue());
this.selectedTime = BI.extend({}, this.timeSelect.getValue(), date);
},
_setDatePicker: function (timeOb) {
@ -107655,6 +107670,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
});
combo.on(BI.DynamicDateCombo.EVENT_ERROR, function () {
self._clearTitle();
BI.Bubbles.hide("error");
self.element.removeClass(self.constants.timeErrorCls);
self.fireEvent(BI.DateInterval.EVENT_ERROR);
});
@ -107833,6 +107849,7 @@ BI.TimeInterval = BI.inherit(BI.Single, {
});
combo.on(BI.DynamicDateTimeCombo.EVENT_ERROR, function () {
self._clearTitle();
BI.Bubbles.hide("error");
self.element.removeClass(self.constants.timeErrorCls);
self.fireEvent(BI.TimeInterval.EVENT_ERROR);
});

28
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

9
dist/case.js vendored

@ -10633,10 +10633,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
BI.createWidget({
type: "bi.vertical",
element: this,
items: [{
type: "bi.layout",
height: 1
}, this.instance = this.addInstance()]
items: [this.instance = this.addInstance()]
});
},
@ -10644,7 +10641,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
var o = this.options;
var conf = {
ne: this,
height: o.height - 1,
height: o.height,
maxHeight: o.maxHeight ? o.maxHeight : null
};
if (this.element[0].contentEditable || !!window.opera) {
@ -10715,7 +10712,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
scrollable: false
});
this.elm.element.css({
minHeight: (o.height - 8) + "px",
minHeight: BI.isNumber(o.height) ? (o.height - 8) + "px" : o.height,
outline: "none"
}).html(o.value);

22
dist/demo.js vendored

@ -12210,17 +12210,17 @@ BI.shortcut("demo.tips", Demo.Tips);Demo.DatePane = BI.inherit(BI.Widget, {
}
}, {
type: "bi.dynamic_date_time_pane",
// value: {
// type: 1,
// value: {
// year: 2017,
// month: 12,
// day: 11,
// hour: 12,
// minute: 12,
// second: 12
// }
// },
value: {
type: 1,
value: {
year: 2017,
month: 12,
day: 11,
hour: 12,
minute: 12,
second: 12
}
},
ref: function (_ref) {
self.dateTimePane = _ref;
},

30
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

26
dist/widget.js vendored

@ -1841,8 +1841,20 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar
max: o.max
});
this.datePicker.on(BI.DatePicker.EVENT_CHANGE, function () {
self.selectedTime = BI.extend(self.datePicker.getValue(), self.timeSelect.getValue());
var value = self.datePicker.getValue();
var monthDay = BI.getDate(value.year, value.month - 1, 1).getMonthDays();
var day = self.selectedTime.day || 0;
if (day > monthDay) {
day = monthDay;
}
self.selectedTime = BI.extend(self.selectedTime, {
year: value.year,
month: value.month,
day: day
});
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
self.fireEvent("EVENT_CHANGE");
});
this.calendar = BI.createWidget({
@ -1869,7 +1881,13 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar
type: "bi.dynamic_date_time_select",
ref: function () {
self.timeSelect = this;
}
},
listeners: [{
eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}]
},
height: 40
}]
@ -1905,7 +1923,7 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar
_setCalenderValue: function (date) {
this.calendar.setSelect(BI.Calendar.getPageByDateJSON(date));
this.calendar.setValue(date);
this.selectedTime = BI.extend(date, this.timeSelect.getValue());
this.selectedTime = BI.extend({}, this.timeSelect.getValue(), date);
},
_setDatePicker: function (timeOb) {
@ -20191,6 +20209,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
});
combo.on(BI.DynamicDateCombo.EVENT_ERROR, function () {
self._clearTitle();
BI.Bubbles.hide("error");
self.element.removeClass(self.constants.timeErrorCls);
self.fireEvent(BI.DateInterval.EVENT_ERROR);
});
@ -20369,6 +20388,7 @@ BI.TimeInterval = BI.inherit(BI.Single, {
});
combo.on(BI.DynamicDateTimeCombo.EVENT_ERROR, function () {
self._clearTitle();
BI.Bubbles.hide("error");
self.element.removeClass(self.constants.timeErrorCls);
self.fireEvent(BI.TimeInterval.EVENT_ERROR);
});

9
src/case/richeditor/niceditor/niceditor.js

@ -19,10 +19,7 @@
BI.createWidget({
type: "bi.vertical",
element: this,
items: [{
type: "bi.layout",
height: 1
}, this.instance = this.addInstance()]
items: [this.instance = this.addInstance()]
});
},
@ -30,7 +27,7 @@
var o = this.options;
var conf = {
ne: this,
height: o.height - 1,
height: o.height,
maxHeight: o.maxHeight ? o.maxHeight : null
};
if (this.element[0].contentEditable || !!window.opera) {
@ -101,7 +98,7 @@
scrollable: false
});
this.elm.element.css({
minHeight: (o.height - 8) + "px",
minHeight: BI.isNumber(o.height) ? (o.height - 8) + "px" : o.height,
outline: "none"
}).html(o.value);

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

@ -27,8 +27,20 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
max: o.max
});
this.datePicker.on(BI.DatePicker.EVENT_CHANGE, function () {
self.selectedTime = BI.extend(self.datePicker.getValue(), self.timeSelect.getValue());
var value = self.datePicker.getValue();
var monthDay = BI.getDate(value.year, value.month - 1, 1).getMonthDays();
var day = self.selectedTime.day || 0;
if (day > monthDay) {
day = monthDay;
}
self.selectedTime = BI.extend(self.selectedTime, {
year: value.year,
month: value.month,
day: day
});
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
self.fireEvent("EVENT_CHANGE");
});
this.calendar = BI.createWidget({
@ -55,7 +67,13 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
type: "bi.dynamic_date_time_select",
ref: function () {
self.timeSelect = this;
}
},
listeners: [{
eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}]
},
height: 40
}]
@ -91,7 +109,7 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
_setCalenderValue: function (date) {
this.calendar.setSelect(BI.Calendar.getPageByDateJSON(date));
this.calendar.setValue(date);
this.selectedTime = BI.extend(date, this.timeSelect.getValue());
this.selectedTime = BI.extend({}, this.timeSelect.getValue(), date);
},
_setDatePicker: function (timeOb) {

1
src/widget/timeinterval/dateinterval.js

@ -72,6 +72,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
});
combo.on(BI.DynamicDateCombo.EVENT_ERROR, function () {
self._clearTitle();
BI.Bubbles.hide("error");
self.element.removeClass(self.constants.timeErrorCls);
self.fireEvent(BI.DateInterval.EVENT_ERROR);
});

1
src/widget/timeinterval/timeinterval.js

@ -72,6 +72,7 @@ BI.TimeInterval = BI.inherit(BI.Single, {
});
combo.on(BI.DynamicDateTimeCombo.EVENT_ERROR, function () {
self._clearTitle();
BI.Bubbles.hide("error");
self.element.removeClass(self.constants.timeErrorCls);
self.fireEvent(BI.TimeInterval.EVENT_ERROR);
});

Loading…
Cancel
Save