Browse Source

Merge branch 'master' of ssh://cloud.finedevelop.com:7999/~young/fineui

es6
Young 6 years ago
parent
commit
0afd686d32
  1. 2
      demo/js/base/editor/demo.editor.js
  2. 66
      dist/_fineui.min.js
  3. 7
      dist/base.css
  4. 7
      dist/base.js
  5. 45
      dist/bundle.css
  6. 281
      dist/bundle.js
  7. 2
      dist/bundle.min.css
  8. 46
      dist/bundle.min.js
  9. 13
      dist/case.js
  10. 4
      dist/core.css
  11. 8
      dist/core.js
  12. 4
      dist/core_without_normalize.css
  13. 2
      dist/demo.js
  14. 45
      dist/fineui.css
  15. 281
      dist/fineui.js
  16. 2
      dist/fineui.min.css
  17. 66
      dist/fineui.min.js
  18. 36
      dist/fix/fix.js
  19. BIN
      dist/font/iconfont.eot
  20. 36
      dist/font/iconfont.svg
  21. BIN
      dist/font/iconfont.ttf
  22. BIN
      dist/font/iconfont.woff
  23. 32
      dist/resource.css
  24. 2
      dist/widget.css
  25. 215
      dist/widget.js
  26. 32
      public/css/font.css
  27. 2
      src/base/single/editor/editor.code.js
  28. 1
      src/base/single/editor/editor.js
  29. 4
      src/base/table/table.resizable.js
  30. 2
      src/case/checkbox/check.arrownode.js
  31. 1
      src/case/combo/textvaluecombo/popup.textvalue.js
  32. 2
      src/case/loader/sort.list.js
  33. 4
      src/case/richeditor/niceditor/niceditor.js
  34. 3
      src/case/toolbar/toolbar.multiselect.js
  35. 8
      src/core/utils/queue.js
  36. 3
      src/css/base/loader/sort.css
  37. 4
      src/css/base/single/button/button.css
  38. 4
      src/css/core/utils/common.css
  39. 32
      src/css/resource/font.css
  40. 2
      src/css/widget/filter/abstractitem/filter.css
  41. 5
      src/less/base/loader/sort.list.less
  42. 2
      src/less/lib/constant.less
  43. 4
      src/less/resource/font.less
  44. 1
      src/widget/date/calendar/popup.year.js
  45. 1
      src/widget/datepane/card.static.datepane.js
  46. 3
      src/widget/datetimepane/card.static.datetimepane.js
  47. 6
      src/widget/dynamicdate/dynamicdate.card.js
  48. 16
      src/widget/dynamicdate/dynamicdate.combo.js
  49. 22
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  50. 1
      src/widget/month/popup.month.js
  51. 6
      src/widget/multiselectlist/multiselectlist.insert.js
  52. 6
      src/widget/multiselectlist/multiselectlist.js
  53. 31
      src/widget/singleselect/singleselectlist.insert.js
  54. 4
      src/widget/singleslider/button/editor.sign.text.js
  55. 2
      src/widget/year/combo.year.js
  56. 71
      src/widget/yearmonth/trigger.yearmonth.js
  57. 8
      src/widget/yearmonthinterval/yearmonthinterval.js
  58. 37
      src/widget/yearquarter/trigger.yearquarter.js
  59. 32
      ui/css/font.css
  60. 8
      utils/utils.js

2
demo/js/base/editor/demo.editor.js

@ -5,7 +5,7 @@ Demo.Editor = BI.inherit(BI.Widget, {
render: function () {
var editor1 = BI.createWidget({
type: "bi.editor",
cls: "mvc-border",
cls: "bi-border",
watermark: "alert信息显示在下面",
errorText: "字段不可重名!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
width: 200,

66
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

7
dist/base.css vendored

@ -927,6 +927,9 @@ li.CodeMirror-hint-active {
cursor: text;
font-size: 14px;
}
.bi-sortable-holder {
border: 1px dashed #d4dadd;
}
.bi-all-count-pager .all-pager-prev {
font-size: 16px;
}
@ -1003,7 +1006,7 @@ body .bi-button,
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
border: 1px solid #178cdf;
border: 1px solid #3685f2;
background-color: #3f8ce8;
text-align: center;
vertical-align: middle;
@ -1069,7 +1072,7 @@ body .bi-button.button-common.ghost:active,
body .bi-button.button-ignore,
#body .bi-button.button-ignore {
background-color: #ffffff;
border-color: #178cdf;
border-color: #3685f2;
}
body .bi-button.button-ignore,
#body .bi-button.button-ignore,

7
dist/base.js vendored

@ -18250,7 +18250,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
},
_analyzeContent: function (v) {
var regx = /\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]/g;
var regx = /\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]|\$[^\{]*[^\$\{]/g;
return v.match(regx);
},
@ -18398,6 +18398,7 @@ BI.Editor = BI.inherit(BI.Single, {
element: this,
items: items
});
this.element[0].tabIndex = -1;
this.editor.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
@ -33951,7 +33952,7 @@ BI.ResizableTable = BI.inherit(BI.Widget, {
if (mouseMoveTracker.isDragging()) {
start = true;
offset += deltaX;
size = BI.clamp(defaultSize + offset, 15, o.width - 15);
size = BI.clamp(defaultSize + offset, 10, o.width - 15);
self.regionResizerHandler.element.addClass("dragging");
self._setRegionResizerHandlerPosition(size - 3, 0);
@ -33959,7 +33960,7 @@ BI.ResizableTable = BI.inherit(BI.Widget, {
}, function () {
if (start === true) {
o.regionColumnSize[0] = BI.clamp(size, 15, o.width - 15);
o.regionColumnSize[0] = BI.clamp(size, 10, o.width - 15);
self.table.setRegionColumnSize(o.regionColumnSize);
if (o.isResizeAdapt === true) {
var freezeColumnSize = self._getFreezeColumnSize();

45
dist/bundle.css vendored

@ -450,7 +450,7 @@ textarea {
color: #ffffff;
}
.bi-high-light-border {
border-color: #178cdf;
border-color: #3685f2;
}
.bi-water-mark {
color: #cccccc;
@ -578,7 +578,7 @@ textarea {
}
.bi-list-item-border:active,
.bi-list-item-border.active {
border: 1px solid #178cdf;
border: 1px solid #3685f2;
}
.bi-list-item-simple:hover,
.bi-list-item-simple.hover {
@ -2973,6 +2973,9 @@ li.CodeMirror-hint-active {
cursor: text;
font-size: 14px;
}
.bi-sortable-holder {
border: 1px dashed #d4dadd;
}
.bi-all-count-pager .all-pager-prev {
font-size: 16px;
}
@ -3049,7 +3052,7 @@ body .bi-button,
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
border: 1px solid #178cdf;
border: 1px solid #3685f2;
background-color: #3f8ce8;
text-align: center;
vertical-align: middle;
@ -3115,7 +3118,7 @@ body .bi-button.button-common.ghost:active,
body .bi-button.button-ignore,
#body .bi-button.button-ignore {
background-color: #ffffff;
border-color: #178cdf;
border-color: #3685f2;
}
body .bi-button.button-ignore,
#body .bi-button.button-ignore,
@ -4597,7 +4600,7 @@ ul.ztree.zTreeDragUL {
color: #999999;
}
.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf {
border: 1px dashed #178cdf;
border: 1px dashed #3685f2;
background: #eaf2fd;
}
.bi-filter-expander {
@ -6031,6 +6034,38 @@ textarea::-webkit-scrollbar-thumb:hover {
content: "\e6d7";
color: inherit;
}
.solid-triangle-top-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.solid-triangle-top-font .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-top-font:hover .b-font:before,
.solid-triangle-top-font.hover .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-top-font.disabled .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-bottom-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.solid-triangle-bottom-font .b-font:before {
content: "\e6d7";
color: inherit;
}
.solid-triangle-bottom-font:hover .b-font:before,
.solid-triangle-bottom-font.hover .b-font:before {
content: "\e6d7";
color: inherit;
}
.solid-triangle-bottom-font.disabled .b-font:before {
content: "\e6d7";
color: inherit;
}
.trigger-triangle-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}

281
dist/bundle.js vendored

@ -24094,15 +24094,15 @@ BI.IntegerBufferSet.prototype = {
remove: function (v) {
this.array.remove(v);
},
splice: function () {
this.array.splice.apply(this.array, arguments);
},
slice: function () {
this.array.slice.apply(this.array, arguments);
},
size: function () {
return this.array.length;
},
@ -24133,7 +24133,7 @@ BI.IntegerBufferSet.prototype = {
},
clear: function () {
this.array.clear();
this.array.length = 0;
}
};
})();!(function () {
@ -35343,22 +35343,28 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var fns = exps.slice();
var complete = false,
running = false;
var callback = function callback(index, newValue, oldValue, options) {
var callback = function callback(index, newValue, oldValue, attrs) {
if (complete === true) {
return;
}
fns[index] = true;
if (runBinaryFunction(fns)) {
complete = true;
cb(newValue, oldValue, options);
}
if (!running) {
running = true;
nextTick(function () {
complete = false;
running = false;
fns = exps.slice();
});
cb(newValue, oldValue, attrs);
}
if (options && options.sync) {
complete = false;
running = false;
fns = exps.slice();
} else {
if (!running) {
running = true;
nextTick(function () {
complete = false;
running = false;
fns = exps.slice();
});
}
}
};
_.each(exps, function (exp, i) {
@ -35388,8 +35394,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var w = new Watcher(model, function () {
dep.depend();
return NaN;
}, function (newValue, oldValue, opt) {
callback(i, newValue, oldValue, _.extend({ index: i }, opt));
}, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
w.teardown();
@ -35429,8 +35435,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var _w = new Watcher(currentModel, function () {
_dep.depend();
return NaN;
}, function (newValue, oldValue, opt) {
callback(i, newValue, oldValue, _.extend({ index: i }, opt));
}, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
_w.teardown();
@ -35438,8 +35444,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
});
return;
}
var watcher = new Watcher(model, exp, function (newValue, oldValue, opt) {
callback(i, newValue, oldValue, _.extend({ index: i }, opt));
var watcher = new Watcher(model, exp, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
watcher.teardown();
@ -54010,7 +54016,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
},
_analyzeContent: function (v) {
var regx = /\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]/g;
var regx = /\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]|\$[^\{]*[^\$\{]/g;
return v.match(regx);
},
@ -54158,6 +54164,7 @@ BI.Editor = BI.inherit(BI.Single, {
element: this,
items: items
});
this.element[0].tabIndex = -1;
this.editor.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
@ -69711,7 +69718,7 @@ BI.ResizableTable = BI.inherit(BI.Widget, {
if (mouseMoveTracker.isDragging()) {
start = true;
offset += deltaX;
size = BI.clamp(defaultSize + offset, 15, o.width - 15);
size = BI.clamp(defaultSize + offset, 10, o.width - 15);
self.regionResizerHandler.element.addClass("dragging");
self._setRegionResizerHandlerPosition(size - 3, 0);
@ -69719,7 +69726,7 @@ BI.ResizableTable = BI.inherit(BI.Widget, {
}, function () {
if (start === true) {
o.regionColumnSize[0] = BI.clamp(size, 15, o.width - 15);
o.regionColumnSize[0] = BI.clamp(size, 10, o.width - 15);
self.table.setRegionColumnSize(o.regionColumnSize);
if (o.isResizeAdapt === true) {
var freezeColumnSize = self._getFreezeColumnSize();
@ -74471,7 +74478,7 @@ BI.ComplexCanvas = BI.inherit(BI.Widget, {
BI.shortcut("bi.complex_canvas", BI.ComplexCanvas);/**
* Created by roy on 15/10/16.
* 上箭头与下箭头切换的树节点
* 与下箭头切换的树节点
*/
BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
@ -79188,6 +79195,7 @@ BI.shortcut("bi.small_text_value_combo", BI.SmallTextValueCombo);BI.TextValueCom
self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val, obj);
}
});
this.check();
BI.createWidget({
type: "bi.vertical",
@ -82005,7 +82013,8 @@ BI.SortList = BI.inherit(BI.Widget, {
}
});
BI.SortList.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.sort_list", BI.SortList);/**
BI.shortcut("bi.sort_list", BI.SortList);
/**
* 有总页数和总行数的分页控件
* Created by Young's on 2016/10/13.
*/
@ -83192,7 +83201,8 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
}
this.instanceDoc = document.defaultView;
this.elm.element.on("mousedown", BI.bind(this.selected, this));
this.elm.element.on("keydown", BI.bind(this.keyDown, this));
this.elm.element.on("keyup", BI.bind(this.keyDown, this));
// this.elm.element.on("keydown", BI.bind(this.keyDown, this));
this.elm.element.on("focus", BI.bind(this.selected, this));
this.elm.element.on("blur", BI.bind(this.blur, this));
this.elm.element.on("keyup", BI.bind(this.selected, this));
@ -83316,6 +83326,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
focus: function () {
this.setFocus(this.elm.element[0]);
this.nicCommand("selectAll");
},
blur: function () {
@ -85855,9 +85866,6 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
this.half.on(BI.HalfIconButton.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);
});
this.checkbox.on(BI.Checkbox.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);
});
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
@ -88465,6 +88473,7 @@ BI.YearPopup = BI.inherit(BI.Widget, {
setValue: function (v) {
var o = this.options;
v = BI.parseInt(v);
if (BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]) {
v = BI.getDate().getFullYear();
this.selectedYear = "";
@ -88592,6 +88601,7 @@ BI.StaticDatePaneCard = BI.inherit(BI.Widget, {
};
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);
});
this.calendar = BI.createWidget({
@ -89315,7 +89325,7 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar
});
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
self.fireEvent("EVENT_CHANGE");
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);
});
this.calendar = BI.createWidget({
@ -89346,6 +89356,7 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar
listeners: [{
eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,
action: function () {
self.selectedTime = BI.extend(self.calendar.getValue(), self.timeSelect.getValue());
self.fireEvent("EVENT_CHANGE");
}
}]
@ -90367,8 +90378,8 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
};
});
if(values.length === 1 && values[0] === BI.DynamicDateCard.TYPE.DAY) {
items.push = [{
if(values.length === 1 && values[0].dateType === BI.DynamicDateCard.TYPE.DAY) {
items.push({
type: "bi.text_value_combo",
height: 24,
items: this._getText(BI.DynamicDateCard.TYPE.MONTH),
@ -90380,7 +90391,7 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
self.fireEvent("EVENT_CHANGE");
}
}]
}];
});
}else{
if(values.length !== 0 && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.DAY && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.WORK_DAY) {
items.push({
@ -90636,8 +90647,11 @@ BI.extend(BI.DynamicDateCard, {
eventName: BI.DynamicDateTrigger.EVENT_ERROR,
action: function () {
self.storeValue = {
year: date.getFullYear(),
month: date.getMonth() + 1
type: BI.DynamicDateCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1
}
};
self.fireEvent(BI.DynamicDateCombo.EVENT_ERROR);
}
@ -90693,9 +90707,12 @@ BI.extend(BI.DynamicDateCard, {
action: function () {
var date = BI.getDate();
self.setValue({
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate()
type: BI.DynamicDateCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate()
}
});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
@ -91485,8 +91502,11 @@ BI.shortcut("bi.dynamic_date_trigger", BI.DynamicDateTrigger);BI.DynamicDateTime
eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,
action: function () {
self.storeValue = {
year: date.getFullYear(),
month: date.getMonth() + 1
type: BI.DynamicDateTimeCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1
}
};
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR);
}
@ -91542,12 +91562,15 @@ BI.shortcut("bi.dynamic_date_trigger", BI.DynamicDateTrigger);BI.DynamicDateTime
action: function () {
var date = BI.getDate();
self.setValue({
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate(),
hour: 0,
minute: 0,
second: 0
type: BI.DynamicDateTimeCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate(),
hour: 0,
minute: 0,
second: 0
}
});
self.combo.hideView();
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);
@ -95127,6 +95150,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
},
setValue: function (v) {
v = BI.parseInt(v);
this.month.setValue([v]);
}
});
@ -99087,8 +99111,8 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, {
return self.trigger.getKeyword();
},
itemsCreator: function (op, callback) {
op.keyword = self.trigger.getKeyword();
this.setKeyword(op.keyword);
op.keywords = [self.trigger.getKeyword()];
this.setKeyword(op.keywords[0]);
o.itemsCreator(op, callback);
}
});
@ -99270,7 +99294,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, {
this._assertValue(res);
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keyword: self.trigger.getKeyword()
keywords: [self.trigger.getKeyword()]
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
@ -99415,8 +99439,8 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
return self.trigger.getKeyword();
},
itemsCreator: function (op, callback) {
op.keyword = self.trigger.getKeyword();
this.setKeyword(op.keyword);
op.keywords = [self.trigger.getKeyword()];
this.setKeyword(op.keywords[0]);
o.itemsCreator(op, callback);
}
});
@ -99584,7 +99608,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
this._assertValue(res);
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keyword: self.trigger.getKeyword()
keywords: [this.trigger.getKey()]
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
@ -104787,7 +104811,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
BI.SingleSelectInsertList.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.storeValue = o.value || {};
this.storeValue = o.value;
var assertShowValue = function () {
BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue);
@ -104843,14 +104867,14 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
eventName: BI.Searcher.EVENT_START,
action: function () {
self._showSearcherPane();
self._setStartValue("");
self._setStartValue();
this.setValue(BI.deepClone(self.storeValue));
}
}, {
eventName: BI.Searcher.EVENT_STOP,
action: function () {
self._showAdapter();
self._setStartValue("");
self._setStartValue();
self.adapter.setValue(self.storeValue);
// 需要刷新回到初始界面,否则搜索的结果不能放在最前面
self.adapter.populate();
@ -104872,7 +104896,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self._setStartValue(keyword);
assertShowValue();
self.adapter.populate();
self._setStartValue("");
self._setStartValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
} else {
@ -104899,7 +104923,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self.adapter.setValue(self.storeValue);
assertShowValue();
self.adapter.populate();
self._setStartValue("");
self._setStartValue();
} else {
self.adapter.setValue(self.storeValue);
assertShowValue();
@ -104909,18 +104933,9 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
}
}, {
eventName: BI.Searcher.EVENT_CHANGE,
action: function (value, obj) {
if (obj instanceof BI.MultiSelectBar) {
self._joinAll(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
} else {
self._join(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
}
action: function () {
self.storeValue = this.getValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
}
}]
});
@ -104963,9 +104978,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
this.trigger.stopEditing();
},
_assertValue: function (val) {
val || (val = "");
},
_assertValue: function () {},
_makeMap: function (values) {
return BI.makeObject(values || []);
@ -105073,7 +105086,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
// this.trigger.adjustView();
},
setValue: function (v) {
this.storeValue = v || "";
this.storeValue = v;
this.adapter.setValue(this.storeValue);
this.trigger.setValue(this.storeValue);
},
@ -106223,7 +106236,9 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
this.text = BI.createWidget({
type: "bi.text_button",
cls: "sign-editor-text",
title: o.title,
title: function () {
return self.getValue();
},
warningTitle: o.warningTitle,
tipType: o.tipType,
textAlign: "left",
@ -108285,7 +108300,7 @@ BI.shortcut("bi.static_year_card", BI.StaticYearCard);BI.DynamicYearCombo = BI.i
eventName: BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear()});
self.setValue({type: BI.DynamicYearCombo.Static, value: {year: date.getFullYear()}});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}
@ -109310,6 +109325,12 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
height: 24
},
beforeInit: function (callback) {
var o = this.options;
o.title = BI.bind(this._titleCreator, this);
callback();
},
_init: function () {
BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments);
var o = this.options;
@ -109385,20 +109406,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP);
});
editor.on(BI.SignEditor.EVENT_CONFIRM, function () {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var monthValue = self.monthEditor.getValue();
self.storeValue = {
type: BI.DynamicDateCombo.Static,
value: {
year: self.yearEditor.getValue(),
month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue
}
};
self.setTitle(self._getStaticTitle(self.storeValue.value));
self._doEditorConfirm(editor);
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
});
editor.on(BI.SignEditor.EVENT_SPACE, function () {
@ -109423,21 +109431,60 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
});
editor.on(BI.SignEditor.EVENT_CHANGE, function () {
if(isYear) {
self._autoSwitch(editor.getValue());
self._autoSwitch(editor);
}
});
return editor;
},
_titleCreator: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
if(!this.monthEditor.isValid() || !this.yearEditor.isValid()) {
return "";
}
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = date.print("%Y-%x");
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
value = value || {};
return this._getStaticTitle(value);
}
},
_doEditorConfirm: function (editor) {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var monthValue = this.monthEditor.getValue();
this.storeValue = {
type: BI.DynamicDateCombo.Static,
value: {
year: this.yearEditor.getValue(),
month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue
}
};
},
_yearCheck: function (v) {
var date = BI.parseDateTime(v, "%Y-%X-%d").print("%Y-%X-%d");
return BI.parseDateTime(v, "%Y").print("%Y") === v && date >= this.options.min && date <= this.options.max;
},
_autoSwitch: function (v) {
if (BI.checkDateLegal(v)) {
_autoSwitch: function (editor) {
var v = editor.getValue();
if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) {
if (v.length === 4 && this._yearCheck(v)) {
this._doEditorConfirm(editor);
this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
this.monthEditor.focus();
}
}
@ -109455,10 +109502,8 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
},
_setInnerValue: function (date, text) {
var dateStr = date.print("%Y-%x");
this.yearEditor.setValue(date.getFullYear());
this.monthEditor.setValue(date.getMonth() + 1);
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
},
_getStaticTitle: function (value) {
@ -109487,10 +109532,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
value = value || {};
var month = BI.isNull(value.month) ? null : value.month;
this.yearEditor.setValue(value.year);
this.yearEditor.setTitle(value.year);
this.monthEditor.setValue(month);
this.monthEditor.setTitle(month);
this.setTitle(this._getStaticTitle(value));
break;
}
},
@ -109680,14 +109722,10 @@ BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.Year
return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;
},
_setTitle: function (v) {
this.left.setTitle(v);
this.right.setTitle(v);
this.label.setTitle(v);
this.setTitle(v);
},
_clearTitle: function () {
this.left.setTitle("");
this.right.setTitle("");
this.label.setTitle("");
this.setTitle("");
},
setValue: function (date) {
date = date || {};
@ -110337,20 +110375,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP);
});
editor.on(BI.SignEditor.EVENT_CONFIRM, function () {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var quarterValue = self.quarterEditor.getValue();
self.storeValue = {
type: BI.DynamicYearQuarterCombo.Static,
value: {
year: self.yearEditor.getValue(),
quarter: BI.isEmptyString(self.quarterEditor.getValue()) ? "" : quarterValue
}
};
self.setTitle(self._getStaticTitle(self.storeValue.value));
self._doEditorConfirm(editor);
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);
});
editor.on(BI.SignEditor.EVENT_SPACE, function () {
@ -110373,14 +110398,32 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
return editor;
},
_doEditorConfirm: function (editor) {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var quarterValue = this.quarterEditor.getValue();
this.storeValue = {
type: BI.DynamicYearQuarterCombo.Static,
value: {
year: this.yearEditor.getValue(),
quarter: BI.isEmptyString(this.quarterEditor.getValue()) ? "" : quarterValue
}
};
this.setTitle(this._getStaticTitle(this.storeValue.value));
},
_yearCheck: function (v) {
var date = BI.parseDateTime(v, "%Y-%X-%d").print("%Y-%X-%d");
return BI.parseDateTime(v, "%Y").print("%Y") === v && date >= this.options.min && date <= this.options.max;
},
_autoSwitch: function (v) {
if (BI.checkDateLegal(v)) {
_autoSwitch: function (editor) {
var v = editor.getValue();
if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) {
if (v.length === 4 && this._yearCheck(v)) {
this._doEditorConfirm(editor);
this.quarterEditor.focus();
}
}

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

46
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

13
dist/case.js vendored

@ -2022,7 +2022,7 @@ BI.ComplexCanvas = BI.inherit(BI.Widget, {
BI.shortcut("bi.complex_canvas", BI.ComplexCanvas);/**
* Created by roy on 15/10/16.
* 上箭头与下箭头切换的树节点
* 与下箭头切换的树节点
*/
BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
@ -6739,6 +6739,7 @@ BI.shortcut("bi.small_text_value_combo", BI.SmallTextValueCombo);BI.TextValueCom
self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val, obj);
}
});
this.check();
BI.createWidget({
type: "bi.vertical",
@ -9556,7 +9557,8 @@ BI.SortList = BI.inherit(BI.Widget, {
}
});
BI.SortList.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.sort_list", BI.SortList);/**
BI.shortcut("bi.sort_list", BI.SortList);
/**
* 有总页数和总行数的分页控件
* Created by Young's on 2016/10/13.
*/
@ -10743,7 +10745,8 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
}
this.instanceDoc = document.defaultView;
this.elm.element.on("mousedown", BI.bind(this.selected, this));
this.elm.element.on("keydown", BI.bind(this.keyDown, this));
this.elm.element.on("keyup", BI.bind(this.keyDown, this));
// this.elm.element.on("keydown", BI.bind(this.keyDown, this));
this.elm.element.on("focus", BI.bind(this.selected, this));
this.elm.element.on("blur", BI.bind(this.blur, this));
this.elm.element.on("keyup", BI.bind(this.selected, this));
@ -10867,6 +10870,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
focus: function () {
this.setFocus(this.elm.element[0]);
this.nicCommand("selectAll");
},
blur: function () {
@ -13406,9 +13410,6 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
this.half.on(BI.HalfIconButton.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);
});
this.checkbox.on(BI.Checkbox.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);
});
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",

4
dist/core.css vendored

@ -450,7 +450,7 @@ textarea {
color: #ffffff;
}
.bi-high-light-border {
border-color: #178cdf;
border-color: #3685f2;
}
.bi-water-mark {
color: #cccccc;
@ -578,7 +578,7 @@ textarea {
}
.bi-list-item-border:active,
.bi-list-item-border.active {
border: 1px solid #178cdf;
border: 1px solid #3685f2;
}
.bi-list-item-simple:hover,
.bi-list-item-simple.hover {

8
dist/core.js vendored

@ -24094,15 +24094,15 @@ BI.IntegerBufferSet.prototype = {
remove: function (v) {
this.array.remove(v);
},
splice: function () {
this.array.splice.apply(this.array, arguments);
},
slice: function () {
this.array.slice.apply(this.array, arguments);
},
size: function () {
return this.array.length;
},
@ -24133,7 +24133,7 @@ BI.IntegerBufferSet.prototype = {
},
clear: function () {
this.array.clear();
this.array.length = 0;
}
};
})();!(function () {

4
dist/core_without_normalize.css vendored

@ -172,7 +172,7 @@ textarea {
color: #ffffff;
}
.bi-high-light-border {
border-color: #178cdf;
border-color: #3685f2;
}
.bi-water-mark {
color: #cccccc;
@ -300,7 +300,7 @@ textarea {
}
.bi-list-item-border:active,
.bi-list-item-border.active {
border: 1px solid #178cdf;
border: 1px solid #3685f2;
}
.bi-list-item-simple:hover,
.bi-list-item-simple.hover {

2
dist/demo.js vendored

@ -717,7 +717,7 @@ BI.shortcut("demo.code_editor", Demo.CodeEditor);Demo.Editor = BI.inherit(BI.Wid
render: function () {
var editor1 = BI.createWidget({
type: "bi.editor",
cls: "mvc-border",
cls: "bi-border",
watermark: "alert信息显示在下面",
errorText: "字段不可重名!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
width: 200,

45
dist/fineui.css vendored

@ -450,7 +450,7 @@ textarea {
color: #ffffff;
}
.bi-high-light-border {
border-color: #178cdf;
border-color: #3685f2;
}
.bi-water-mark {
color: #cccccc;
@ -578,7 +578,7 @@ textarea {
}
.bi-list-item-border:active,
.bi-list-item-border.active {
border: 1px solid #178cdf;
border: 1px solid #3685f2;
}
.bi-list-item-simple:hover,
.bi-list-item-simple.hover {
@ -2973,6 +2973,9 @@ li.CodeMirror-hint-active {
cursor: text;
font-size: 14px;
}
.bi-sortable-holder {
border: 1px dashed #d4dadd;
}
.bi-all-count-pager .all-pager-prev {
font-size: 16px;
}
@ -3049,7 +3052,7 @@ body .bi-button,
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
border: 1px solid #178cdf;
border: 1px solid #3685f2;
background-color: #3f8ce8;
text-align: center;
vertical-align: middle;
@ -3115,7 +3118,7 @@ body .bi-button.button-common.ghost:active,
body .bi-button.button-ignore,
#body .bi-button.button-ignore {
background-color: #ffffff;
border-color: #178cdf;
border-color: #3685f2;
}
body .bi-button.button-ignore,
#body .bi-button.button-ignore,
@ -4597,7 +4600,7 @@ ul.ztree.zTreeDragUL {
color: #999999;
}
.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf {
border: 1px dashed #178cdf;
border: 1px dashed #3685f2;
background: #eaf2fd;
}
.bi-filter-expander {
@ -6031,6 +6034,38 @@ textarea::-webkit-scrollbar-thumb:hover {
content: "\e6d7";
color: inherit;
}
.solid-triangle-top-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe6d6;');
}
.solid-triangle-top-font .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-top-font:hover .b-font:before,
.solid-triangle-top-font.hover .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-top-font.disabled .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-bottom-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe6d7;');
}
.solid-triangle-bottom-font .b-font:before {
content: "\e6d7";
color: inherit;
}
.solid-triangle-bottom-font:hover .b-font:before,
.solid-triangle-bottom-font.hover .b-font:before {
content: "\e6d7";
color: inherit;
}
.solid-triangle-bottom-font.disabled .b-font:before {
content: "\e6d7";
color: inherit;
}
.trigger-triangle-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe64e;');
}

281
dist/fineui.js vendored

@ -24337,15 +24337,15 @@ BI.IntegerBufferSet.prototype = {
remove: function (v) {
this.array.remove(v);
},
splice: function () {
this.array.splice.apply(this.array, arguments);
},
slice: function () {
this.array.slice.apply(this.array, arguments);
},
size: function () {
return this.array.length;
},
@ -24376,7 +24376,7 @@ BI.IntegerBufferSet.prototype = {
},
clear: function () {
this.array.clear();
this.array.length = 0;
}
};
})();!(function () {
@ -35586,22 +35586,28 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var fns = exps.slice();
var complete = false,
running = false;
var callback = function callback(index, newValue, oldValue, options) {
var callback = function callback(index, newValue, oldValue, attrs) {
if (complete === true) {
return;
}
fns[index] = true;
if (runBinaryFunction(fns)) {
complete = true;
cb(newValue, oldValue, options);
}
if (!running) {
running = true;
nextTick(function () {
complete = false;
running = false;
fns = exps.slice();
});
cb(newValue, oldValue, attrs);
}
if (options && options.sync) {
complete = false;
running = false;
fns = exps.slice();
} else {
if (!running) {
running = true;
nextTick(function () {
complete = false;
running = false;
fns = exps.slice();
});
}
}
};
_.each(exps, function (exp, i) {
@ -35631,8 +35637,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var w = new Watcher(model, function () {
dep.depend();
return NaN;
}, function (newValue, oldValue, opt) {
callback(i, newValue, oldValue, _.extend({ index: i }, opt));
}, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
w.teardown();
@ -35672,8 +35678,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var _w = new Watcher(currentModel, function () {
_dep.depend();
return NaN;
}, function (newValue, oldValue, opt) {
callback(i, newValue, oldValue, _.extend({ index: i }, opt));
}, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
_w.teardown();
@ -35681,8 +35687,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
});
return;
}
var watcher = new Watcher(model, exp, function (newValue, oldValue, opt) {
callback(i, newValue, oldValue, _.extend({ index: i }, opt));
var watcher = new Watcher(model, exp, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
watcher.teardown();
@ -54253,7 +54259,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
},
_analyzeContent: function (v) {
var regx = /\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]/g;
var regx = /\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]|\$[^\{]*[^\$\{]/g;
return v.match(regx);
},
@ -54401,6 +54407,7 @@ BI.Editor = BI.inherit(BI.Single, {
element: this,
items: items
});
this.element[0].tabIndex = -1;
this.editor.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
@ -69954,7 +69961,7 @@ BI.ResizableTable = BI.inherit(BI.Widget, {
if (mouseMoveTracker.isDragging()) {
start = true;
offset += deltaX;
size = BI.clamp(defaultSize + offset, 15, o.width - 15);
size = BI.clamp(defaultSize + offset, 10, o.width - 15);
self.regionResizerHandler.element.addClass("dragging");
self._setRegionResizerHandlerPosition(size - 3, 0);
@ -69962,7 +69969,7 @@ BI.ResizableTable = BI.inherit(BI.Widget, {
}, function () {
if (start === true) {
o.regionColumnSize[0] = BI.clamp(size, 15, o.width - 15);
o.regionColumnSize[0] = BI.clamp(size, 10, o.width - 15);
self.table.setRegionColumnSize(o.regionColumnSize);
if (o.isResizeAdapt === true) {
var freezeColumnSize = self._getFreezeColumnSize();
@ -74714,7 +74721,7 @@ BI.ComplexCanvas = BI.inherit(BI.Widget, {
BI.shortcut("bi.complex_canvas", BI.ComplexCanvas);/**
* Created by roy on 15/10/16.
* 上箭头与下箭头切换的树节点
* 与下箭头切换的树节点
*/
BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
@ -79431,6 +79438,7 @@ BI.shortcut("bi.small_text_value_combo", BI.SmallTextValueCombo);BI.TextValueCom
self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val, obj);
}
});
this.check();
BI.createWidget({
type: "bi.vertical",
@ -82248,7 +82256,8 @@ BI.SortList = BI.inherit(BI.Widget, {
}
});
BI.SortList.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.sort_list", BI.SortList);/**
BI.shortcut("bi.sort_list", BI.SortList);
/**
* 有总页数和总行数的分页控件
* Created by Young's on 2016/10/13.
*/
@ -83435,7 +83444,8 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
}
this.instanceDoc = document.defaultView;
this.elm.element.on("mousedown", BI.bind(this.selected, this));
this.elm.element.on("keydown", BI.bind(this.keyDown, this));
this.elm.element.on("keyup", BI.bind(this.keyDown, this));
// this.elm.element.on("keydown", BI.bind(this.keyDown, this));
this.elm.element.on("focus", BI.bind(this.selected, this));
this.elm.element.on("blur", BI.bind(this.blur, this));
this.elm.element.on("keyup", BI.bind(this.selected, this));
@ -83559,6 +83569,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
focus: function () {
this.setFocus(this.elm.element[0]);
this.nicCommand("selectAll");
},
blur: function () {
@ -86098,9 +86109,6 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
this.half.on(BI.HalfIconButton.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);
});
this.checkbox.on(BI.Checkbox.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);
});
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
@ -88708,6 +88716,7 @@ BI.YearPopup = BI.inherit(BI.Widget, {
setValue: function (v) {
var o = this.options;
v = BI.parseInt(v);
if (BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]) {
v = BI.getDate().getFullYear();
this.selectedYear = "";
@ -88835,6 +88844,7 @@ BI.StaticDatePaneCard = BI.inherit(BI.Widget, {
};
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);
});
this.calendar = BI.createWidget({
@ -89558,7 +89568,7 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar
});
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
self.fireEvent("EVENT_CHANGE");
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);
});
this.calendar = BI.createWidget({
@ -89589,6 +89599,7 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar
listeners: [{
eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,
action: function () {
self.selectedTime = BI.extend(self.calendar.getValue(), self.timeSelect.getValue());
self.fireEvent("EVENT_CHANGE");
}
}]
@ -90610,8 +90621,8 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
};
});
if(values.length === 1 && values[0] === BI.DynamicDateCard.TYPE.DAY) {
items.push = [{
if(values.length === 1 && values[0].dateType === BI.DynamicDateCard.TYPE.DAY) {
items.push({
type: "bi.text_value_combo",
height: 24,
items: this._getText(BI.DynamicDateCard.TYPE.MONTH),
@ -90623,7 +90634,7 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
self.fireEvent("EVENT_CHANGE");
}
}]
}];
});
}else{
if(values.length !== 0 && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.DAY && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.WORK_DAY) {
items.push({
@ -90879,8 +90890,11 @@ BI.extend(BI.DynamicDateCard, {
eventName: BI.DynamicDateTrigger.EVENT_ERROR,
action: function () {
self.storeValue = {
year: date.getFullYear(),
month: date.getMonth() + 1
type: BI.DynamicDateCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1
}
};
self.fireEvent(BI.DynamicDateCombo.EVENT_ERROR);
}
@ -90936,9 +90950,12 @@ BI.extend(BI.DynamicDateCard, {
action: function () {
var date = BI.getDate();
self.setValue({
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate()
type: BI.DynamicDateCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate()
}
});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
@ -91728,8 +91745,11 @@ BI.shortcut("bi.dynamic_date_trigger", BI.DynamicDateTrigger);BI.DynamicDateTime
eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,
action: function () {
self.storeValue = {
year: date.getFullYear(),
month: date.getMonth() + 1
type: BI.DynamicDateTimeCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1
}
};
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR);
}
@ -91785,12 +91805,15 @@ BI.shortcut("bi.dynamic_date_trigger", BI.DynamicDateTrigger);BI.DynamicDateTime
action: function () {
var date = BI.getDate();
self.setValue({
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate(),
hour: 0,
minute: 0,
second: 0
type: BI.DynamicDateTimeCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate(),
hour: 0,
minute: 0,
second: 0
}
});
self.combo.hideView();
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);
@ -95370,6 +95393,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
},
setValue: function (v) {
v = BI.parseInt(v);
this.month.setValue([v]);
}
});
@ -99330,8 +99354,8 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, {
return self.trigger.getKeyword();
},
itemsCreator: function (op, callback) {
op.keyword = self.trigger.getKeyword();
this.setKeyword(op.keyword);
op.keywords = [self.trigger.getKeyword()];
this.setKeyword(op.keywords[0]);
o.itemsCreator(op, callback);
}
});
@ -99513,7 +99537,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, {
this._assertValue(res);
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keyword: self.trigger.getKeyword()
keywords: [self.trigger.getKeyword()]
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
@ -99658,8 +99682,8 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
return self.trigger.getKeyword();
},
itemsCreator: function (op, callback) {
op.keyword = self.trigger.getKeyword();
this.setKeyword(op.keyword);
op.keywords = [self.trigger.getKeyword()];
this.setKeyword(op.keywords[0]);
o.itemsCreator(op, callback);
}
});
@ -99827,7 +99851,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
this._assertValue(res);
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keyword: self.trigger.getKeyword()
keywords: [this.trigger.getKey()]
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
@ -105030,7 +105054,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
BI.SingleSelectInsertList.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.storeValue = o.value || {};
this.storeValue = o.value;
var assertShowValue = function () {
BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue);
@ -105086,14 +105110,14 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
eventName: BI.Searcher.EVENT_START,
action: function () {
self._showSearcherPane();
self._setStartValue("");
self._setStartValue();
this.setValue(BI.deepClone(self.storeValue));
}
}, {
eventName: BI.Searcher.EVENT_STOP,
action: function () {
self._showAdapter();
self._setStartValue("");
self._setStartValue();
self.adapter.setValue(self.storeValue);
// 需要刷新回到初始界面,否则搜索的结果不能放在最前面
self.adapter.populate();
@ -105115,7 +105139,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self._setStartValue(keyword);
assertShowValue();
self.adapter.populate();
self._setStartValue("");
self._setStartValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
} else {
@ -105142,7 +105166,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self.adapter.setValue(self.storeValue);
assertShowValue();
self.adapter.populate();
self._setStartValue("");
self._setStartValue();
} else {
self.adapter.setValue(self.storeValue);
assertShowValue();
@ -105152,18 +105176,9 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
}
}, {
eventName: BI.Searcher.EVENT_CHANGE,
action: function (value, obj) {
if (obj instanceof BI.MultiSelectBar) {
self._joinAll(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
} else {
self._join(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
}
action: function () {
self.storeValue = this.getValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
}
}]
});
@ -105206,9 +105221,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
this.trigger.stopEditing();
},
_assertValue: function (val) {
val || (val = "");
},
_assertValue: function () {},
_makeMap: function (values) {
return BI.makeObject(values || []);
@ -105316,7 +105329,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
// this.trigger.adjustView();
},
setValue: function (v) {
this.storeValue = v || "";
this.storeValue = v;
this.adapter.setValue(this.storeValue);
this.trigger.setValue(this.storeValue);
},
@ -106466,7 +106479,9 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
this.text = BI.createWidget({
type: "bi.text_button",
cls: "sign-editor-text",
title: o.title,
title: function () {
return self.getValue();
},
warningTitle: o.warningTitle,
tipType: o.tipType,
textAlign: "left",
@ -108528,7 +108543,7 @@ BI.shortcut("bi.static_year_card", BI.StaticYearCard);BI.DynamicYearCombo = BI.i
eventName: BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear()});
self.setValue({type: BI.DynamicYearCombo.Static, value: {year: date.getFullYear()}});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}
@ -109553,6 +109568,12 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
height: 24
},
beforeInit: function (callback) {
var o = this.options;
o.title = BI.bind(this._titleCreator, this);
callback();
},
_init: function () {
BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments);
var o = this.options;
@ -109628,20 +109649,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP);
});
editor.on(BI.SignEditor.EVENT_CONFIRM, function () {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var monthValue = self.monthEditor.getValue();
self.storeValue = {
type: BI.DynamicDateCombo.Static,
value: {
year: self.yearEditor.getValue(),
month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue
}
};
self.setTitle(self._getStaticTitle(self.storeValue.value));
self._doEditorConfirm(editor);
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
});
editor.on(BI.SignEditor.EVENT_SPACE, function () {
@ -109666,21 +109674,60 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
});
editor.on(BI.SignEditor.EVENT_CHANGE, function () {
if(isYear) {
self._autoSwitch(editor.getValue());
self._autoSwitch(editor);
}
});
return editor;
},
_titleCreator: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
if(!this.monthEditor.isValid() || !this.yearEditor.isValid()) {
return "";
}
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = date.print("%Y-%x");
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
value = value || {};
return this._getStaticTitle(value);
}
},
_doEditorConfirm: function (editor) {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var monthValue = this.monthEditor.getValue();
this.storeValue = {
type: BI.DynamicDateCombo.Static,
value: {
year: this.yearEditor.getValue(),
month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue
}
};
},
_yearCheck: function (v) {
var date = BI.parseDateTime(v, "%Y-%X-%d").print("%Y-%X-%d");
return BI.parseDateTime(v, "%Y").print("%Y") === v && date >= this.options.min && date <= this.options.max;
},
_autoSwitch: function (v) {
if (BI.checkDateLegal(v)) {
_autoSwitch: function (editor) {
var v = editor.getValue();
if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) {
if (v.length === 4 && this._yearCheck(v)) {
this._doEditorConfirm(editor);
this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
this.monthEditor.focus();
}
}
@ -109698,10 +109745,8 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
},
_setInnerValue: function (date, text) {
var dateStr = date.print("%Y-%x");
this.yearEditor.setValue(date.getFullYear());
this.monthEditor.setValue(date.getMonth() + 1);
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
},
_getStaticTitle: function (value) {
@ -109730,10 +109775,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
value = value || {};
var month = BI.isNull(value.month) ? null : value.month;
this.yearEditor.setValue(value.year);
this.yearEditor.setTitle(value.year);
this.monthEditor.setValue(month);
this.monthEditor.setTitle(month);
this.setTitle(this._getStaticTitle(value));
break;
}
},
@ -109923,14 +109965,10 @@ BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.Year
return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;
},
_setTitle: function (v) {
this.left.setTitle(v);
this.right.setTitle(v);
this.label.setTitle(v);
this.setTitle(v);
},
_clearTitle: function () {
this.left.setTitle("");
this.right.setTitle("");
this.label.setTitle("");
this.setTitle("");
},
setValue: function (date) {
date = date || {};
@ -110580,20 +110618,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP);
});
editor.on(BI.SignEditor.EVENT_CONFIRM, function () {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var quarterValue = self.quarterEditor.getValue();
self.storeValue = {
type: BI.DynamicYearQuarterCombo.Static,
value: {
year: self.yearEditor.getValue(),
quarter: BI.isEmptyString(self.quarterEditor.getValue()) ? "" : quarterValue
}
};
self.setTitle(self._getStaticTitle(self.storeValue.value));
self._doEditorConfirm(editor);
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);
});
editor.on(BI.SignEditor.EVENT_SPACE, function () {
@ -110616,14 +110641,32 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
return editor;
},
_doEditorConfirm: function (editor) {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var quarterValue = this.quarterEditor.getValue();
this.storeValue = {
type: BI.DynamicYearQuarterCombo.Static,
value: {
year: this.yearEditor.getValue(),
quarter: BI.isEmptyString(this.quarterEditor.getValue()) ? "" : quarterValue
}
};
this.setTitle(this._getStaticTitle(this.storeValue.value));
},
_yearCheck: function (v) {
var date = BI.parseDateTime(v, "%Y-%X-%d").print("%Y-%X-%d");
return BI.parseDateTime(v, "%Y").print("%Y") === v && date >= this.options.min && date <= this.options.max;
},
_autoSwitch: function (v) {
if (BI.checkDateLegal(v)) {
_autoSwitch: function (editor) {
var v = editor.getValue();
if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) {
if (v.length === 4 && this._yearCheck(v)) {
this._doEditorConfirm(editor);
this.quarterEditor.focus();
}
}

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

66
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

36
dist/fix/fix.js vendored

@ -948,22 +948,28 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var fns = exps.slice();
var complete = false,
running = false;
var callback = function callback(index, newValue, oldValue, options) {
var callback = function callback(index, newValue, oldValue, attrs) {
if (complete === true) {
return;
}
fns[index] = true;
if (runBinaryFunction(fns)) {
complete = true;
cb(newValue, oldValue, options);
cb(newValue, oldValue, attrs);
}
if (!running) {
running = true;
nextTick(function () {
complete = false;
running = false;
fns = exps.slice();
});
if (options && options.sync) {
complete = false;
running = false;
fns = exps.slice();
} else {
if (!running) {
running = true;
nextTick(function () {
complete = false;
running = false;
fns = exps.slice();
});
}
}
};
_.each(exps, function (exp, i) {
@ -993,8 +999,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var w = new Watcher(model, function () {
dep.depend();
return NaN;
}, function (newValue, oldValue, opt) {
callback(i, newValue, oldValue, _.extend({ index: i }, opt));
}, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
w.teardown();
@ -1034,8 +1040,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var _w = new Watcher(currentModel, function () {
_dep.depend();
return NaN;
}, function (newValue, oldValue, opt) {
callback(i, newValue, oldValue, _.extend({ index: i }, opt));
}, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
_w.teardown();
@ -1043,8 +1049,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
});
return;
}
var watcher = new Watcher(model, exp, function (newValue, oldValue, opt) {
callback(i, newValue, oldValue, _.extend({ index: i }, opt));
var watcher = new Watcher(model, exp, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
watcher.teardown();

BIN
dist/font/iconfont.eot vendored

Binary file not shown.

36
dist/font/iconfont.svg vendored

@ -957,6 +957,42 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-
<glyph glyph-name="liekuandengfen" unicode="&#59277;" d="M634.112 345.6H389.952a38.72 38.72 0 0 0-5.44 0.384v-143.488a32 32 0 0 0-54.656-22.656l-179.2 179.2a32 32 0 0 0 0 45.312l179.2 179.2a32 32 0 0 0 54.656-22.592v-138.944a38.72 38.72 0 0 0 5.44 0.384h244.16V560.96a32 32 0 0 0 54.592 22.656l179.264-179.264a32 32 0 0 0 0-45.248l-179.2-179.2a32 32 0 0 0-54.656 22.592V345.6zM70.4 704a38.4 38.4 0 0 0 38.4-38.4v-563.2a38.4 38.4 0 0 0-76.8 0V665.6a38.4 38.4 0 0 0 38.4 38.4z m883.2 0a38.4 38.4 0 0 0 38.4-38.4v-563.2a38.4 38.4 0 1 0-76.8 0V665.6a38.4 38.4 0 0 0 38.4 38.4z" horiz-adv-x="1024" />
<glyph glyph-name="pingtairizhi" unicode="&#59278;" d="M665.6 665.6H358.4V640a38.4 38.4 0 1 0-76.8 0v25.6H160a25.6 25.6 0 0 1-25.6-25.6v-96h755.2V640a25.6 25.6 0 0 1-25.6 25.6h-121.6V640a38.4 38.4 0 0 0-76.8 0v25.6z m76.8 76.8h121.6A102.4 102.4 0 0 0 966.4 640v-576a102.4 102.4 0 0 0-102.4-102.4h-704A102.4 102.4 0 0 0 57.6 64V640a102.4 102.4 0 0 0 102.4 102.4h121.6V768a38.4 38.4 0 1 0 76.8 0v-25.6h307.2V768a38.4 38.4 0 0 0 76.8 0v-25.6z m147.2-275.2H134.4V64c0-14.08 11.52-25.6 25.6-25.6h704a25.6 25.6 0 0 1 25.6 25.6V467.2zM256 307.20000000000005A38.4 38.4 0 1 0 256 384h512a38.4 38.4 0 0 0 0-76.8H256z m0-192A38.4 38.4 0 0 0 256 192h320a38.4 38.4 0 0 0 0-76.8H256z" horiz-adv-x="1024" />
<glyph glyph-name="bangzhuwendang" unicode="&#58977;" d="M249.6 761.6H160a25.6 25.6 0 0 1-25.6-25.6v-704c0-14.08 11.52-25.6 25.6-25.6h729.6V761.6H518.4v-417.344L384 433.856l-134.4-89.6V761.6zM160 838.4h806.4v-908.8H160a102.4 102.4 0 0 0-102.4 102.4v704A102.4 102.4 0 0 0 160 838.4z m0-640h806.4v-268.8H160a102.4 102.4 0 0 0-102.4 102.4v64a102.4 102.4 0 0 0 102.4 102.4z m0-76.8a25.6 25.6 0 0 1-25.6-25.6v-64c0-14.08 11.52-25.6 25.6-25.6h729.6v115.2H160z m166.4 366.144l57.6 38.4 57.6-38.4V761.6H326.4v-273.856z" horiz-adv-x="1024" />
<glyph glyph-name="quxiaoguachu" unicode="&#59279;" d="M506.944 520.128l108.608 108.608a38.4 38.4 0 0 0 54.336-54.272L561.28 465.856l108.608-108.608a38.4 38.4 0 0 0-54.336-54.336L506.944 411.52 398.336 302.912a38.4 38.4 0 0 0-54.272 54.336l108.608 108.608-108.608 108.608a38.4 38.4 0 0 0 54.272 54.272l108.608-108.608zM512 105.408l-286.272-156.16a70.4 70.4 0 0 0-104.128 61.76V725.12a102.4 102.4 0 0 0 102.4 102.4h576a102.4 102.4 0 0 0 102.4-102.4v-714.112a70.4 70.4 0 0 0-104.128-61.76L512 105.408z m313.6 619.712a25.6 25.6 0 0 1-25.6 25.6h-576a25.6 25.6 0 0 1-25.6-25.6v-703.36l279.872 152.704a70.4 70.4 0 0 0 67.456 0l279.872-152.64V725.12z" horiz-adv-x="1024" />
<glyph glyph-name="shenqingguachumoban" unicode="&#59280;" d="M512 105.408l-286.272-156.16a70.4 70.4 0 0 0-104.128 61.76V725.12a102.4 102.4 0 0 0 102.4 102.4h576a102.4 102.4 0 0 0 102.4-102.4v-714.112a70.4 70.4 0 0 0-104.128-61.76L512 105.408z" horiz-adv-x="1024" />
<glyph glyph-name="kuaisuguachu" unicode="&#59281;" d="M512 105.408l-286.272-156.16a70.4 70.4 0 0 0-104.128 61.76V725.12a102.4 102.4 0 0 0 102.4 102.4h576a102.4 102.4 0 0 0 102.4-102.4v-714.112a70.4 70.4 0 0 0-104.128-61.76L512 105.408z m313.6 619.712a25.6 25.6 0 0 1-25.6 25.6h-576a25.6 25.6 0 0 1-25.6-25.6v-703.36l279.872 152.704a70.4 70.4 0 0 0 67.456 0l279.872-152.64V725.12z m-150.72-79.232l-140.736-113.28a19.2 19.2 0 0 1-0.576-29.44l149.504-130.24a19.2 19.2 0 0 0-5.888-32.448l-296.704-111.68a19.2 19.2 0 0 0-18.88 32.832l155.392 126.72a19.2 19.2 0 0 1-1.6 30.912L353.024 525.824a19.2 19.2 0 0 0 3.456 33.92l299.264 118.912a19.2 19.2 0 0 0 19.2-32.768z" horiz-adv-x="1024" />
<glyph glyph-name="icon_mimayuechi" unicode="&#58978;" d="M725.650286 638.464l113.810285-113.810286a43.885714 43.885714 0 1 0-62.098285-62.025143L663.625143 576.365714 468.553143 381.293714a263.314286 263.314286 0 1 0-71.899429 52.224L787.748571 824.685714a43.885714 43.885714 0 0 0 62.025143 0l144.822857-144.822857a43.885714 43.885714 0 1 0-62.025142-62.025143L818.761143 731.428571 725.650286 638.537143z m-445.513143-616.594286a175.542857 175.542857 0 1 1 0 351.085715 175.542857 175.542857 0 0 1 0-351.085715z" horiz-adv-x="1024" />
<glyph glyph-name="icon_shuaxin_normal" unicode="&#58979;" d="M715.008 608.576a314.112 314.112 0 1 1 119.936-368.192 48.768 48.768 0 1 0 91.648-33.408 411.648 411.648 0 1 0-139.52 470.016v106.24a48.768 48.768 0 0 0 97.472 0v-223.424c0-26.944-21.76-48.768-48.768-48.768H612.352a48.768 48.768 0 0 0 0 97.536h102.656z" horiz-adv-x="1024" />
<glyph glyph-name="zhibiaobinglie-hengzhou" unicode="&#58980;" d="M158.336 414.336V768h70.72v-353.664H960v-70.784H229.056v-377.216H158.336V343.552H64V414.336h94.336z m337.088 216.32L324.8 460.032a35.392 35.392 0 0 0-50.048 50.048l206.72 206.656 191.872-96 171.136 128.384a35.392 35.392 0 0 0 42.432-56.576l-206.08-154.56L495.36 630.656z m185.344-564.288l-185.344 92.672-170.624-170.56a35.392 35.392 0 1 0-50.048 49.984l206.72 206.72 191.872-96 171.136 128.384a35.392 35.392 0 0 0 42.432-56.576l-206.08-154.624z" horiz-adv-x="1024" />
<glyph glyph-name="zhibiaobinglie-zongzhou" unicode="&#58981;" d="M480.64 51.2V768h67.2v-716.8h389.76v-67.2H86.4V51.2h394.24zM201.088 532.8l224-224-225.28-225.344a33.6 33.6 0 0 0-47.552 47.488l177.856 177.856-224 224 202.88 202.944a33.6 33.6 0 0 0 47.552-47.488L201.088 532.8z m716.8-224l-225.28-225.344a33.6 33.6 0 0 0-47.552 47.488l177.856 177.856-224 224 202.88 202.944a33.6 33.6 0 0 0 47.552-47.488l-155.456-155.456 224-224z" horiz-adv-x="1024" />
<glyph glyph-name="zhibiaojuhe-hengzhou" unicode="&#58982;" d="M861.056 32H160.896v-64h-69.76v64H64v69.76h27.136V800h69.76v-698.24h700.16V800h69.824v-698.24H960v-69.76h-29.12v-64h-69.76v64zM608.768 453.824l-182.976 91.52-168.32-168.448a34.88 34.88 0 1 0-49.408 49.408l203.968 203.968 189.376-94.72 168.96 126.72a34.88 34.88 0 0 0 41.856-55.872L608.768 453.824z m3.2-234.304L422.592 314.24l-168.96-126.72a34.88 34.88 0 1 0-41.856 55.808l203.456 152.576 182.976-91.52 168.32 168.448a34.88 34.88 0 1 0 49.408-49.344L611.968 219.52z" horiz-adv-x="1024" />
<glyph glyph-name="zhibiaojuhe-zongzhou" unicode="&#58983;" d="M143.168 53.888V690.56H96V761.28h47.168V832h70.72v-70.72H928v-70.784H213.888v-636.608H928v-70.72H213.888V-64H143.168v47.168H96v70.72h47.168z m337.088 440.32L309.632 323.648a35.392 35.392 0 1 0-49.984 49.984l206.656 206.72 191.872-96 171.136 128.384a35.392 35.392 0 1 0 42.432-56.64l-206.08-154.56-185.408 92.672z m188.608-330.112l-191.872 96-171.136-128.384a35.392 35.392 0 0 0-42.432 56.576l206.08 154.624 185.408-92.736 170.624 170.624a35.392 35.392 0 0 0 49.984-50.048l-206.656-206.656z" horiz-adv-x="1024" />
<glyph glyph-name="tuozhuai-heng" unicode="&#59282;" d="M896 469.333333a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z m-170.666667 0a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z m170.666667-170.666666a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z m-170.666667 0a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z m-170.666666 170.666666a42.666667 42.666667 0 1 0-85.333334 0 42.666667 42.666667 0 0 0 85.333334 0z m0-170.666666a42.666667 42.666667 0 1 0-85.333334 0 42.666667 42.666667 0 0 0 85.333334 0z m-170.666667 170.666666a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z m0-170.666666a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z m-170.666667 170.666666a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z m0-170.666666a42.666667 42.666667 0 1 0-85.333333 0 42.666667 42.666667 0 0 0 85.333333 0z" horiz-adv-x="1024" />
</font>

Before

Width:  |  Height:  |  Size: 214 KiB

After

Width:  |  Height:  |  Size: 221 KiB

BIN
dist/font/iconfont.ttf vendored

Binary file not shown.

BIN
dist/font/iconfont.woff vendored

Binary file not shown.

32
dist/resource.css vendored

@ -819,6 +819,38 @@ textarea::-webkit-scrollbar-thumb:hover {
content: "\e6d7";
color: inherit;
}
.solid-triangle-top-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe6d6;');
}
.solid-triangle-top-font .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-top-font:hover .b-font:before,
.solid-triangle-top-font.hover .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-top-font.disabled .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-bottom-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe6d7;');
}
.solid-triangle-bottom-font .b-font:before {
content: "\e6d7";
color: inherit;
}
.solid-triangle-bottom-font:hover .b-font:before,
.solid-triangle-bottom-font.hover .b-font:before {
content: "\e6d7";
color: inherit;
}
.solid-triangle-bottom-font.disabled .b-font:before {
content: "\e6d7";
color: inherit;
}
.trigger-triangle-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe64e;');
}

2
dist/widget.css vendored

@ -108,7 +108,7 @@
color: #999999;
}
.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf {
border: 1px dashed #178cdf;
border: 1px dashed #3685f2;
background: #eaf2fd;
}
.bi-filter-expander {

215
dist/widget.js vendored

@ -1004,6 +1004,7 @@ BI.YearPopup = BI.inherit(BI.Widget, {
setValue: function (v) {
var o = this.options;
v = BI.parseInt(v);
if (BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]) {
v = BI.getDate().getFullYear();
this.selectedYear = "";
@ -1131,6 +1132,7 @@ BI.StaticDatePaneCard = BI.inherit(BI.Widget, {
};
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);
});
this.calendar = BI.createWidget({
@ -1854,7 +1856,7 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar
});
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
self.fireEvent("EVENT_CHANGE");
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);
});
this.calendar = BI.createWidget({
@ -1885,6 +1887,7 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar
listeners: [{
eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,
action: function () {
self.selectedTime = BI.extend(self.calendar.getValue(), self.timeSelect.getValue());
self.fireEvent("EVENT_CHANGE");
}
}]
@ -2906,8 +2909,8 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
};
});
if(values.length === 1 && values[0] === BI.DynamicDateCard.TYPE.DAY) {
items.push = [{
if(values.length === 1 && values[0].dateType === BI.DynamicDateCard.TYPE.DAY) {
items.push({
type: "bi.text_value_combo",
height: 24,
items: this._getText(BI.DynamicDateCard.TYPE.MONTH),
@ -2919,7 +2922,7 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
self.fireEvent("EVENT_CHANGE");
}
}]
}];
});
}else{
if(values.length !== 0 && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.DAY && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.WORK_DAY) {
items.push({
@ -3175,8 +3178,11 @@ BI.extend(BI.DynamicDateCard, {
eventName: BI.DynamicDateTrigger.EVENT_ERROR,
action: function () {
self.storeValue = {
year: date.getFullYear(),
month: date.getMonth() + 1
type: BI.DynamicDateCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1
}
};
self.fireEvent(BI.DynamicDateCombo.EVENT_ERROR);
}
@ -3232,9 +3238,12 @@ BI.extend(BI.DynamicDateCard, {
action: function () {
var date = BI.getDate();
self.setValue({
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate()
type: BI.DynamicDateCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate()
}
});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
@ -4024,8 +4033,11 @@ BI.shortcut("bi.dynamic_date_trigger", BI.DynamicDateTrigger);BI.DynamicDateTime
eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,
action: function () {
self.storeValue = {
year: date.getFullYear(),
month: date.getMonth() + 1
type: BI.DynamicDateTimeCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1
}
};
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR);
}
@ -4081,12 +4093,15 @@ BI.shortcut("bi.dynamic_date_trigger", BI.DynamicDateTrigger);BI.DynamicDateTime
action: function () {
var date = BI.getDate();
self.setValue({
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate(),
hour: 0,
minute: 0,
second: 0
type: BI.DynamicDateTimeCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate(),
hour: 0,
minute: 0,
second: 0
}
});
self.combo.hideView();
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);
@ -7666,6 +7681,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
},
setValue: function (v) {
v = BI.parseInt(v);
this.month.setValue([v]);
}
});
@ -11626,8 +11642,8 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, {
return self.trigger.getKeyword();
},
itemsCreator: function (op, callback) {
op.keyword = self.trigger.getKeyword();
this.setKeyword(op.keyword);
op.keywords = [self.trigger.getKeyword()];
this.setKeyword(op.keywords[0]);
o.itemsCreator(op, callback);
}
});
@ -11809,7 +11825,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, {
this._assertValue(res);
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keyword: self.trigger.getKeyword()
keywords: [self.trigger.getKeyword()]
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
@ -11954,8 +11970,8 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
return self.trigger.getKeyword();
},
itemsCreator: function (op, callback) {
op.keyword = self.trigger.getKeyword();
this.setKeyword(op.keyword);
op.keywords = [self.trigger.getKeyword()];
this.setKeyword(op.keywords[0]);
o.itemsCreator(op, callback);
}
});
@ -12123,7 +12139,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
this._assertValue(res);
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keyword: self.trigger.getKeyword()
keywords: [this.trigger.getKey()]
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
@ -17326,7 +17342,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
BI.SingleSelectInsertList.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.storeValue = o.value || {};
this.storeValue = o.value;
var assertShowValue = function () {
BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue);
@ -17382,14 +17398,14 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
eventName: BI.Searcher.EVENT_START,
action: function () {
self._showSearcherPane();
self._setStartValue("");
self._setStartValue();
this.setValue(BI.deepClone(self.storeValue));
}
}, {
eventName: BI.Searcher.EVENT_STOP,
action: function () {
self._showAdapter();
self._setStartValue("");
self._setStartValue();
self.adapter.setValue(self.storeValue);
// 需要刷新回到初始界面,否则搜索的结果不能放在最前面
self.adapter.populate();
@ -17411,7 +17427,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self._setStartValue(keyword);
assertShowValue();
self.adapter.populate();
self._setStartValue("");
self._setStartValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
} else {
@ -17438,7 +17454,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self.adapter.setValue(self.storeValue);
assertShowValue();
self.adapter.populate();
self._setStartValue("");
self._setStartValue();
} else {
self.adapter.setValue(self.storeValue);
assertShowValue();
@ -17448,18 +17464,9 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
}
}, {
eventName: BI.Searcher.EVENT_CHANGE,
action: function (value, obj) {
if (obj instanceof BI.MultiSelectBar) {
self._joinAll(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
} else {
self._join(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
}
action: function () {
self.storeValue = this.getValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
}
}]
});
@ -17502,9 +17509,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
this.trigger.stopEditing();
},
_assertValue: function (val) {
val || (val = "");
},
_assertValue: function () {},
_makeMap: function (values) {
return BI.makeObject(values || []);
@ -17612,7 +17617,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
// this.trigger.adjustView();
},
setValue: function (v) {
this.storeValue = v || "";
this.storeValue = v;
this.adapter.setValue(this.storeValue);
this.trigger.setValue(this.storeValue);
},
@ -18762,7 +18767,9 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
this.text = BI.createWidget({
type: "bi.text_button",
cls: "sign-editor-text",
title: o.title,
title: function () {
return self.getValue();
},
warningTitle: o.warningTitle,
tipType: o.tipType,
textAlign: "left",
@ -20824,7 +20831,7 @@ BI.shortcut("bi.static_year_card", BI.StaticYearCard);BI.DynamicYearCombo = BI.i
eventName: BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear()});
self.setValue({type: BI.DynamicYearCombo.Static, value: {year: date.getFullYear()}});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}
@ -21849,6 +21856,12 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
height: 24
},
beforeInit: function (callback) {
var o = this.options;
o.title = BI.bind(this._titleCreator, this);
callback();
},
_init: function () {
BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments);
var o = this.options;
@ -21924,20 +21937,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP);
});
editor.on(BI.SignEditor.EVENT_CONFIRM, function () {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var monthValue = self.monthEditor.getValue();
self.storeValue = {
type: BI.DynamicDateCombo.Static,
value: {
year: self.yearEditor.getValue(),
month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue
}
};
self.setTitle(self._getStaticTitle(self.storeValue.value));
self._doEditorConfirm(editor);
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
});
editor.on(BI.SignEditor.EVENT_SPACE, function () {
@ -21962,21 +21962,60 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
});
editor.on(BI.SignEditor.EVENT_CHANGE, function () {
if(isYear) {
self._autoSwitch(editor.getValue());
self._autoSwitch(editor);
}
});
return editor;
},
_titleCreator: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
if(!this.monthEditor.isValid() || !this.yearEditor.isValid()) {
return "";
}
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = date.print("%Y-%x");
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
value = value || {};
return this._getStaticTitle(value);
}
},
_doEditorConfirm: function (editor) {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var monthValue = this.monthEditor.getValue();
this.storeValue = {
type: BI.DynamicDateCombo.Static,
value: {
year: this.yearEditor.getValue(),
month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue
}
};
},
_yearCheck: function (v) {
var date = BI.parseDateTime(v, "%Y-%X-%d").print("%Y-%X-%d");
return BI.parseDateTime(v, "%Y").print("%Y") === v && date >= this.options.min && date <= this.options.max;
},
_autoSwitch: function (v) {
if (BI.checkDateLegal(v)) {
_autoSwitch: function (editor) {
var v = editor.getValue();
if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) {
if (v.length === 4 && this._yearCheck(v)) {
this._doEditorConfirm(editor);
this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
this.monthEditor.focus();
}
}
@ -21994,10 +22033,8 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
},
_setInnerValue: function (date, text) {
var dateStr = date.print("%Y-%x");
this.yearEditor.setValue(date.getFullYear());
this.monthEditor.setValue(date.getMonth() + 1);
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
},
_getStaticTitle: function (value) {
@ -22026,10 +22063,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
value = value || {};
var month = BI.isNull(value.month) ? null : value.month;
this.yearEditor.setValue(value.year);
this.yearEditor.setTitle(value.year);
this.monthEditor.setValue(month);
this.monthEditor.setTitle(month);
this.setTitle(this._getStaticTitle(value));
break;
}
},
@ -22219,14 +22253,10 @@ BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.Year
return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;
},
_setTitle: function (v) {
this.left.setTitle(v);
this.right.setTitle(v);
this.label.setTitle(v);
this.setTitle(v);
},
_clearTitle: function () {
this.left.setTitle("");
this.right.setTitle("");
this.label.setTitle("");
this.setTitle("");
},
setValue: function (date) {
date = date || {};
@ -22876,20 +22906,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP);
});
editor.on(BI.SignEditor.EVENT_CONFIRM, function () {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var quarterValue = self.quarterEditor.getValue();
self.storeValue = {
type: BI.DynamicYearQuarterCombo.Static,
value: {
year: self.yearEditor.getValue(),
quarter: BI.isEmptyString(self.quarterEditor.getValue()) ? "" : quarterValue
}
};
self.setTitle(self._getStaticTitle(self.storeValue.value));
self._doEditorConfirm(editor);
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);
});
editor.on(BI.SignEditor.EVENT_SPACE, function () {
@ -22912,14 +22929,32 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
return editor;
},
_doEditorConfirm: function (editor) {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var quarterValue = this.quarterEditor.getValue();
this.storeValue = {
type: BI.DynamicYearQuarterCombo.Static,
value: {
year: this.yearEditor.getValue(),
quarter: BI.isEmptyString(this.quarterEditor.getValue()) ? "" : quarterValue
}
};
this.setTitle(this._getStaticTitle(this.storeValue.value));
},
_yearCheck: function (v) {
var date = BI.parseDateTime(v, "%Y-%X-%d").print("%Y-%X-%d");
return BI.parseDateTime(v, "%Y").print("%Y") === v && date >= this.options.min && date <= this.options.max;
},
_autoSwitch: function (v) {
if (BI.checkDateLegal(v)) {
_autoSwitch: function (editor) {
var v = editor.getValue();
if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) {
if (v.length === 4 && this._yearCheck(v)) {
this._doEditorConfirm(editor);
this.quarterEditor.focus();
}
}

32
public/css/font.css

@ -498,6 +498,38 @@
content: "\e6d7";
color: inherit;
}
.solid-triangle-top-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe6d6;');
}
.solid-triangle-top-font .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-top-font:hover .b-font:before,
.solid-triangle-top-font.hover .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-top-font.disabled .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-bottom-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe6d7;');
}
.solid-triangle-bottom-font .b-font:before {
content: "\e6d7";
color: inherit;
}
.solid-triangle-bottom-font:hover .b-font:before,
.solid-triangle-bottom-font.hover .b-font:before {
content: "\e6d7";
color: inherit;
}
.solid-triangle-bottom-font.disabled .b-font:before {
content: "\e6d7";
color: inherit;
}
.trigger-triangle-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe64e;');
}

2
src/base/single/editor/editor.code.js

@ -159,7 +159,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
},
_analyzeContent: function (v) {
var regx = /\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]/g;
var regx = /\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]|\$[^\{]*[^\$\{]/g;
return v.match(regx);
},

1
src/base/single/editor/editor.js

@ -98,6 +98,7 @@ BI.Editor = BI.inherit(BI.Single, {
element: this,
items: items
});
this.element[0].tabIndex = -1;
this.editor.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});

4
src/base/table/table.resizable.js

@ -114,7 +114,7 @@ BI.ResizableTable = BI.inherit(BI.Widget, {
if (mouseMoveTracker.isDragging()) {
start = true;
offset += deltaX;
size = BI.clamp(defaultSize + offset, 15, o.width - 15);
size = BI.clamp(defaultSize + offset, 10, o.width - 15);
self.regionResizerHandler.element.addClass("dragging");
self._setRegionResizerHandlerPosition(size - 3, 0);
@ -122,7 +122,7 @@ BI.ResizableTable = BI.inherit(BI.Widget, {
}, function () {
if (start === true) {
o.regionColumnSize[0] = BI.clamp(size, 15, o.width - 15);
o.regionColumnSize[0] = BI.clamp(size, 10, o.width - 15);
self.table.setRegionColumnSize(o.regionColumnSize);
if (o.isResizeAdapt === true) {
var freezeColumnSize = self._getFreezeColumnSize();

2
src/case/checkbox/check.arrownode.js

@ -1,6 +1,6 @@
/**
* Created by roy on 15/10/16.
* 上箭头与下箭头切换的树节点
* 与下箭头切换的树节点
*/
BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {

1
src/case/combo/textvaluecombo/popup.textvalue.js

@ -29,6 +29,7 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, {
self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val, obj);
}
});
this.check();
BI.createWidget({
type: "bi.vertical",

2
src/case/loader/sort.list.js

@ -173,4 +173,4 @@ BI.SortList = BI.inherit(BI.Widget, {
}
});
BI.SortList.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.sort_list", BI.SortList);
BI.shortcut("bi.sort_list", BI.SortList);

4
src/case/richeditor/niceditor/niceditor.js

@ -129,7 +129,8 @@
}
this.instanceDoc = document.defaultView;
this.elm.element.on("mousedown", BI.bind(this.selected, this));
this.elm.element.on("keydown", BI.bind(this.keyDown, this));
this.elm.element.on("keyup", BI.bind(this.keyDown, this));
// this.elm.element.on("keydown", BI.bind(this.keyDown, this));
this.elm.element.on("focus", BI.bind(this.selected, this));
this.elm.element.on("blur", BI.bind(this.blur, this));
this.elm.element.on("keyup", BI.bind(this.selected, this));
@ -253,6 +254,7 @@
focus: function () {
this.setFocus(this.elm.element[0]);
this.nicCommand("selectAll");
},
blur: function () {

3
src/case/toolbar/toolbar.multiselect.js

@ -54,9 +54,6 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
this.half.on(BI.HalfIconButton.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);
});
this.checkbox.on(BI.Checkbox.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);
});
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",

8
src/core/utils/queue.js

@ -44,15 +44,15 @@
remove: function (v) {
this.array.remove(v);
},
splice: function () {
this.array.splice.apply(this.array, arguments);
},
slice: function () {
this.array.slice.apply(this.array, arguments);
},
size: function () {
return this.array.length;
},
@ -83,7 +83,7 @@
},
clear: function () {
this.array.clear();
this.array.length = 0;
}
};
})();

3
src/css/base/loader/sort.css

@ -0,0 +1,3 @@
.bi-sortable-holder {
border: 1px dashed #d4dadd;
}

4
src/css/base/single/button/button.css

@ -3,7 +3,7 @@ body .bi-button,
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
border: 1px solid #178cdf;
border: 1px solid #3685f2;
background-color: #3f8ce8;
text-align: center;
vertical-align: middle;
@ -69,7 +69,7 @@ body .bi-button.button-common.ghost:active,
body .bi-button.button-ignore,
#body .bi-button.button-ignore {
background-color: #ffffff;
border-color: #178cdf;
border-color: #3685f2;
}
body .bi-button.button-ignore,
#body .bi-button.button-ignore,

4
src/css/core/utils/common.css

@ -172,7 +172,7 @@ textarea {
color: #ffffff;
}
.bi-high-light-border {
border-color: #178cdf;
border-color: #3685f2;
}
.bi-water-mark {
color: #cccccc;
@ -300,7 +300,7 @@ textarea {
}
.bi-list-item-border:active,
.bi-list-item-border.active {
border: 1px solid #178cdf;
border: 1px solid #3685f2;
}
.bi-list-item-simple:hover,
.bi-list-item-simple.hover {

32
src/css/resource/font.css

@ -498,6 +498,38 @@
content: "\e6d7";
color: inherit;
}
.solid-triangle-top-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe6d6;');
}
.solid-triangle-top-font .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-top-font:hover .b-font:before,
.solid-triangle-top-font.hover .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-top-font.disabled .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-bottom-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe6d7;');
}
.solid-triangle-bottom-font .b-font:before {
content: "\e6d7";
color: inherit;
}
.solid-triangle-bottom-font:hover .b-font:before,
.solid-triangle-bottom-font.hover .b-font:before {
content: "\e6d7";
color: inherit;
}
.solid-triangle-bottom-font.disabled .b-font:before {
content: "\e6d7";
color: inherit;
}
.trigger-triangle-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe64e;');
}

2
src/css/widget/filter/abstractitem/filter.css

@ -1,4 +1,4 @@
.bi-filter-item .filter-item-empty-item .empty-filter-item-leaf {
border: 1px dashed #178cdf;
border: 1px dashed #3685f2;
background: #eaf2fd;
}

5
src/less/base/loader/sort.list.less

@ -0,0 +1,5 @@
@import "../../index";
.bi-sortable-holder {
border: 1px dashed @color-bi-border-line;
}

2
src/less/lib/constant.less

@ -56,7 +56,7 @@
@border-color-black: #1a1a1a;
@border-color-line: #d4dadd;
@border-color-line-theme-dark: #525466;
@border-color-highlight: #178cdf;
@border-color-highlight: #3685f2;
@border-color-warning: #fbb03b;
@border-color-negative: #e85050;

4
src/less/resource/font.less

@ -65,6 +65,10 @@
.font-hover(column-pre-page-h-font, @font-solid-top);
.font-hover(column-next-page-h-font, @font-solid-bottom);
// 实心下拉三角
.font-hover(solid-triangle-top-font, @font-solid-top);
.font-hover(solid-triangle-bottom-font, @font-solid-bottom);
//下拉框小小三角
.font-hover-active(trigger-triangle-font, @font-no-sort-no-filter, @color-bi-text-gray, @color-bi-text-gray, @color-bi-text-highlight);

1
src/widget/date/calendar/popup.year.js

@ -94,6 +94,7 @@ BI.YearPopup = BI.inherit(BI.Widget, {
setValue: function (v) {
var o = this.options;
v = BI.parseInt(v);
if (BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]) {
v = BI.getDate().getFullYear();
this.selectedYear = "";

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

@ -43,6 +43,7 @@ BI.StaticDatePaneCard = BI.inherit(BI.Widget, {
};
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);
});
this.calendar = BI.createWidget({

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

@ -40,7 +40,7 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
});
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
self.fireEvent("EVENT_CHANGE");
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);
});
this.calendar = BI.createWidget({
@ -71,6 +71,7 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,
action: function () {
self.selectedTime = BI.extend(self.calendar.getValue(), self.timeSelect.getValue());
self.fireEvent("EVENT_CHANGE");
}
}]

6
src/widget/dynamicdate/dynamicdate.card.js

@ -143,8 +143,8 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
};
});
if(values.length === 1 && values[0] === BI.DynamicDateCard.TYPE.DAY) {
items.push = [{
if(values.length === 1 && values[0].dateType === BI.DynamicDateCard.TYPE.DAY) {
items.push({
type: "bi.text_value_combo",
height: 24,
items: this._getText(BI.DynamicDateCard.TYPE.MONTH),
@ -156,7 +156,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
self.fireEvent("EVENT_CHANGE");
}
}]
}];
});
}else{
if(values.length !== 0 && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.DAY && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.WORK_DAY) {
items.push({

16
src/widget/dynamicdate/dynamicdate.combo.js

@ -83,8 +83,11 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
eventName: BI.DynamicDateTrigger.EVENT_ERROR,
action: function () {
self.storeValue = {
year: date.getFullYear(),
month: date.getMonth() + 1
type: BI.DynamicDateCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1
}
};
self.fireEvent(BI.DynamicDateCombo.EVENT_ERROR);
}
@ -140,9 +143,12 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
action: function () {
var date = BI.getDate();
self.setValue({
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate()
type: BI.DynamicDateCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate()
}
});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);

22
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -83,8 +83,11 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,
action: function () {
self.storeValue = {
year: date.getFullYear(),
month: date.getMonth() + 1
type: BI.DynamicDateTimeCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1
}
};
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR);
}
@ -140,12 +143,15 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
action: function () {
var date = BI.getDate();
self.setValue({
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate(),
hour: 0,
minute: 0,
second: 0
type: BI.DynamicDateTimeCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate(),
hour: 0,
minute: 0,
second: 0
}
});
self.combo.hideView();
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);

1
src/widget/month/popup.month.js

@ -77,6 +77,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
},
setValue: function (v) {
v = BI.parseInt(v);
this.month.setValue([v]);
}
});

6
src/widget/multiselectlist/multiselectlist.insert.js

@ -46,8 +46,8 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, {
return self.trigger.getKeyword();
},
itemsCreator: function (op, callback) {
op.keyword = self.trigger.getKeyword();
this.setKeyword(op.keyword);
op.keywords = [self.trigger.getKeyword()];
this.setKeyword(op.keywords[0]);
o.itemsCreator(op, callback);
}
});
@ -229,7 +229,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, {
this._assertValue(res);
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keyword: self.trigger.getKeyword()
keywords: [self.trigger.getKeyword()]
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {

6
src/widget/multiselectlist/multiselectlist.js

@ -47,8 +47,8 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
return self.trigger.getKeyword();
},
itemsCreator: function (op, callback) {
op.keyword = self.trigger.getKeyword();
this.setKeyword(op.keyword);
op.keywords = [self.trigger.getKeyword()];
this.setKeyword(op.keywords[0]);
o.itemsCreator(op, callback);
}
});
@ -216,7 +216,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
this._assertValue(res);
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keyword: self.trigger.getKeyword()
keywords: [this.trigger.getKey()]
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {

31
src/widget/singleselect/singleselectlist.insert.js

@ -15,7 +15,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
BI.SingleSelectInsertList.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.storeValue = o.value || {};
this.storeValue = o.value;
var assertShowValue = function () {
BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue);
@ -71,14 +71,14 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
eventName: BI.Searcher.EVENT_START,
action: function () {
self._showSearcherPane();
self._setStartValue("");
self._setStartValue();
this.setValue(BI.deepClone(self.storeValue));
}
}, {
eventName: BI.Searcher.EVENT_STOP,
action: function () {
self._showAdapter();
self._setStartValue("");
self._setStartValue();
self.adapter.setValue(self.storeValue);
// 需要刷新回到初始界面,否则搜索的结果不能放在最前面
self.adapter.populate();
@ -100,7 +100,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self._setStartValue(keyword);
assertShowValue();
self.adapter.populate();
self._setStartValue("");
self._setStartValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
} else {
@ -127,7 +127,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self.adapter.setValue(self.storeValue);
assertShowValue();
self.adapter.populate();
self._setStartValue("");
self._setStartValue();
} else {
self.adapter.setValue(self.storeValue);
assertShowValue();
@ -137,18 +137,9 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
}
}, {
eventName: BI.Searcher.EVENT_CHANGE,
action: function (value, obj) {
if (obj instanceof BI.MultiSelectBar) {
self._joinAll(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
} else {
self._join(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
}
action: function () {
self.storeValue = this.getValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
}
}]
});
@ -191,9 +182,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
this.trigger.stopEditing();
},
_assertValue: function (val) {
val || (val = "");
},
_assertValue: function () {},
_makeMap: function (values) {
return BI.makeObject(values || []);
@ -301,7 +290,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
// this.trigger.adjustView();
},
setValue: function (v) {
this.storeValue = v || "";
this.storeValue = v;
this.adapter.setValue(this.storeValue);
this.trigger.setValue(this.storeValue);
},

4
src/widget/singleslider/button/editor.sign.text.js

@ -44,7 +44,9 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
this.text = BI.createWidget({
type: "bi.text_button",
cls: "sign-editor-text",
title: o.title,
title: function () {
return self.getValue();
},
warningTitle: o.warningTitle,
tipType: o.tipType,
textAlign: "left",

2
src/widget/year/combo.year.js

@ -76,7 +76,7 @@ BI.DynamicYearCombo = BI.inherit(BI.Widget, {
eventName: BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear()});
self.setValue({type: BI.DynamicYearCombo.Static, value: {year: date.getFullYear()}});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}

71
src/widget/yearmonth/trigger.yearmonth.js

@ -11,6 +11,12 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
height: 24
},
beforeInit: function (callback) {
var o = this.options;
o.title = BI.bind(this._titleCreator, this);
callback();
},
_init: function () {
BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments);
var o = this.options;
@ -86,20 +92,7 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP);
});
editor.on(BI.SignEditor.EVENT_CONFIRM, function () {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var monthValue = self.monthEditor.getValue();
self.storeValue = {
type: BI.DynamicDateCombo.Static,
value: {
year: self.yearEditor.getValue(),
month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue
}
};
self.setTitle(self._getStaticTitle(self.storeValue.value));
self._doEditorConfirm(editor);
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
});
editor.on(BI.SignEditor.EVENT_SPACE, function () {
@ -124,21 +117,60 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
});
editor.on(BI.SignEditor.EVENT_CHANGE, function () {
if(isYear) {
self._autoSwitch(editor.getValue());
self._autoSwitch(editor);
}
});
return editor;
},
_titleCreator: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
if(!this.monthEditor.isValid() || !this.yearEditor.isValid()) {
return "";
}
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = date.print("%Y-%x");
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
value = value || {};
return this._getStaticTitle(value);
}
},
_doEditorConfirm: function (editor) {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var monthValue = this.monthEditor.getValue();
this.storeValue = {
type: BI.DynamicDateCombo.Static,
value: {
year: this.yearEditor.getValue(),
month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue
}
};
},
_yearCheck: function (v) {
var date = BI.parseDateTime(v, "%Y-%X-%d").print("%Y-%X-%d");
return BI.parseDateTime(v, "%Y").print("%Y") === v && date >= this.options.min && date <= this.options.max;
},
_autoSwitch: function (v) {
if (BI.checkDateLegal(v)) {
_autoSwitch: function (editor) {
var v = editor.getValue();
if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) {
if (v.length === 4 && this._yearCheck(v)) {
this._doEditorConfirm(editor);
this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
this.monthEditor.focus();
}
}
@ -156,10 +188,8 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
},
_setInnerValue: function (date, text) {
var dateStr = date.print("%Y-%x");
this.yearEditor.setValue(date.getFullYear());
this.monthEditor.setValue(date.getMonth() + 1);
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
},
_getStaticTitle: function (value) {
@ -188,10 +218,7 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
value = value || {};
var month = BI.isNull(value.month) ? null : value.month;
this.yearEditor.setValue(value.year);
this.yearEditor.setTitle(value.year);
this.monthEditor.setValue(month);
this.monthEditor.setTitle(month);
this.setTitle(this._getStaticTitle(value));
break;
}
},

8
src/widget/yearmonthinterval/yearmonthinterval.js

@ -164,14 +164,10 @@ BI.YearMonthInterval = BI.inherit(BI.Single, {
return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;
},
_setTitle: function (v) {
this.left.setTitle(v);
this.right.setTitle(v);
this.label.setTitle(v);
this.setTitle(v);
},
_clearTitle: function () {
this.left.setTitle("");
this.right.setTitle("");
this.label.setTitle("");
this.setTitle("");
},
setValue: function (date) {
date = date || {};

37
src/widget/yearquarter/trigger.yearquarter.js

@ -87,20 +87,7 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP);
});
editor.on(BI.SignEditor.EVENT_CONFIRM, function () {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var quarterValue = self.quarterEditor.getValue();
self.storeValue = {
type: BI.DynamicYearQuarterCombo.Static,
value: {
year: self.yearEditor.getValue(),
quarter: BI.isEmptyString(self.quarterEditor.getValue()) ? "" : quarterValue
}
};
self.setTitle(self._getStaticTitle(self.storeValue.value));
self._doEditorConfirm(editor);
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);
});
editor.on(BI.SignEditor.EVENT_SPACE, function () {
@ -123,14 +110,32 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
return editor;
},
_doEditorConfirm: function (editor) {
var value = editor.getValue();
if (BI.isNotNull(value)) {
editor.setValue(value);
}
var quarterValue = this.quarterEditor.getValue();
this.storeValue = {
type: BI.DynamicYearQuarterCombo.Static,
value: {
year: this.yearEditor.getValue(),
quarter: BI.isEmptyString(this.quarterEditor.getValue()) ? "" : quarterValue
}
};
this.setTitle(this._getStaticTitle(this.storeValue.value));
},
_yearCheck: function (v) {
var date = BI.parseDateTime(v, "%Y-%X-%d").print("%Y-%X-%d");
return BI.parseDateTime(v, "%Y").print("%Y") === v && date >= this.options.min && date <= this.options.max;
},
_autoSwitch: function (v) {
if (BI.checkDateLegal(v)) {
_autoSwitch: function (editor) {
var v = editor.getValue();
if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) {
if (v.length === 4 && this._yearCheck(v)) {
this._doEditorConfirm(editor);
this.quarterEditor.focus();
}
}

32
ui/css/font.css

@ -498,6 +498,38 @@
content: "\e6d7";
color: inherit;
}
.solid-triangle-top-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe6d6;');
}
.solid-triangle-top-font .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-top-font:hover .b-font:before,
.solid-triangle-top-font.hover .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-top-font.disabled .b-font:before {
content: "\e6d6";
color: inherit;
}
.solid-triangle-bottom-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe6d7;');
}
.solid-triangle-bottom-font .b-font:before {
content: "\e6d7";
color: inherit;
}
.solid-triangle-bottom-font:hover .b-font:before,
.solid-triangle-bottom-font.hover .b-font:before {
content: "\e6d7";
color: inherit;
}
.solid-triangle-bottom-font.disabled .b-font:before {
content: "\e6d7";
color: inherit;
}
.trigger-triangle-font .b-font {
*zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '&#xe64e;');
}

8
utils/utils.js

@ -15724,15 +15724,15 @@ BI.IntegerBufferSet.prototype = {
remove: function (v) {
this.array.remove(v);
},
splice: function () {
this.array.splice.apply(this.array, arguments);
},
slice: function () {
this.array.slice.apply(this.array, arguments);
},
size: function () {
return this.array.length;
},
@ -15763,7 +15763,7 @@ BI.IntegerBufferSet.prototype = {
},
clear: function () {
this.array.clear();
this.array.length = 0;
}
};
})();!(function () {

Loading…
Cancel
Save