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