Browse Source

Merge branch 'master' of http://cloud.finedevelop.com:2015/scm/visual/fineui

# Conflicts:
#	dist/_fineui.min.js
#	dist/bundle.min.js
#	dist/fineui.min.js
es6
windy 6 years ago
parent
commit
88ecbcf7af
  1. 35
      dist/bundle.js
  2. 35
      dist/case.js
  3. 35
      dist/fineui.js
  4. 14
      src/case/richeditor/bar/action.richeditor.js
  5. 21
      src/case/richeditor/niceditor/niceditor.js

35
dist/bundle.js vendored

@ -82903,13 +82903,13 @@ BI.RichEditorAction = BI.inherit(BI.Widget, {
self.key(e); self.key(e);
} }
}); });
o.editor.on(BI.NicEditor.EVENT_BLUR, function () { // o.editor.on(BI.NicEditor.EVENT_BLUR, function () {
self.setEnable(false); // self.setEnable(false);
}); // });
o.editor.on(BI.NicEditor.EVENT_KEYDOWN, BI.bind(this.keydown, this)); // o.editor.on(BI.NicEditor.EVENT_KEYDOWN, BI.bind(this.keydown, this));
if (o.used === false) { // if (o.used === false) {
this.setEnable(false); // this.setEnable(false);
} // }
}, },
checkNodes: function (e) { checkNodes: function (e) {
@ -83272,9 +83272,12 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
return; return;
// return false; // return false;
} }
if (this.instance.checkToolbar(t)) {
return;
}
} while (t = t.parentNode); } while (t = t.parentNode);
this.fireEvent("blur", t); this.fireEvent("blur", t);
this.lastSelectedInstance = this.selectedInstance; this.lastSelectedInstance = this.selectedInstance || this.lastSelectedInstance;
this.selectedInstance = null; this.selectedInstance = null;
// return false; // return false;
}, },
@ -83283,6 +83286,10 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
this.instance.focus(); this.instance.focus();
}, },
bindToolbar: function (toolbar) {
this.instance.bindToolbar(toolbar);
},
setValue: function (v) { setValue: function (v) {
this.instance.setContent(v); this.instance.setContent(v);
}, },
@ -83291,6 +83298,10 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
return this.instance.getContent(); return this.instance.getContent();
}, },
getInstance: function () {
return this.instance;
},
destroyed: function () { destroyed: function () {
$(document).unbind("mousedown." + this.getName()); $(document).unbind("mousedown." + this.getName());
} }
@ -83529,6 +83540,14 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
} }
}, },
bindToolbar: function (toolbar) {
this.toolbar = toolbar;
},
checkToolbar: function (element) {
return this.toolbar && this.toolbar.element[0] === element;
},
nicCommand: function (cmd, args) { nicCommand: function (cmd, args) {
document.execCommand(cmd, false, args); document.execCommand(cmd, false, args);
} }

35
dist/case.js vendored

@ -10403,13 +10403,13 @@ BI.RichEditorAction = BI.inherit(BI.Widget, {
self.key(e); self.key(e);
} }
}); });
o.editor.on(BI.NicEditor.EVENT_BLUR, function () { // o.editor.on(BI.NicEditor.EVENT_BLUR, function () {
self.setEnable(false); // self.setEnable(false);
}); // });
o.editor.on(BI.NicEditor.EVENT_KEYDOWN, BI.bind(this.keydown, this)); // o.editor.on(BI.NicEditor.EVENT_KEYDOWN, BI.bind(this.keydown, this));
if (o.used === false) { // if (o.used === false) {
this.setEnable(false); // this.setEnable(false);
} // }
}, },
checkNodes: function (e) { checkNodes: function (e) {
@ -10772,9 +10772,12 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
return; return;
// return false; // return false;
} }
if (this.instance.checkToolbar(t)) {
return;
}
} while (t = t.parentNode); } while (t = t.parentNode);
this.fireEvent("blur", t); this.fireEvent("blur", t);
this.lastSelectedInstance = this.selectedInstance; this.lastSelectedInstance = this.selectedInstance || this.lastSelectedInstance;
this.selectedInstance = null; this.selectedInstance = null;
// return false; // return false;
}, },
@ -10783,6 +10786,10 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
this.instance.focus(); this.instance.focus();
}, },
bindToolbar: function (toolbar) {
this.instance.bindToolbar(toolbar);
},
setValue: function (v) { setValue: function (v) {
this.instance.setContent(v); this.instance.setContent(v);
}, },
@ -10791,6 +10798,10 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
return this.instance.getContent(); return this.instance.getContent();
}, },
getInstance: function () {
return this.instance;
},
destroyed: function () { destroyed: function () {
$(document).unbind("mousedown." + this.getName()); $(document).unbind("mousedown." + this.getName());
} }
@ -11029,6 +11040,14 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
} }
}, },
bindToolbar: function (toolbar) {
this.toolbar = toolbar;
},
checkToolbar: function (element) {
return this.toolbar && this.toolbar.element[0] === element;
},
nicCommand: function (cmd, args) { nicCommand: function (cmd, args) {
document.execCommand(cmd, false, args); document.execCommand(cmd, false, args);
} }

35
dist/fineui.js vendored

@ -83152,13 +83152,13 @@ BI.RichEditorAction = BI.inherit(BI.Widget, {
self.key(e); self.key(e);
} }
}); });
o.editor.on(BI.NicEditor.EVENT_BLUR, function () { // o.editor.on(BI.NicEditor.EVENT_BLUR, function () {
self.setEnable(false); // self.setEnable(false);
}); // });
o.editor.on(BI.NicEditor.EVENT_KEYDOWN, BI.bind(this.keydown, this)); // o.editor.on(BI.NicEditor.EVENT_KEYDOWN, BI.bind(this.keydown, this));
if (o.used === false) { // if (o.used === false) {
this.setEnable(false); // this.setEnable(false);
} // }
}, },
checkNodes: function (e) { checkNodes: function (e) {
@ -83521,9 +83521,12 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
return; return;
// return false; // return false;
} }
if (this.instance.checkToolbar(t)) {
return;
}
} while (t = t.parentNode); } while (t = t.parentNode);
this.fireEvent("blur", t); this.fireEvent("blur", t);
this.lastSelectedInstance = this.selectedInstance; this.lastSelectedInstance = this.selectedInstance || this.lastSelectedInstance;
this.selectedInstance = null; this.selectedInstance = null;
// return false; // return false;
}, },
@ -83532,6 +83535,10 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
this.instance.focus(); this.instance.focus();
}, },
bindToolbar: function (toolbar) {
this.instance.bindToolbar(toolbar);
},
setValue: function (v) { setValue: function (v) {
this.instance.setContent(v); this.instance.setContent(v);
}, },
@ -83540,6 +83547,10 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
return this.instance.getContent(); return this.instance.getContent();
}, },
getInstance: function () {
return this.instance;
},
destroyed: function () { destroyed: function () {
$(document).unbind("mousedown." + this.getName()); $(document).unbind("mousedown." + this.getName());
} }
@ -83778,6 +83789,14 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
} }
}, },
bindToolbar: function (toolbar) {
this.toolbar = toolbar;
},
checkToolbar: function (element) {
return this.toolbar && this.toolbar.element[0] === element;
},
nicCommand: function (cmd, args) { nicCommand: function (cmd, args) {
document.execCommand(cmd, false, args); document.execCommand(cmd, false, args);
} }

14
src/case/richeditor/bar/action.richeditor.js

@ -24,13 +24,13 @@ BI.RichEditorAction = BI.inherit(BI.Widget, {
self.key(e); self.key(e);
} }
}); });
o.editor.on(BI.NicEditor.EVENT_BLUR, function () { // o.editor.on(BI.NicEditor.EVENT_BLUR, function () {
self.setEnable(false); // self.setEnable(false);
}); // });
o.editor.on(BI.NicEditor.EVENT_KEYDOWN, BI.bind(this.keydown, this)); // o.editor.on(BI.NicEditor.EVENT_KEYDOWN, BI.bind(this.keydown, this));
if (o.used === false) { // if (o.used === false) {
this.setEnable(false); // this.setEnable(false);
} // }
}, },
checkNodes: function (e) { checkNodes: function (e) {

21
src/case/richeditor/niceditor/niceditor.js

@ -65,9 +65,12 @@
return; return;
// return false; // return false;
} }
if (this.instance.checkToolbar(t)) {
return;
}
} while (t = t.parentNode); } while (t = t.parentNode);
this.fireEvent("blur", t); this.fireEvent("blur", t);
this.lastSelectedInstance = this.selectedInstance; this.lastSelectedInstance = this.selectedInstance || this.lastSelectedInstance;
this.selectedInstance = null; this.selectedInstance = null;
// return false; // return false;
}, },
@ -76,6 +79,10 @@
this.instance.focus(); this.instance.focus();
}, },
bindToolbar: function (toolbar) {
this.instance.bindToolbar(toolbar);
},
setValue: function (v) { setValue: function (v) {
this.instance.setContent(v); this.instance.setContent(v);
}, },
@ -84,6 +91,10 @@
return this.instance.getContent(); return this.instance.getContent();
}, },
getInstance: function () {
return this.instance;
},
destroyed: function () { destroyed: function () {
$(document).unbind("mousedown." + this.getName()); $(document).unbind("mousedown." + this.getName());
} }
@ -322,6 +333,14 @@
} }
}, },
bindToolbar: function (toolbar) {
this.toolbar = toolbar;
},
checkToolbar: function (element) {
return this.toolbar && this.toolbar.element[0] === element;
},
nicCommand: function (cmd, args) { nicCommand: function (cmd, args) {
document.execCommand(cmd, false, args); document.execCommand(cmd, false, args);
} }

Loading…
Cancel
Save