Commit 72704a7b authored by Romain Courteaud's avatar Romain Courteaud

erp5_core: jslint on gadget editor

parent 9ca39749
......@@ -20,7 +20,7 @@
function readBlobAsDataURL(blob) {
var fr = new FileReader();
return new RSVP.Promise(function (resolve, reject, notify) {
return new RSVP.Promise(function (resolve, reject) {
fr.addEventListener("load", resolve);
fr.addEventListener("error", reject);
fr.readAsDataURL(blob);
......@@ -70,7 +70,6 @@
.onStateChange(function (modification_dict) {
var element = this.element,
gadget = this,
url,
div = document.createElement('div'),
div_max = document.createElement('div'),
queue = new RSVP.Queue();
......@@ -118,14 +117,14 @@
(gadget.state.editor === 'pdf')) {
queue
.push(function () {
var url = editor_dict[gadget.state.editor].url;
var gadget_url = editor_dict[gadget.state.editor].url;
if (gadget.state.editor === 'jsmd_editor' &&
!gadget.state.run &&
gadget.state.editable) {
url = editor_dict.codemirror.url;
gadget_url = editor_dict.codemirror.url;
}
return gadget.declareGadget(
url,
gadget_url,
{
scope: 'editor',
sandbox: 'iframe',
......@@ -207,7 +206,8 @@
return result;
});
*/
} else if (this.state.editable &&
}
if (this.state.editable &&
(this.state.editor === 'text_area')) {
result = {};
result[this.state.key] = this.element.querySelector('textarea').value;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment