fay 6 years ago
parent
commit
4d01b97157
  1. 40
      dist/_fineui.min.js
  2. 2
      dist/base.js
  3. 196
      dist/bundle.js
  4. 44
      dist/bundle.min.js
  5. 194
      dist/case.js
  6. 196
      dist/fineui.js
  7. 40
      dist/fineui.min.js
  8. 2
      dist/utils.min.js

40
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/base.js vendored

@ -19325,7 +19325,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
});
}
};
form.setAttribute("action", handler.url);
form.setAttribute("action", handler.url + "&filename=" + window.encodeURIComponent(handler.file.fileName));
form.setAttribute("target", iframe.id);
form.setAttribute("method", "post");
form.appendChild(handler.file);

196
dist/bundle.js vendored

@ -55238,7 +55238,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
});
}
};
form.setAttribute("action", handler.url);
form.setAttribute("action", handler.url + "&filename=" + window.encodeURIComponent(handler.file.fileName));
form.setAttribute("target", iframe.id);
form.setAttribute("method", "post");
form.appendChild(handler.file);
@ -83881,9 +83881,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
}
}
return false;
},
}
});
}());
/**
@ -84082,6 +84080,22 @@ BI.RichEditorBoldButton = BI.inherit(BI.RichEditorAction, {
self.doCommand();
});
},
checkNodes: function (e) {
var self = this;
try {
BI.defer(function() {
if(document.queryCommandState("bold") ) {
self.activate();
} else {
self.deactivate();
}
});
} catch (error) {
BI.RichEditorBoldButton.superclass.checkNodes(e);
}
},
activate: function () {
this.bold.setSelected(true);
},
@ -84122,6 +84136,22 @@ BI.RichEditorItalicButton = BI.inherit(BI.RichEditorAction, {
self.doCommand();
});
},
checkNodes: function (e) {
var self = this;
try {
BI.defer(function() {
if(document.queryCommandState("italic") ) {
self.activate();
} else {
self.deactivate();
}
});
} catch (error) {
BI.RichEditorBoldButton.superclass.checkNodes(e);
}
},
activate: function () {
this.italic.setSelected(true);
},
@ -84198,6 +84228,22 @@ BI.RichEditorUnderlineButton = BI.inherit(BI.RichEditorAction, {
self.doCommand();
});
},
checkNodes: function (e) {
var self = this;
try {
BI.defer(function() {
if(document.queryCommandState("underline") ) {
self.activate();
} else {
self.deactivate();
}
});
} catch (error) {
BI.RichEditorBoldButton.superclass.checkNodes(e);
}
},
activate: function () {
this.underline.setSelected(true);
},
@ -84337,9 +84383,13 @@ BI.RichEditorColorChooser = BI.inherit(BI.RichEditorAction, {
this.colorchooser.on(BI.ColorChooser.EVENT_CHANGE, function () {
var value = this.getValue();
// 用span代替font
if(BI.isIE() && BI.getIEVersion() < 11) {
self.doCommand(this.getValue());
} else {
document.execCommand('styleWithCSS', null, true);
self.doCommand(this.getValue() || "inherit");
document.execCommand('styleWithCSS', null, false);
}
});
},
@ -84432,37 +84482,99 @@ BI.shortcut("bi.rich_editor_font_chooser", BI.RichEditorFontChooser);/**
*/
BI.RichEditorSizeChooser = BI.inherit(BI.RichEditorAction, {
_defaultConfig: function () {
return BI.extend(BI.RichEditorSizeChooser.superclass._defaultConfig.apply(this, arguments), {
return BI.extend(
BI.RichEditorSizeChooser.superclass._defaultConfig.apply(
this,
arguments
),
{
baseCls: "bi-rich-editor-size-chooser bi-border bi-card",
command: "FontSize",
width: 50,
height: 24
});
}
);
},
_items: [{
value: 1,
text: "1(8pt)"
}, {
value: 2,
text: "2(10pt)"
}, {
value: 3,
text: "3(12pt)"
}, {
value: 4,
text: "4(14pt)"
}, {
value: 5,
text: "5(18pt)"
}, {
value: 6,
text: "6(24pt)"
}],
_items: [
{
value: 12,
text: 12
},
{
value: 13,
text: 13
},
{
value: 14,
text: 14
},
{
value: 16,
text: 16
},
{
value: 18,
text: 18
},
{
value: 20,
text: 20
},
{
value: 22,
text: 22
},
{
value: 24,
text: 24
},
{
value: 26,
text: 26
},
{
value: 28,
text: 28
},
{
value: 30,
text: 30
},
{
value: 32,
text: 32
},
{
value: 34,
text: 34
},
{
value: 36,
text: 36
},
{
value: 38,
text: 38
},
{
value: 40,
text: 40
},
{
value: 64,
text: 64
},
{
value: 128,
text: 128
}
],
_init: function () {
BI.RichEditorSizeChooser.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var self = this,
o = this.options;
this.trigger = BI.createWidget({
type: "bi.text_trigger",
readonly: true,
@ -84484,27 +84596,49 @@ BI.RichEditorSizeChooser = BI.inherit(BI.RichEditorAction, {
items: BI.createItems(this._items, {
type: "bi.single_select_item"
}),
layouts: [{
layouts: [
{
type: "bi.vertical"
}]
}
]
}
}
});
this.combo.on(BI.Combo.EVENT_CHANGE, function () {
var val = this.getValue()[0];
self.doCommand(val);
self.doAction(val);
this.hideView();
this.setValue([]);
});
},
hideIf: function (e) {
if(!this.combo.element.find(e.target).length > 0) {
if (!this.combo.element.find(e.target).length > 0) {
this.combo.hideView();
}
},
doAction: function (fontSize) {
var editor = this.options.editor.instance;
var range = editor.getRng();
var commonSize = 7;
if (!range.collapsed) {
this.doCommand(commonSize);
BI.each(document.getElementsByTagName("font"), function (idx, el) {
if (
BI.contains($(el).parents(), editor.element[0]) &&
el["size"] == commonSize
) {
$(el)
.removeAttr("size")
.css("font-size", fontSize + "px");
}
});
}
}
});
BI.shortcut("bi.rich_editor_size_chooser", BI.RichEditorSizeChooser);/**
BI.shortcut("bi.rich_editor_size_chooser", BI.RichEditorSizeChooser);
/**
* 富文本编辑器
*
* Created by GUY on 2017/9/15.

44
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

194
dist/case.js vendored

@ -11200,9 +11200,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
}
}
return false;
},
}
});
}());
/**
@ -11401,6 +11399,22 @@ BI.RichEditorBoldButton = BI.inherit(BI.RichEditorAction, {
self.doCommand();
});
},
checkNodes: function (e) {
var self = this;
try {
BI.defer(function() {
if(document.queryCommandState("bold") ) {
self.activate();
} else {
self.deactivate();
}
});
} catch (error) {
BI.RichEditorBoldButton.superclass.checkNodes(e);
}
},
activate: function () {
this.bold.setSelected(true);
},
@ -11441,6 +11455,22 @@ BI.RichEditorItalicButton = BI.inherit(BI.RichEditorAction, {
self.doCommand();
});
},
checkNodes: function (e) {
var self = this;
try {
BI.defer(function() {
if(document.queryCommandState("italic") ) {
self.activate();
} else {
self.deactivate();
}
});
} catch (error) {
BI.RichEditorBoldButton.superclass.checkNodes(e);
}
},
activate: function () {
this.italic.setSelected(true);
},
@ -11517,6 +11547,22 @@ BI.RichEditorUnderlineButton = BI.inherit(BI.RichEditorAction, {
self.doCommand();
});
},
checkNodes: function (e) {
var self = this;
try {
BI.defer(function() {
if(document.queryCommandState("underline") ) {
self.activate();
} else {
self.deactivate();
}
});
} catch (error) {
BI.RichEditorBoldButton.superclass.checkNodes(e);
}
},
activate: function () {
this.underline.setSelected(true);
},
@ -11656,9 +11702,13 @@ BI.RichEditorColorChooser = BI.inherit(BI.RichEditorAction, {
this.colorchooser.on(BI.ColorChooser.EVENT_CHANGE, function () {
var value = this.getValue();
// 用span代替font
if(BI.isIE() && BI.getIEVersion() < 11) {
self.doCommand(this.getValue());
} else {
document.execCommand('styleWithCSS', null, true);
self.doCommand(this.getValue() || "inherit");
document.execCommand('styleWithCSS', null, false);
}
});
},
@ -11751,37 +11801,99 @@ BI.shortcut("bi.rich_editor_font_chooser", BI.RichEditorFontChooser);/**
*/
BI.RichEditorSizeChooser = BI.inherit(BI.RichEditorAction, {
_defaultConfig: function () {
return BI.extend(BI.RichEditorSizeChooser.superclass._defaultConfig.apply(this, arguments), {
return BI.extend(
BI.RichEditorSizeChooser.superclass._defaultConfig.apply(
this,
arguments
),
{
baseCls: "bi-rich-editor-size-chooser bi-border bi-card",
command: "FontSize",
width: 50,
height: 24
});
}
);
},
_items: [{
value: 1,
text: "1(8pt)"
}, {
value: 2,
text: "2(10pt)"
}, {
value: 3,
text: "3(12pt)"
}, {
value: 4,
text: "4(14pt)"
}, {
value: 5,
text: "5(18pt)"
}, {
value: 6,
text: "6(24pt)"
}],
_items: [
{
value: 12,
text: 12
},
{
value: 13,
text: 13
},
{
value: 14,
text: 14
},
{
value: 16,
text: 16
},
{
value: 18,
text: 18
},
{
value: 20,
text: 20
},
{
value: 22,
text: 22
},
{
value: 24,
text: 24
},
{
value: 26,
text: 26
},
{
value: 28,
text: 28
},
{
value: 30,
text: 30
},
{
value: 32,
text: 32
},
{
value: 34,
text: 34
},
{
value: 36,
text: 36
},
{
value: 38,
text: 38
},
{
value: 40,
text: 40
},
{
value: 64,
text: 64
},
{
value: 128,
text: 128
}
],
_init: function () {
BI.RichEditorSizeChooser.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var self = this,
o = this.options;
this.trigger = BI.createWidget({
type: "bi.text_trigger",
readonly: true,
@ -11803,27 +11915,49 @@ BI.RichEditorSizeChooser = BI.inherit(BI.RichEditorAction, {
items: BI.createItems(this._items, {
type: "bi.single_select_item"
}),
layouts: [{
layouts: [
{
type: "bi.vertical"
}]
}
]
}
}
});
this.combo.on(BI.Combo.EVENT_CHANGE, function () {
var val = this.getValue()[0];
self.doCommand(val);
self.doAction(val);
this.hideView();
this.setValue([]);
});
},
hideIf: function (e) {
if(!this.combo.element.find(e.target).length > 0) {
if (!this.combo.element.find(e.target).length > 0) {
this.combo.hideView();
}
},
doAction: function (fontSize) {
var editor = this.options.editor.instance;
var range = editor.getRng();
var commonSize = 7;
if (!range.collapsed) {
this.doCommand(commonSize);
BI.each(document.getElementsByTagName("font"), function (idx, el) {
if (
BI.contains($(el).parents(), editor.element[0]) &&
el["size"] == commonSize
) {
$(el)
.removeAttr("size")
.css("font-size", fontSize + "px");
}
});
}
}
});
BI.shortcut("bi.rich_editor_size_chooser", BI.RichEditorSizeChooser);/**
BI.shortcut("bi.rich_editor_size_chooser", BI.RichEditorSizeChooser);
/**
* 富文本编辑器
*
* Created by GUY on 2017/9/15.

196
dist/fineui.js vendored

@ -55487,7 +55487,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
});
}
};
form.setAttribute("action", handler.url);
form.setAttribute("action", handler.url + "&filename=" + window.encodeURIComponent(handler.file.fileName));
form.setAttribute("target", iframe.id);
form.setAttribute("method", "post");
form.appendChild(handler.file);
@ -84130,9 +84130,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
}
}
return false;
},
}
});
}());
/**
@ -84331,6 +84329,22 @@ BI.RichEditorBoldButton = BI.inherit(BI.RichEditorAction, {
self.doCommand();
});
},
checkNodes: function (e) {
var self = this;
try {
BI.defer(function() {
if(document.queryCommandState("bold") ) {
self.activate();
} else {
self.deactivate();
}
});
} catch (error) {
BI.RichEditorBoldButton.superclass.checkNodes(e);
}
},
activate: function () {
this.bold.setSelected(true);
},
@ -84371,6 +84385,22 @@ BI.RichEditorItalicButton = BI.inherit(BI.RichEditorAction, {
self.doCommand();
});
},
checkNodes: function (e) {
var self = this;
try {
BI.defer(function() {
if(document.queryCommandState("italic") ) {
self.activate();
} else {
self.deactivate();
}
});
} catch (error) {
BI.RichEditorBoldButton.superclass.checkNodes(e);
}
},
activate: function () {
this.italic.setSelected(true);
},
@ -84447,6 +84477,22 @@ BI.RichEditorUnderlineButton = BI.inherit(BI.RichEditorAction, {
self.doCommand();
});
},
checkNodes: function (e) {
var self = this;
try {
BI.defer(function() {
if(document.queryCommandState("underline") ) {
self.activate();
} else {
self.deactivate();
}
});
} catch (error) {
BI.RichEditorBoldButton.superclass.checkNodes(e);
}
},
activate: function () {
this.underline.setSelected(true);
},
@ -84586,9 +84632,13 @@ BI.RichEditorColorChooser = BI.inherit(BI.RichEditorAction, {
this.colorchooser.on(BI.ColorChooser.EVENT_CHANGE, function () {
var value = this.getValue();
// 用span代替font
if(BI.isIE() && BI.getIEVersion() < 11) {
self.doCommand(this.getValue());
} else {
document.execCommand('styleWithCSS', null, true);
self.doCommand(this.getValue() || "inherit");
document.execCommand('styleWithCSS', null, false);
}
});
},
@ -84681,37 +84731,99 @@ BI.shortcut("bi.rich_editor_font_chooser", BI.RichEditorFontChooser);/**
*/
BI.RichEditorSizeChooser = BI.inherit(BI.RichEditorAction, {
_defaultConfig: function () {
return BI.extend(BI.RichEditorSizeChooser.superclass._defaultConfig.apply(this, arguments), {
return BI.extend(
BI.RichEditorSizeChooser.superclass._defaultConfig.apply(
this,
arguments
),
{
baseCls: "bi-rich-editor-size-chooser bi-border bi-card",
command: "FontSize",
width: 50,
height: 24
});
}
);
},
_items: [{
value: 1,
text: "1(8pt)"
}, {
value: 2,
text: "2(10pt)"
}, {
value: 3,
text: "3(12pt)"
}, {
value: 4,
text: "4(14pt)"
}, {
value: 5,
text: "5(18pt)"
}, {
value: 6,
text: "6(24pt)"
}],
_items: [
{
value: 12,
text: 12
},
{
value: 13,
text: 13
},
{
value: 14,
text: 14
},
{
value: 16,
text: 16
},
{
value: 18,
text: 18
},
{
value: 20,
text: 20
},
{
value: 22,
text: 22
},
{
value: 24,
text: 24
},
{
value: 26,
text: 26
},
{
value: 28,
text: 28
},
{
value: 30,
text: 30
},
{
value: 32,
text: 32
},
{
value: 34,
text: 34
},
{
value: 36,
text: 36
},
{
value: 38,
text: 38
},
{
value: 40,
text: 40
},
{
value: 64,
text: 64
},
{
value: 128,
text: 128
}
],
_init: function () {
BI.RichEditorSizeChooser.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var self = this,
o = this.options;
this.trigger = BI.createWidget({
type: "bi.text_trigger",
readonly: true,
@ -84733,27 +84845,49 @@ BI.RichEditorSizeChooser = BI.inherit(BI.RichEditorAction, {
items: BI.createItems(this._items, {
type: "bi.single_select_item"
}),
layouts: [{
layouts: [
{
type: "bi.vertical"
}]
}
]
}
}
});
this.combo.on(BI.Combo.EVENT_CHANGE, function () {
var val = this.getValue()[0];
self.doCommand(val);
self.doAction(val);
this.hideView();
this.setValue([]);
});
},
hideIf: function (e) {
if(!this.combo.element.find(e.target).length > 0) {
if (!this.combo.element.find(e.target).length > 0) {
this.combo.hideView();
}
},
doAction: function (fontSize) {
var editor = this.options.editor.instance;
var range = editor.getRng();
var commonSize = 7;
if (!range.collapsed) {
this.doCommand(commonSize);
BI.each(document.getElementsByTagName("font"), function (idx, el) {
if (
BI.contains($(el).parents(), editor.element[0]) &&
el["size"] == commonSize
) {
$(el)
.removeAttr("size")
.css("font-size", fontSize + "px");
}
});
}
}
});
BI.shortcut("bi.rich_editor_size_chooser", BI.RichEditorSizeChooser);/**
BI.shortcut("bi.rich_editor_size_chooser", BI.RichEditorSizeChooser);
/**
* 富文本编辑器
*
* Created by GUY on 2017/9/15.

40
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save