|
|
|
@ -36196,7 +36196,7 @@ BI.Single = BI.inherit(BI.Widget, {
|
|
|
|
|
// opt: {container: '', belowMouse: false}
|
|
|
|
|
setTitle: function (title, opt) { |
|
|
|
|
this.options.title = title; |
|
|
|
|
if (BI.isKey(title)) { |
|
|
|
|
if (BI.isKey(title) || BI.isFunction(title)) { |
|
|
|
|
this.enableHover(opt); |
|
|
|
|
} else { |
|
|
|
|
this.disabledHover(); |
|
|
|
@ -36205,7 +36205,7 @@ BI.Single = BI.inherit(BI.Widget, {
|
|
|
|
|
|
|
|
|
|
setWarningTitle: function (title, opt) { |
|
|
|
|
this.options.warningTitle = title; |
|
|
|
|
if (BI.isKey(title)) { |
|
|
|
|
if (BI.isKey(title) || BI.isFunction(title)) { |
|
|
|
|
this.enableHover(opt); |
|
|
|
|
} else { |
|
|
|
|
this.disabledHover(); |
|
|
|
@ -54368,9 +54368,9 @@ BI.Editor = BI.inherit(BI.Single, {
|
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
|
if (!this.isValid()) { |
|
|
|
|
return BI.trim(this.editor.getLastValidValue()); |
|
|
|
|
return this.editor.getLastValidValue(); |
|
|
|
|
} |
|
|
|
|
return BI.trim(this.editor.getValue()); |
|
|
|
|
return this.editor.getValue(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
isEditing: function () { |
|
|
|
@ -55493,7 +55493,7 @@ BI.Input = BI.inherit(BI.Single, {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function blur () { |
|
|
|
|
if (!self.isValid() && self.options.quitChecker.apply(self, [BI.trim(self.getValue())]) !== false) { |
|
|
|
|
if (!self.isValid() && self.options.quitChecker.apply(self, [self.getValue()]) !== false) { |
|
|
|
|
self.element.val(self._lastValidValue ? self._lastValidValue : ""); |
|
|
|
|
self._checkValidationOnValueChange(); |
|
|
|
|
self._defaultState(); |
|
|
|
@ -55523,11 +55523,11 @@ BI.Input = BI.inherit(BI.Single, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
onKeyDown: function (keyCode, ctrlKey) { |
|
|
|
|
if (!this.isValid() || BI.trim(this._lastValidValue) !== BI.trim(this.getValue())) { |
|
|
|
|
if (!this.isValid() || this._lastValidValue !== this.getValue()) { |
|
|
|
|
this._checkValidationOnValueChange(); |
|
|
|
|
} |
|
|
|
|
if (this.isValid() && BI.trim(this.getValue()) !== "") { |
|
|
|
|
if (BI.trim(this.getValue()) !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === "") |
|
|
|
|
if (this.isValid() && this.getValue() !== "") { |
|
|
|
|
if (this.getValue() !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === "") |
|
|
|
|
|| (this._pause === true && !/(\s|\u00A0)$/.test(this.getValue()))) { |
|
|
|
|
this._start = true; |
|
|
|
|
this._pause = false; |
|
|
|
@ -55539,7 +55539,7 @@ BI.Input = BI.inherit(BI.Single, {
|
|
|
|
|
this._valueChange(); |
|
|
|
|
} else { |
|
|
|
|
if (keyCode == BI.KeyCode.ENTER) { |
|
|
|
|
if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) { |
|
|
|
|
if (this.isValid() || this.options.quitChecker.apply(this, [this.getValue()]) !== false) { |
|
|
|
|
this.blur(); |
|
|
|
|
this.fireEvent(BI.Input.EVENT_ENTER); |
|
|
|
|
} else { |
|
|
|
@ -55564,7 +55564,7 @@ BI.Input = BI.inherit(BI.Single, {
|
|
|
|
|
this.fireEvent(BI.Input.EVENT_PAUSE); |
|
|
|
|
this._defaultState(); |
|
|
|
|
} else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) && |
|
|
|
|
BI.trim(this.getValue()) === "" && (this._lastValue !== null && BI.trim(this._lastValue) !== "")) { |
|
|
|
|
this.getValue() === "" && (this._lastValue !== null && this._lastValue !== "")) { |
|
|
|
|
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this); |
|
|
|
|
this.fireEvent(BI.Input.EVENT_STOP); |
|
|
|
|
this._valueChange(); |
|
|
|
@ -55584,10 +55584,10 @@ BI.Input = BI.inherit(BI.Single, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_valueChange: function () { |
|
|
|
|
if (this.isValid() && BI.trim(this.getValue()) !== this._lastSubmitValue) { |
|
|
|
|
if (this.isValid() && this.getValue() !== this._lastSubmitValue) { |
|
|
|
|
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this); |
|
|
|
|
this.fireEvent(BI.Input.EVENT_CHANGE); |
|
|
|
|
this._lastSubmitValue = BI.trim(this.getValue()); |
|
|
|
|
this._lastSubmitValue = this.getValue(); |
|
|
|
|
} |
|
|
|
|
if (this.getValue() == "") { |
|
|
|
|
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); |
|
|
|
@ -55600,10 +55600,10 @@ BI.Input = BI.inherit(BI.Single, {
|
|
|
|
|
var o = this.options; |
|
|
|
|
var v = this.getValue(); |
|
|
|
|
this.setValid( |
|
|
|
|
(o.allowBlank === true && BI.trim(v) == "") || |
|
|
|
|
(BI.isNotEmptyString(BI.trim(v)) |
|
|
|
|
(o.allowBlank === true && v == "") || |
|
|
|
|
(BI.isNotEmptyString(v) |
|
|
|
|
&& (v === this._lastValidValue || |
|
|
|
|
o.validationChecker.apply(this, [BI.trim(v)]) !== false)) |
|
|
|
|
o.validationChecker.apply(this, [v]) !== false)) |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -55663,13 +55663,13 @@ BI.Input = BI.inherit(BI.Single, {
|
|
|
|
|
BI.Input.superclass._setValid.apply(this, arguments); |
|
|
|
|
if (this.isValid()) { |
|
|
|
|
this.element.removeClass("bi-input-error"); |
|
|
|
|
this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this); |
|
|
|
|
this.fireEvent(BI.Input.EVENT_VALID, this.getValue(), this); |
|
|
|
|
} else { |
|
|
|
|
if (this._lastValidValue === this.getValue()) { |
|
|
|
|
this._lastValidValue = null; |
|
|
|
|
} |
|
|
|
|
this.element.addClass("bi-input-error"); |
|
|
|
|
this.fireEvent(BI.Input.EVENT_ERROR, BI.trim(this.getValue()), this); |
|
|
|
|
this.fireEvent(BI.Input.EVENT_ERROR, this.getValue(), this); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -76904,6 +76904,7 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
|
|
|
|
|
_init: function () { |
|
|
|
|
BI.ColorPickerEditor.superclass._init.apply(this, arguments); |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
this.storeValue = {}; |
|
|
|
|
this.colorShow = BI.createWidget({ |
|
|
|
|
type: "bi.layout", |
|
|
|
|
cls: "color-picker-editor-display bi-card", |
|
|
|
@ -76924,14 +76925,15 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
|
|
|
|
|
cls: "color-picker-editor-input", |
|
|
|
|
validationChecker: checker, |
|
|
|
|
errorText: BI.i18nText("BI-Color_Picker_Error_Text"), |
|
|
|
|
allowBlank: true, |
|
|
|
|
allowBlank: false, |
|
|
|
|
value: 255, |
|
|
|
|
width: 32, |
|
|
|
|
height: 20 |
|
|
|
|
}); |
|
|
|
|
BI.each(Ws, function (i, w) { |
|
|
|
|
w.on(BI.TextEditor.EVENT_CHANGE, function () { |
|
|
|
|
if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { |
|
|
|
|
self._checkEditors(); |
|
|
|
|
if (checker(self.storeValue.r) && checker(self.storeValue.g) && checker(self.storeValue.b)) { |
|
|
|
|
self.colorShow.element.css("background-color", self.getValue()); |
|
|
|
|
self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE); |
|
|
|
|
} |
|
|
|
@ -77031,6 +77033,23 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
|
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_checkEditors: function () { |
|
|
|
|
if(BI.isEmptyString(this.R.getValue())) { |
|
|
|
|
this.R.setValue(0); |
|
|
|
|
} |
|
|
|
|
if(BI.isEmptyString(this.G.getValue())) { |
|
|
|
|
this.G.setValue(0); |
|
|
|
|
} |
|
|
|
|
if(BI.isEmptyString(this.B.getValue())) { |
|
|
|
|
this.B.setValue(0); |
|
|
|
|
} |
|
|
|
|
this.storeValue = { |
|
|
|
|
r: this.R.getValue() || 0, |
|
|
|
|
g: this.G.getValue() || 0, |
|
|
|
|
b: this.B.getValue() || 0 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_showPreColor: function (color) { |
|
|
|
|
if (color === "") { |
|
|
|
|
this.colorShow.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-background"); |
|
|
|
@ -77049,6 +77068,11 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
|
|
|
|
|
this.R.setValue(""); |
|
|
|
|
this.G.setValue(""); |
|
|
|
|
this.B.setValue(""); |
|
|
|
|
this.storeValue = { |
|
|
|
|
r: "", |
|
|
|
|
g: "", |
|
|
|
|
b: "" |
|
|
|
|
}; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!color) { |
|
|
|
@ -77060,9 +77084,14 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
|
|
|
|
|
this.transparent.setSelected(false); |
|
|
|
|
this._showPreColor(color); |
|
|
|
|
var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color)); |
|
|
|
|
this.R.setValue(BI.isNull(json.r) ? "" : json.r); |
|
|
|
|
this.G.setValue(BI.isNull(json.g) ? "" : json.g); |
|
|
|
|
this.B.setValue(BI.isNull(json.b) ? "" : json.b); |
|
|
|
|
this.storeValue = { |
|
|
|
|
r: BI.isNull(json.r) ? "" : json.r, |
|
|
|
|
g: BI.isNull(json.r) ? "" : json.g, |
|
|
|
|
b: BI.isNull(json.r) ? "" : json.b |
|
|
|
|
}; |
|
|
|
|
this.R.setValue(this.storeValue.r); |
|
|
|
|
this.G.setValue(this.storeValue.g); |
|
|
|
|
this.B.setValue(this.storeValue.b); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
@ -77070,9 +77099,9 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
|
|
|
|
|
return "transparent"; |
|
|
|
|
} |
|
|
|
|
return BI.DOM.rgb2hex(BI.DOM.json2rgb({ |
|
|
|
|
r: this.R.getValue(), |
|
|
|
|
g: this.G.getValue(), |
|
|
|
|
b: this.B.getValue() |
|
|
|
|
r: this.storeValue.r, |
|
|
|
|
g: this.storeValue.g, |
|
|
|
|
b: this.storeValue.b |
|
|
|
|
})); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
@ -82871,29 +82900,29 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
|
|
|
|
|
BI.RichEditorParamAction.superclass._init.apply(this, arguments); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_createBlankNode: function () { |
|
|
|
|
return $("<span>").html(" "); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_addBlank: function ($param) { |
|
|
|
|
var o = this.options; |
|
|
|
|
var instance = o.editor.selectedInstance; |
|
|
|
|
var next = $param.next(); |
|
|
|
|
if (next.length === 0) { |
|
|
|
|
var nextNode = this._createBlankNode(); |
|
|
|
|
$param.after(nextNode); |
|
|
|
|
instance.setFocus(nextNode[0]); |
|
|
|
|
} else { |
|
|
|
|
instance.setFocus(next[0]); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_get$Sel: function () { |
|
|
|
|
var o = this.options; |
|
|
|
|
var instance = o.editor.selectedInstance; |
|
|
|
|
var sel = $(instance.selElm()); |
|
|
|
|
return sel; |
|
|
|
|
}, |
|
|
|
|
// _createBlankNode: function () {
|
|
|
|
|
// return $("<span>").html(" ");
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
// _addBlank: function ($param) {
|
|
|
|
|
// var o = this.options;
|
|
|
|
|
// var instance = o.editor.selectedInstance;
|
|
|
|
|
// var next = $param.next();
|
|
|
|
|
// if (next.length === 0) {
|
|
|
|
|
// var nextNode = this._createBlankNode();
|
|
|
|
|
// $param.after(nextNode);
|
|
|
|
|
// instance.setFocus(nextNode[0]);
|
|
|
|
|
// } else {
|
|
|
|
|
// instance.setFocus(next[0]);
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
//
|
|
|
|
|
// _get$Sel: function () {
|
|
|
|
|
// var o = this.options;
|
|
|
|
|
// var instance = o.editor.selectedInstance;
|
|
|
|
|
// var sel = $(instance.selElm());
|
|
|
|
|
// return sel;
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
addParam: function (param) { |
|
|
|
|
var o = this.options; |
|
|
|
@ -82904,14 +82933,15 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
|
|
|
|
|
image.alt = param; |
|
|
|
|
image.style = attrs.style; |
|
|
|
|
$(image).addClass("rich-editor-param"); |
|
|
|
|
var sel = this._get$Sel(); |
|
|
|
|
var wrapper = o.editor.instance.getElm().element; |
|
|
|
|
if (wrapper.find(sel).length <= 0) { |
|
|
|
|
wrapper.append(image); |
|
|
|
|
} else { |
|
|
|
|
sel.after(image); |
|
|
|
|
} |
|
|
|
|
this._addBlank($(image)); |
|
|
|
|
this.options.editor.insertHTML($("<div>").append(image).html()); |
|
|
|
|
// var sel = this._get$Sel();
|
|
|
|
|
// var wrapper = o.editor.instance.getElm().element;
|
|
|
|
|
// if (wrapper.find(sel).length <= 0) {
|
|
|
|
|
// wrapper.append(image);
|
|
|
|
|
// } else {
|
|
|
|
|
// sel.after(image);
|
|
|
|
|
// }
|
|
|
|
|
// this._addBlank($(image));
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -83124,12 +83154,24 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
|
|
|
|
|
} else { |
|
|
|
|
console.error("不支持此浏览器"); |
|
|
|
|
} |
|
|
|
|
if(o.readOnly) { |
|
|
|
|
if (o.readOnly) { |
|
|
|
|
newInstance.disable(); |
|
|
|
|
} |
|
|
|
|
return newInstance; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
insertElem: function ($elem) { |
|
|
|
|
if (this.selectedInstance) { |
|
|
|
|
this.selectedInstance.insertElem($elem); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
insertHTML: function (html) { |
|
|
|
|
if (this.selectedInstance) { |
|
|
|
|
this.selectedInstance.insertHTML(html); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
nicCommand: function (cmd, args) { |
|
|
|
|
if (this.selectedInstance) { |
|
|
|
|
this.selectedInstance.nicCommand(cmd, args); |
|
|
|
@ -83271,7 +83313,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
|
|
|
|
|
return contain; |
|
|
|
|
} |
|
|
|
|
return (this.getSel().type == "Control") ? r.item(0) : r.parentElement(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
saveRng: function () { |
|
|
|
@ -83372,6 +83414,31 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
|
|
|
|
|
this.elm.element.html(this.content); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
insertElem: function ($elem) { |
|
|
|
|
var range = this.getRng(); |
|
|
|
|
|
|
|
|
|
if (range.insertNode) { |
|
|
|
|
range.deleteContents(); |
|
|
|
|
range.insertNode($elem); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
insertHTML: function (html) { |
|
|
|
|
var range = this.getRng(); |
|
|
|
|
|
|
|
|
|
if (document.queryCommandState("insertHTML")) { |
|
|
|
|
// W3C
|
|
|
|
|
this.nicCommand("insertHTML", html); |
|
|
|
|
} else if (range.insertNode) { |
|
|
|
|
// IE
|
|
|
|
|
range.deleteContents(); |
|
|
|
|
range.insertNode($(html)[0]); |
|
|
|
|
} else if (range.pasteHTML) { |
|
|
|
|
// IE <= 10
|
|
|
|
|
range.pasteHTML(html); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
nicCommand: function (cmd, args) { |
|
|
|
|
document.execCommand(cmd, false, args); |
|
|
|
|
} |
|
|
|
@ -84486,17 +84553,18 @@ BI.DynamicSummaryLayerTreeTable = BI.inherit(BI.Widget, {
|
|
|
|
|
var c = [crossHeader[row]]; |
|
|
|
|
result.push(c.concat(node || [])); |
|
|
|
|
}); |
|
|
|
|
var rowHeaderCreator = BI.isFunction(o.rowHeaderCreator) ? o.rowHeaderCreator() : o.rowHeaderCreator; |
|
|
|
|
if (header && header.length > 0) { |
|
|
|
|
var newHeader = this._formatColumns(header); |
|
|
|
|
var deep = this._getHDeep(); |
|
|
|
|
if (deep <= 0) { |
|
|
|
|
newHeader.unshift(o.rowHeaderCreator || { |
|
|
|
|
newHeader.unshift(rowHeaderCreator || { |
|
|
|
|
type: "bi.table_style_cell", |
|
|
|
|
text: BI.i18nText("BI-Row_Header"), |
|
|
|
|
styleGetter: o.headerCellStyleGetter |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
newHeader[0] = o.rowHeaderCreator || { |
|
|
|
|
newHeader[0] = rowHeaderCreator || { |
|
|
|
|
type: "bi.table_style_cell", |
|
|
|
|
text: BI.i18nText("BI-Row_Header"), |
|
|
|
|
styleGetter: o.headerCellStyleGetter |
|
|
|
@ -90026,7 +90094,8 @@ BI.DownListPopup = BI.inherit(BI.Pane, {
|
|
|
|
|
type: "bi.vertical" |
|
|
|
|
}] |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
maxHeight: 378 |
|
|
|
|
}; |
|
|
|
|
item.el.childValues = []; |
|
|
|
|
BI.each(item.children, function (i, child) { |
|
|
|
@ -90248,6 +90317,7 @@ BI.shortcut("bi.down_list_popup", BI.DownListPopup);/**
|
|
|
|
|
if (BI.isNotNull(obj.year)) { |
|
|
|
|
return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getDate(date.getFullYear(), 0, 1) : BI.getDate(date.getFullYear(), 11, 31); |
|
|
|
|
} |
|
|
|
|
return date; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
})();BI.DynamicDateCard = BI.inherit(BI.Widget, { |
|
|
|
@ -111676,8 +111746,7 @@ BI.ValueChooserPane = BI.inherit(BI.AbstractValueChooser, {
|
|
|
|
|
self.fireEvent(BI.ValueChooserPane.EVENT_CHANGE); |
|
|
|
|
}); |
|
|
|
|
if (BI.isNotNull(o.items)) { |
|
|
|
|
this.items = o.items; |
|
|
|
|
this.populate(); |
|
|
|
|
this.populate(o.items); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|