fay 6 years ago
parent
commit
7e0c3377eb
  1. 36
      dist/_fineui.min.js
  2. 51
      dist/bundle.js
  3. 6
      dist/bundle.min.js
  4. 51
      dist/case.js
  5. 51
      dist/fineui.js
  6. 36
      dist/fineui.min.js
  7. 5
      src/case/richeditor/bar/texttoolbar.js
  8. 4
      src/case/richeditor/niceditor/niceditor.js
  9. 4
      src/case/richeditor/plugins/button.align.center.js
  10. 4
      src/case/richeditor/plugins/button.align.left.js
  11. 4
      src/case/richeditor/plugins/button.align.right.js
  12. 4
      src/case/richeditor/plugins/button.bold.js
  13. 4
      src/case/richeditor/plugins/button.italic.js
  14. 6
      src/case/richeditor/plugins/button.param.js
  15. 4
      src/case/richeditor/plugins/button.underline.js
  16. 12
      src/case/richeditor/richeditor.js

36
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

51
dist/bundle.js vendored

@ -83487,7 +83487,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({
@ -83495,7 +83496,7 @@ BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
element: this, element: this,
items: buttons, items: buttons,
hgap: 3, hgap: 3,
vgap: 6 vgap: 5
}); });
}, },
@ -83587,13 +83588,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();
@ -83840,7 +83841,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
} }
this.ne.fireEvent("keyup", e); this.ne.fireEvent("keyup", e);
if (e.keyCode !== 8) { if (e.keyCode !== 8 && e.type !== "focus") {
return; return;
} }
var newLine; var newLine;
@ -84055,8 +84056,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 () {
@ -84092,8 +84093,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 () {
@ -84129,8 +84130,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 () {
@ -84167,8 +84168,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 () {
@ -84223,8 +84224,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 () {
@ -84265,7 +84266,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
}); });
}, },
@ -84278,8 +84279,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("参数");
@ -84315,8 +84316,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 () {
@ -84807,14 +84808,11 @@ 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
ref: function (_ref) {
self.toolbar = _ref;
}
}, o.toolbar), }, 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,
@ -84830,9 +84828,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 () {

6
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

51
dist/case.js vendored

@ -10798,7 +10798,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({
@ -10806,7 +10807,7 @@ BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
element: this, element: this,
items: buttons, items: buttons,
hgap: 3, hgap: 3,
vgap: 6 vgap: 5
}); });
}, },
@ -10898,13 +10899,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();
@ -11151,7 +11152,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
} }
this.ne.fireEvent("keyup", e); this.ne.fireEvent("keyup", e);
if (e.keyCode !== 8) { if (e.keyCode !== 8 && e.type !== "focus") {
return; return;
} }
var newLine; var newLine;
@ -11366,8 +11367,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 () {
@ -11403,8 +11404,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 () {
@ -11440,8 +11441,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 () {
@ -11478,8 +11479,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 () {
@ -11534,8 +11535,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 () {
@ -11576,7 +11577,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
}); });
}, },
@ -11589,8 +11590,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("参数");
@ -11626,8 +11627,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 () {
@ -12118,14 +12119,11 @@ 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
ref: function (_ref) {
self.toolbar = _ref;
}
}, o.toolbar), }, 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,
@ -12141,9 +12139,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 () {

51
dist/fineui.js vendored

@ -83708,7 +83708,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({
@ -83716,7 +83717,7 @@ BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
element: this, element: this,
items: buttons, items: buttons,
hgap: 3, hgap: 3,
vgap: 6 vgap: 5
}); });
}, },
@ -83808,13 +83809,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();
@ -84061,7 +84062,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
} }
this.ne.fireEvent("keyup", e); this.ne.fireEvent("keyup", e);
if (e.keyCode !== 8) { if (e.keyCode !== 8 && e.type !== "focus") {
return; return;
} }
var newLine; var newLine;
@ -84276,8 +84277,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 () {
@ -84313,8 +84314,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 () {
@ -84350,8 +84351,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 () {
@ -84388,8 +84389,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 () {
@ -84444,8 +84445,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 () {
@ -84486,7 +84487,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
}); });
}, },
@ -84499,8 +84500,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("参数");
@ -84536,8 +84537,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 () {
@ -85028,14 +85029,11 @@ 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
ref: function (_ref) {
self.toolbar = _ref;
}
}, o.toolbar), }, 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,
@ -85051,9 +85049,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 () {

36
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

5
src/case/richeditor/bar/texttoolbar.js

@ -31,7 +31,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({
@ -39,7 +40,7 @@ BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
element: this, element: this,
items: buttons, items: buttons,
hgap: 3, hgap: 3,
vgap: 6 vgap: 5
}); });
}, },

4
src/case/richeditor/niceditor/niceditor.js

@ -67,13 +67,13 @@
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();
@ -320,7 +320,7 @@
} }
this.ne.fireEvent("keyup", e); this.ne.fireEvent("keyup", e);
if (e.keyCode !== 8) { if (e.keyCode !== 8 && e.type !== "focus") {
return; return;
} }
var newLine; var newLine;

4
src/case/richeditor/plugins/button.align.center.js

@ -21,8 +21,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 () {

4
src/case/richeditor/plugins/button.align.left.js

@ -21,8 +21,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 () {

4
src/case/richeditor/plugins/button.align.right.js

@ -21,8 +21,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 () {

4
src/case/richeditor/plugins/button.bold.js

@ -22,8 +22,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 () {

4
src/case/richeditor/plugins/button.italic.js

@ -22,8 +22,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 () {

6
src/case/richeditor/plugins/button.param.js

@ -8,7 +8,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
}); });
}, },
@ -21,8 +21,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("参数");

4
src/case/richeditor/plugins/button.underline.js

@ -22,8 +22,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 () {

12
src/case/richeditor/richeditor.js

@ -68,14 +68,11 @@ 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
ref: function (_ref) {
self.toolbar = _ref;
}
}, o.toolbar), }, 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,
@ -91,9 +88,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 () {

Loading…
Cancel
Save