|
|
@ -54164,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); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -83997,11 +83998,13 @@ BI.RichEditor = BI.inherit(BI.Widget, { |
|
|
|
listeners: [{ |
|
|
|
listeners: [{ |
|
|
|
eventName: BI.NicEditor.EVENT_BLUR, |
|
|
|
eventName: BI.NicEditor.EVENT_BLUR, |
|
|
|
action: function () { |
|
|
|
action: function () { |
|
|
|
|
|
|
|
self.element.removeClass("bi-editor-focus"); |
|
|
|
self.fireEvent(BI.RichEditor.EVENT_CONFIRM); |
|
|
|
self.fireEvent(BI.RichEditor.EVENT_CONFIRM); |
|
|
|
} |
|
|
|
} |
|
|
|
}, { |
|
|
|
}, { |
|
|
|
eventName: BI.NicEditor.EVENT_FOCUS, |
|
|
|
eventName: BI.NicEditor.EVENT_FOCUS, |
|
|
|
action: function () { |
|
|
|
action: function () { |
|
|
|
|
|
|
|
self.element.addClass("bi-editor-focus"); |
|
|
|
if (!o.readOnly && !self.combo.isViewVisible()) { |
|
|
|
if (!o.readOnly && !self.combo.isViewVisible()) { |
|
|
|
self.combo.showView(); |
|
|
|
self.combo.showView(); |
|
|
|
} |
|
|
|
} |
|
|
@ -106222,7 +106225,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", |
|
|
@ -109309,6 +109314,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; |
|
|
@ -109416,6 +109427,27 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY |
|
|
|
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) { |
|
|
|
_doEditorConfirm: function (editor) { |
|
|
|
var value = editor.getValue(); |
|
|
|
var value = editor.getValue(); |
|
|
|
if (BI.isNotNull(value)) { |
|
|
|
if (BI.isNotNull(value)) { |
|
|
@ -109429,7 +109461,6 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY |
|
|
|
month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue |
|
|
|
month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.setTitle(this._getStaticTitle(this.storeValue.value)); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_yearCheck: function (v) { |
|
|
|
_yearCheck: function (v) { |
|
|
@ -109460,10 +109491,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) { |
|
|
@ -109492,10 +109521,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; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -109685,14 +109711,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 || {}; |
|
|
|