{I" class:ETI"ProcessedAsset;FI"logical_path;TI"(type_station/editables/text_html.js;FI" pathname;TI"n/Users/richardadams/github/type_station/app/assets/javascripts/type_station/editables/text_html.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+¸‚¾TI" length;Ti# I" digest;TI"%47c4af06bdcb57256f274f8e26620144;FI" source;TI"# (function() { window.TS.EditableText = (function() { function EditableText(elements) { this.elements = elements; this.editor = new MediumEditor(this.elements, { disableReturn: true, buttons: ['bold', 'italic', 'underline', 'anchor'] }); this.editor.deactivate(); } EditableText.prototype.enable = function() { this.editor.activate(); return this.elements.on('input', function() { var model; model = window.TS.getModel($(this).data('ts-edit-url')); if ($(this).is(':input')) { return model.set($(this).data('ts-field'), { field: $(this).data('ts-field'), value: $(this).val(), type: 'text' }); } else { return model.set($(this).data('ts-field'), { field: $(this).data('ts-field'), value: $(this).html(), type: 'text' }); } }); }; EditableText.prototype.disable = function() { this.editor.deactivate(); return this.elements.off('input'); }; return EditableText; })(); window.TS.EditableHtml = (function() { function EditableHtml(elements) { this.elements = elements; this.editor = new MediumEditor(this.elements, { buttons: ['bold', 'italic', 'underline', 'anchor', 'header1', 'header2', 'unorderedlist', 'orderedlist', 'justifyLeft', 'justifyFull', 'justifyCenter', 'justifyRight'] }); this.editor.deactivate(); } EditableHtml.prototype.enable = function() { this.editor.activate(); return this.elements.on('input', function() { var model; model = window.TS.getModel($(this).data('ts-edit-url')); if ($(this).is(':input')) { return model.set($(this).data('ts-field'), { field: $(this).data('ts-field'), value: $(this).val(), type: 'html' }); } else { return model.set($(this).data('ts-field'), { field: $(this).data('ts-field'), value: $(this).html(), type: 'html' }); } }); }; EditableHtml.prototype.disable = function() { this.editor.deactivate(); return this.elements.off('input'); }; return EditableHtml; })(); }).call(this); ;TI"dependency_digest;TI"%153429e75e84a4dee9f3dcba62d5fea6;FI"required_paths;T[I"n/Users/richardadams/github/type_station/app/assets/javascripts/type_station/editables/text_html.js.coffee;FI"dependency_paths;T[{I" path;TI"n/Users/richardadams/github/type_station/app/assets/javascripts/type_station/editables/text_html.js.coffee;FI" mtime;TI"2015-01-20T16:30:48+00:00;TI" digest;TI"%fa97009416422a2271930e5f603e845c;FI" _version;TI"%883b724e06f474a3db2deee10c127ab9;F