{I" class:EFI"ProcessedAsset;FI"logical_path;FI"proclaim/editor.js;TI" pathname;FI"U/home/krf/src/websites/proclaim/app/assets/javascripts/proclaim/editor.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;Fl+d}¨TI" length;Fix I" digest;F"%1616a45404aa25414678f09a94c3cdb4I" source;FI"x (function() { var Editor, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; Editor = (function() { function Editor(form, titleFormField, titleEditableItem, bodyFormField, bodyEditableItem) { var imageDeletePath, imageUploadPath; this.form = form; this.titleFormField = titleFormField; this.titleEditableItem = titleEditableItem; this.bodyFormField = bodyFormField; this.bodyEditableItem = bodyEditableItem; this.updateFormFields = __bind(this.updateFormFields, this); if ((this.form.length === 1) && (this.titleFormField.length === 1) && (this.titleEditableItem.length === 1) && (this.bodyFormField.length === 1) && (this.bodyEditableItem.length === 1)) { imageUploadPath = this.bodyEditableItem.data("image-upload-path"); imageDeletePath = this.bodyEditableItem.data("image-delete-path"); if ((imageUploadPath.length > 0) && (imageDeletePath.length > 0)) { this.bodyEditor = new MediumEditor(this.bodyEditableItem, { buttonLabels: 'fontawesome' }); this.titleEditor = new MediumEditor(this.titleEditableItem); this.bodyEditableItem.mediumInsert({ editor: this.bodyEditor, addons: { images: { imagesUploadScript: imageUploadPath, imagesDeleteScript: imageDeletePath, deleteFile: (function(_this) { return function(file, that) { return $.post(that.options.imagesDeleteScript, { file: file }, function(data, status, jqxhr) { if (data.id) { _this.form.append(''); return _this.form.append(''); } }, "json"); }; })(this) } } }); this.cleanBindings(); this.addBindings(); } else { console.error("Missing image upload and/or image delete paths for body editor!"); } } else { console.error("Invalid length for editable items or form fields!"); } } Editor.prototype.addBindings = function() { return this.form.on("submit", this.updateFormFields); }; Editor.prototype.cleanBindings = function() { return this.form.off("submit"); }; Editor.prototype.updateFormFields = function(event) { this.titleFormField.val(this.titleEditor.serialize()["element-0"].value); return this.bodyFormField.val(this.bodyEditor.serialize()["element-0"].value); }; return Editor; })(); this.Editor = Editor; }).call(this); ;TI"dependency_digest;F"%82700c711c30f1bafc30f2eb7b6ef5ddI"required_paths;F[I"U/home/krf/src/websites/proclaim/app/assets/javascripts/proclaim/editor.js.coffee;TI"dependency_paths;F[{I" path;FI"U/home/krf/src/websites/proclaim/app/assets/javascripts/proclaim/editor.js.coffee;TI" mtime;FI"2015-01-03T18:38:12-05:00;FI" digest;F"%0b7d2530c1a3720b0343173d4ce99097I" _version;F"%883b724e06f474a3db2deee10c127ab9