|
|
@ -83574,7 +83574,8 @@ BI.RichEditorTextToolbar = BI.inherit(BI.Widget, { |
|
|
|
var self = this, o = this.options; |
|
|
|
var self = this, o = this.options; |
|
|
|
var buttons = BI.createWidgets(BI.map(o.buttons, function (i, btn) { |
|
|
|
var buttons = BI.createWidgets(BI.map(o.buttons, function (i, btn) { |
|
|
|
return BI.extend(btn, { |
|
|
|
return BI.extend(btn, { |
|
|
|
editor: o.editor |
|
|
|
editor: o.editor, |
|
|
|
|
|
|
|
height: 24 |
|
|
|
}); |
|
|
|
}); |
|
|
|
})); |
|
|
|
})); |
|
|
|
BI.createWidget({ |
|
|
|
BI.createWidget({ |
|
|
@ -83582,7 +83583,7 @@ BI.RichEditorTextToolbar = BI.inherit(BI.Widget, { |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
items: buttons, |
|
|
|
items: buttons, |
|
|
|
hgap: 3, |
|
|
|
hgap: 3, |
|
|
|
vgap: 6 |
|
|
|
vgap: 5 |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -83674,13 +83675,13 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/** |
|
|
|
var t = e.target; |
|
|
|
var t = e.target; |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
var found = false; |
|
|
|
var found = false; |
|
|
|
|
|
|
|
this.instance.saveRng(); |
|
|
|
do { |
|
|
|
do { |
|
|
|
if (t.nodeName !== "svg" && t.className && t.className.indexOf && t.className.indexOf(prefix) != -1) { |
|
|
|
if (t.nodeName !== "svg" && t.className && t.className.indexOf && t.className.indexOf(prefix) != -1) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
// return false;
|
|
|
|
// return false;
|
|
|
|
} |
|
|
|
} |
|
|
|
if (this.instance.checkToolbar(t)) { |
|
|
|
if (this.instance.checkToolbar(t)) { |
|
|
|
this.instance.saveRng(); |
|
|
|
|
|
|
|
// 如果是点击在toolbar内恢复选取(IE中出现的问题)
|
|
|
|
// 如果是点击在toolbar内恢复选取(IE中出现的问题)
|
|
|
|
BI.defer(function () { |
|
|
|
BI.defer(function () { |
|
|
|
self.instance.restoreRng(); |
|
|
|
self.instance.restoreRng(); |
|
|
@ -84142,8 +84143,8 @@ BI.RichEditorAlignCenterButton = BI.inherit(BI.RichEditorAction, { |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
forceNotSelected: true, |
|
|
|
forceNotSelected: true, |
|
|
|
title: BI.i18nText("BI-Word_Align_Center"), |
|
|
|
title: BI.i18nText("BI-Word_Align_Center"), |
|
|
|
height: 20, |
|
|
|
height: o.height, |
|
|
|
width: 20, |
|
|
|
width: o.width, |
|
|
|
cls: "text-toolbar-button bi-list-item-active text-align-center-font" |
|
|
|
cls: "text-toolbar-button bi-list-item-active text-align-center-font" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.align.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
this.align.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
@ -84179,8 +84180,8 @@ BI.RichEditorAlignLeftButton = BI.inherit(BI.RichEditorAction, { |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
forceNotSelected: true, |
|
|
|
forceNotSelected: true, |
|
|
|
title: BI.i18nText("BI-Word_Align_Left"), |
|
|
|
title: BI.i18nText("BI-Word_Align_Left"), |
|
|
|
height: 20, |
|
|
|
height: o.height, |
|
|
|
width: 20, |
|
|
|
width: o.width, |
|
|
|
cls: "text-toolbar-button bi-list-item-active text-align-left-font" |
|
|
|
cls: "text-toolbar-button bi-list-item-active text-align-left-font" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.align.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
this.align.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
@ -84216,8 +84217,8 @@ BI.RichEditorAlignRightButton = BI.inherit(BI.RichEditorAction, { |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
forceNotSelected: true, |
|
|
|
forceNotSelected: true, |
|
|
|
title: BI.i18nText("BI-Word_Align_Right"), |
|
|
|
title: BI.i18nText("BI-Word_Align_Right"), |
|
|
|
height: 20, |
|
|
|
height: o.height, |
|
|
|
width: 20, |
|
|
|
width: o.width, |
|
|
|
cls: "text-toolbar-button bi-list-item-active text-align-right-font" |
|
|
|
cls: "text-toolbar-button bi-list-item-active text-align-right-font" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.align.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
this.align.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
@ -84254,8 +84255,8 @@ BI.RichEditorBoldButton = BI.inherit(BI.RichEditorAction, { |
|
|
|
type: "bi.icon_button", |
|
|
|
type: "bi.icon_button", |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
title: BI.i18nText("BI-Basic_Bold"), |
|
|
|
title: BI.i18nText("BI-Basic_Bold"), |
|
|
|
height: 20, |
|
|
|
height: o.height, |
|
|
|
width: 20, |
|
|
|
width: o.width, |
|
|
|
cls: "text-toolbar-button bi-list-item-active text-bold-font" |
|
|
|
cls: "text-toolbar-button bi-list-item-active text-bold-font" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.bold.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
this.bold.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
@ -84310,8 +84311,8 @@ BI.RichEditorItalicButton = BI.inherit(BI.RichEditorAction, { |
|
|
|
type: "bi.icon_button", |
|
|
|
type: "bi.icon_button", |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
title: BI.i18nText("BI-Basic_Italic"), |
|
|
|
title: BI.i18nText("BI-Basic_Italic"), |
|
|
|
height: 20, |
|
|
|
height: o.height, |
|
|
|
width: 20, |
|
|
|
width: o.width, |
|
|
|
cls: "text-toolbar-button bi-list-item-active text-italic-font" |
|
|
|
cls: "text-toolbar-button bi-list-item-active text-italic-font" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.italic.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
this.italic.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
@ -84352,7 +84353,7 @@ BI.RichEditorParamButton = BI.inherit(BI.RichEditorParamAction, { |
|
|
|
_defaultConfig: function () { |
|
|
|
_defaultConfig: function () { |
|
|
|
return BI.extend(BI.RichEditorParamButton.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
return BI.extend(BI.RichEditorParamButton.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
width: 20, |
|
|
|
width: 20, |
|
|
|
height: 20 |
|
|
|
height: 30 |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -84365,8 +84366,8 @@ BI.RichEditorParamButton = BI.inherit(BI.RichEditorParamAction, { |
|
|
|
level: "ignore", |
|
|
|
level: "ignore", |
|
|
|
minWidth: 0, |
|
|
|
minWidth: 0, |
|
|
|
text: BI.i18nText("BI-Formula_Insert"), |
|
|
|
text: BI.i18nText("BI-Formula_Insert"), |
|
|
|
height: 20, |
|
|
|
height: o.height, |
|
|
|
width: 30 |
|
|
|
width: o.width |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.param.on(BI.Button.EVENT_CHANGE, function () { |
|
|
|
this.param.on(BI.Button.EVENT_CHANGE, function () { |
|
|
|
self.addParam("参数"); |
|
|
|
self.addParam("参数"); |
|
|
@ -84402,8 +84403,8 @@ BI.RichEditorUnderlineButton = BI.inherit(BI.RichEditorAction, { |
|
|
|
type: "bi.icon_button", |
|
|
|
type: "bi.icon_button", |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
title: BI.i18nText("BI-Basic_Underline"), |
|
|
|
title: BI.i18nText("BI-Basic_Underline"), |
|
|
|
height: 20, |
|
|
|
height: o.height, |
|
|
|
width: 20, |
|
|
|
width: o.width, |
|
|
|
cls: "text-toolbar-button bi-list-item-active text-underline-font" |
|
|
|
cls: "text-toolbar-button bi-list-item-active text-underline-font" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.underline.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
this.underline.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
@ -84894,14 +84895,16 @@ BI.RichEditor = BI.inherit(BI.Widget, { |
|
|
|
popup: { |
|
|
|
popup: { |
|
|
|
el: BI.extend({ |
|
|
|
el: BI.extend({ |
|
|
|
type: "bi.rich_editor_text_toolbar", |
|
|
|
type: "bi.rich_editor_text_toolbar", |
|
|
|
editor: this.editor, |
|
|
|
editor: this.editor |
|
|
|
|
|
|
|
}, o.toolbar, { |
|
|
|
ref: function (_ref) { |
|
|
|
ref: function (_ref) { |
|
|
|
self.toolbar = _ref; |
|
|
|
self.editor.bindToolbar(_ref); |
|
|
|
|
|
|
|
o.toolbar.ref && o.toolbar.ref(_ref); |
|
|
|
} |
|
|
|
} |
|
|
|
}, o.toolbar), |
|
|
|
}), |
|
|
|
height: 34, |
|
|
|
height: 34, |
|
|
|
stopPropagation: true, |
|
|
|
stopPropagation: false, |
|
|
|
stopEvent: true |
|
|
|
stopEvent: false |
|
|
|
}, |
|
|
|
}, |
|
|
|
listeners: [{ |
|
|
|
listeners: [{ |
|
|
|
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, |
|
|
|
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, |
|
|
@ -84917,9 +84920,6 @@ BI.RichEditor = BI.inherit(BI.Widget, { |
|
|
|
if(BI.isNull(o.value)) { |
|
|
|
if(BI.isNull(o.value)) { |
|
|
|
this.editor.setValue(o.value); |
|
|
|
this.editor.setValue(o.value); |
|
|
|
} |
|
|
|
} |
|
|
|
if(o.toolbar) { |
|
|
|
|
|
|
|
this.editor.bindToolbar(this.toolbar); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
focus: function () { |
|
|
|
focus: function () { |
|
|
|