Browse Source

Merge pull request #571 in VISUAL/fineui from ~FAY/fineui:master to master

* commit 'd738c6ef01f699f92b1d90fc40a63ec0eb4a2581':
  update
  update
es6
imp 6 years ago
parent
commit
d83582a892
  1. 36
      dist/_fineui.min.js
  2. 52
      dist/bundle.js
  3. 38
      dist/bundle.min.js
  4. 52
      dist/case.js
  5. 52
      dist/fineui.js
  6. 36
      dist/fineui.min.js
  7. 5
      src/case/richeditor/bar/texttoolbar.js
  8. 2
      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. 15
      src/case/richeditor/richeditor.js

36
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

52
dist/bundle.js vendored

@ -83574,7 +83574,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({
@ -83582,7 +83583,7 @@ BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
element: this,
items: buttons,
hgap: 3,
vgap: 6
vgap: 5
});
},
@ -83674,13 +83675,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();
@ -84142,8 +84143,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 () {
@ -84179,8 +84180,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 () {
@ -84216,8 +84217,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 () {
@ -84254,8 +84255,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 () {
@ -84310,8 +84311,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 () {
@ -84352,7 +84353,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
});
},
@ -84365,8 +84366,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("参数");
@ -84402,8 +84403,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 () {
@ -84894,14 +84895,16 @@ BI.RichEditor = BI.inherit(BI.Widget, {
popup: {
el: BI.extend({
type: "bi.rich_editor_text_toolbar",
editor: this.editor,
editor: this.editor
}, o.toolbar, {
ref: function (_ref) {
self.toolbar = _ref;
self.editor.bindToolbar(_ref);
o.toolbar.ref && o.toolbar.ref(_ref);
}
}, o.toolbar),
}),
height: 34,
stopPropagation: true,
stopEvent: true
stopPropagation: false,
stopEvent: false
},
listeners: [{
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,
@ -84917,9 +84920,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 () {

38
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

52
dist/case.js vendored

@ -10798,7 +10798,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({
@ -10806,7 +10807,7 @@ BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
element: this,
items: buttons,
hgap: 3,
vgap: 6
vgap: 5
});
},
@ -10898,13 +10899,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();
@ -11366,8 +11367,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 () {
@ -11403,8 +11404,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 () {
@ -11440,8 +11441,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 () {
@ -11478,8 +11479,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 () {
@ -11534,8 +11535,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 () {
@ -11576,7 +11577,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
});
},
@ -11589,8 +11590,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("参数");
@ -11626,8 +11627,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 () {
@ -12118,14 +12119,16 @@ BI.RichEditor = BI.inherit(BI.Widget, {
popup: {
el: BI.extend({
type: "bi.rich_editor_text_toolbar",
editor: this.editor,
editor: this.editor
}, o.toolbar, {
ref: function (_ref) {
self.toolbar = _ref;
self.editor.bindToolbar(_ref);
o.toolbar.ref && o.toolbar.ref(_ref);
}
}, o.toolbar),
}),
height: 34,
stopPropagation: true,
stopEvent: true
stopPropagation: false,
stopEvent: false
},
listeners: [{
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,
@ -12141,9 +12144,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 () {

52
dist/fineui.js vendored

@ -83795,7 +83795,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({
@ -83803,7 +83804,7 @@ BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
element: this,
items: buttons,
hgap: 3,
vgap: 6
vgap: 5
});
},
@ -83895,13 +83896,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();
@ -84363,8 +84364,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 () {
@ -84400,8 +84401,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 () {
@ -84437,8 +84438,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 () {
@ -84475,8 +84476,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 () {
@ -84531,8 +84532,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 () {
@ -84573,7 +84574,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
});
},
@ -84586,8 +84587,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("参数");
@ -84623,8 +84624,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 () {
@ -85115,14 +85116,16 @@ BI.RichEditor = BI.inherit(BI.Widget, {
popup: {
el: BI.extend({
type: "bi.rich_editor_text_toolbar",
editor: this.editor,
editor: this.editor
}, o.toolbar, {
ref: function (_ref) {
self.toolbar = _ref;
self.editor.bindToolbar(_ref);
o.toolbar.ref && o.toolbar.ref(_ref);
}
}, o.toolbar),
}),
height: 34,
stopPropagation: true,
stopEvent: true
stopPropagation: false,
stopEvent: false
},
listeners: [{
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,
@ -85138,9 +85141,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 () {

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 buttons = BI.createWidgets(BI.map(o.buttons, function (i, btn) {
return BI.extend(btn, {
editor: o.editor
editor: o.editor,
height: 24
});
}));
BI.createWidget({
@ -39,7 +40,7 @@ BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
element: this,
items: buttons,
hgap: 3,
vgap: 6
vgap: 5
});
},

2
src/case/richeditor/niceditor/niceditor.js

@ -67,13 +67,13 @@
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();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

15
src/case/richeditor/richeditor.js

@ -68,14 +68,16 @@ BI.RichEditor = BI.inherit(BI.Widget, {
popup: {
el: BI.extend({
type: "bi.rich_editor_text_toolbar",
editor: this.editor,
editor: this.editor
}, o.toolbar, {
ref: function (_ref) {
self.toolbar = _ref;
self.editor.bindToolbar(_ref);
o.toolbar.ref && o.toolbar.ref(_ref);
}
}, o.toolbar),
}),
height: 34,
stopPropagation: true,
stopEvent: true
stopPropagation: false,
stopEvent: false
},
listeners: [{
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,
@ -91,9 +93,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 () {

Loading…
Cancel
Save