|
|
|
@ -24133,7 +24133,7 @@ BI.IntegerBufferSet.prototype = {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
clear: function () { |
|
|
|
|
this.array.clear(); |
|
|
|
|
this.array.length = 0; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
})();!(function () { |
|
|
|
@ -35343,15 +35343,20 @@ 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 (options && options.sync) { |
|
|
|
|
complete = false; |
|
|
|
|
running = false; |
|
|
|
|
fns = exps.slice(); |
|
|
|
|
} else { |
|
|
|
|
if (!running) { |
|
|
|
|
running = true; |
|
|
|
|
nextTick(function () { |
|
|
|
@ -35360,6 +35365,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
|
|
fns = exps.slice(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
_.each(exps, function (exp, i) { |
|
|
|
|
if (_.has(operators, exp)) { |
|
|
|
@ -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 = { |
|
|
|
|
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({ |
|
|
|
|
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 = { |
|
|
|
|
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({ |
|
|
|
|
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(); |
|
|
|
|
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(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|