{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"%268c7b9965569f4d696485b41a56d3b1;FI" source;TI" (function() { window.TS.EditableText = (function() { function EditableText(_at_elements) { this.elements = _at_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-url')); if ($(this).is(':input')) { return model.set($(this).data('ts-key'), { field: $(this).data('ts-key'), value: $(this).val(), type: 'text' }); } else { return model.set($(this).data('ts-key'), { field: $(this).data('ts-key'), 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(_at_elements) { this.elements = _at_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-url')); if ($(this).is(':input')) { return model.set($(this).data('ts-key'), { field: $(this).data('ts-key'), value: $(this).val(), type: 'html' }); } else { return model.set($(this).data('ts-key'), { field: $(this).data('ts-key'), 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"%32c368c4ebc90907743e0058ed0d5294;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-02-03T12:48:06+00:00;TI" digest;TI"%af941f044c31cb59af06c184a65ec674;FI" _version;TI"%4bf7b15359fe8e0974f7f263e26e27f4;F