|
|
|
@ -83487,7 +83487,8 @@ BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
|
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
var buttons = BI.createWidgets(BI.map(o.buttons, function (i, btn) { |
|
|
|
|
return BI.extend(btn, { |
|
|
|
|
editor: o.editor |
|
|
|
|
editor: o.editor, |
|
|
|
|
height: 24 |
|
|
|
|
}); |
|
|
|
|
})); |
|
|
|
|
BI.createWidget({ |
|
|
|
@ -83495,7 +83496,7 @@ BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
|
|
|
|
|
element: this, |
|
|
|
|
items: buttons, |
|
|
|
|
hgap: 3, |
|
|
|
|
vgap: 6 |
|
|
|
|
vgap: 5 |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -83587,13 +83588,13 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
|
|
|
|
|
var t = e.target; |
|
|
|
|
var self = this; |
|
|
|
|
var found = false; |
|
|
|
|
this.instance.saveRng(); |
|
|
|
|
do { |
|
|
|
|
if (t.nodeName !== "svg" && t.className && t.className.indexOf && t.className.indexOf(prefix) != -1) { |
|
|
|
|
return; |
|
|
|
|
// return false;
|
|
|
|
|
} |
|
|
|
|
if (this.instance.checkToolbar(t)) { |
|
|
|
|
this.instance.saveRng(); |
|
|
|
|
// 如果是点击在toolbar内恢复选取(IE中出现的问题)
|
|
|
|
|
BI.defer(function () { |
|
|
|
|
self.instance.restoreRng(); |
|
|
|
@ -83840,7 +83841,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
|
|
|
|
|
} |
|
|
|
|
this.ne.fireEvent("keyup", e); |
|
|
|
|
|
|
|
|
|
if (e.keyCode !== 8) { |
|
|
|
|
if (e.keyCode !== 8 && e.type !== "focus") { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
var newLine; |
|
|
|
@ -84055,8 +84056,8 @@ BI.RichEditorAlignCenterButton = BI.inherit(BI.RichEditorAction, {
|
|
|
|
|
element: this, |
|
|
|
|
forceNotSelected: true, |
|
|
|
|
title: BI.i18nText("BI-Word_Align_Center"), |
|
|
|
|
height: 20, |
|
|
|
|
width: 20, |
|
|
|
|
height: o.height, |
|
|
|
|
width: o.width, |
|
|
|
|
cls: "text-toolbar-button bi-list-item-active text-align-center-font" |
|
|
|
|
}); |
|
|
|
|
this.align.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
@ -84092,8 +84093,8 @@ BI.RichEditorAlignLeftButton = BI.inherit(BI.RichEditorAction, {
|
|
|
|
|
element: this, |
|
|
|
|
forceNotSelected: true, |
|
|
|
|
title: BI.i18nText("BI-Word_Align_Left"), |
|
|
|
|
height: 20, |
|
|
|
|
width: 20, |
|
|
|
|
height: o.height, |
|
|
|
|
width: o.width, |
|
|
|
|
cls: "text-toolbar-button bi-list-item-active text-align-left-font" |
|
|
|
|
}); |
|
|
|
|
this.align.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
@ -84129,8 +84130,8 @@ BI.RichEditorAlignRightButton = BI.inherit(BI.RichEditorAction, {
|
|
|
|
|
element: this, |
|
|
|
|
forceNotSelected: true, |
|
|
|
|
title: BI.i18nText("BI-Word_Align_Right"), |
|
|
|
|
height: 20, |
|
|
|
|
width: 20, |
|
|
|
|
height: o.height, |
|
|
|
|
width: o.width, |
|
|
|
|
cls: "text-toolbar-button bi-list-item-active text-align-right-font" |
|
|
|
|
}); |
|
|
|
|
this.align.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
@ -84167,8 +84168,8 @@ BI.RichEditorBoldButton = BI.inherit(BI.RichEditorAction, {
|
|
|
|
|
type: "bi.icon_button", |
|
|
|
|
element: this, |
|
|
|
|
title: BI.i18nText("BI-Basic_Bold"), |
|
|
|
|
height: 20, |
|
|
|
|
width: 20, |
|
|
|
|
height: o.height, |
|
|
|
|
width: o.width, |
|
|
|
|
cls: "text-toolbar-button bi-list-item-active text-bold-font" |
|
|
|
|
}); |
|
|
|
|
this.bold.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
@ -84223,8 +84224,8 @@ BI.RichEditorItalicButton = BI.inherit(BI.RichEditorAction, {
|
|
|
|
|
type: "bi.icon_button", |
|
|
|
|
element: this, |
|
|
|
|
title: BI.i18nText("BI-Basic_Italic"), |
|
|
|
|
height: 20, |
|
|
|
|
width: 20, |
|
|
|
|
height: o.height, |
|
|
|
|
width: o.width, |
|
|
|
|
cls: "text-toolbar-button bi-list-item-active text-italic-font" |
|
|
|
|
}); |
|
|
|
|
this.italic.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
@ -84265,7 +84266,7 @@ BI.RichEditorParamButton = BI.inherit(BI.RichEditorParamAction, {
|
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
return BI.extend(BI.RichEditorParamButton.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
|
width: 20, |
|
|
|
|
height: 20 |
|
|
|
|
height: 30 |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -84278,8 +84279,8 @@ BI.RichEditorParamButton = BI.inherit(BI.RichEditorParamAction, {
|
|
|
|
|
level: "ignore", |
|
|
|
|
minWidth: 0, |
|
|
|
|
text: BI.i18nText("BI-Formula_Insert"), |
|
|
|
|
height: 20, |
|
|
|
|
width: 30 |
|
|
|
|
height: o.height, |
|
|
|
|
width: o.width |
|
|
|
|
}); |
|
|
|
|
this.param.on(BI.Button.EVENT_CHANGE, function () { |
|
|
|
|
self.addParam("参数"); |
|
|
|
@ -84315,8 +84316,8 @@ BI.RichEditorUnderlineButton = BI.inherit(BI.RichEditorAction, {
|
|
|
|
|
type: "bi.icon_button", |
|
|
|
|
element: this, |
|
|
|
|
title: BI.i18nText("BI-Basic_Underline"), |
|
|
|
|
height: 20, |
|
|
|
|
width: 20, |
|
|
|
|
height: o.height, |
|
|
|
|
width: o.width, |
|
|
|
|
cls: "text-toolbar-button bi-list-item-active text-underline-font" |
|
|
|
|
}); |
|
|
|
|
this.underline.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
@ -84807,14 +84808,11 @@ BI.RichEditor = BI.inherit(BI.Widget, {
|
|
|
|
|
popup: { |
|
|
|
|
el: BI.extend({ |
|
|
|
|
type: "bi.rich_editor_text_toolbar", |
|
|
|
|
editor: this.editor, |
|
|
|
|
ref: function (_ref) { |
|
|
|
|
self.toolbar = _ref; |
|
|
|
|
} |
|
|
|
|
editor: this.editor |
|
|
|
|
}, o.toolbar), |
|
|
|
|
height: 34, |
|
|
|
|
stopPropagation: true, |
|
|
|
|
stopEvent: true |
|
|
|
|
stopPropagation: false, |
|
|
|
|
stopEvent: false |
|
|
|
|
}, |
|
|
|
|
listeners: [{ |
|
|
|
|
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, |
|
|
|
@ -84830,9 +84828,6 @@ BI.RichEditor = BI.inherit(BI.Widget, {
|
|
|
|
|
if(BI.isNull(o.value)) { |
|
|
|
|
this.editor.setValue(o.value); |
|
|
|
|
} |
|
|
|
|
if(o.toolbar) { |
|
|
|
|
this.editor.bindToolbar(this.toolbar); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
focus: function () { |
|
|
|
|