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