{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"%183cebca6d7725c4f9944e30b0e68cb8;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"%b0e9725ea61b16ce94b93d1845444828;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"%afb30623b894862ca0012b3b6a96df5d;FI" _version;TI"%64e62ddc273c2f5847f30d698ca14b67;F