{I" class:ETI"ProcessedAsset;FI"logical_path;TI"outpost/preview.js;FI" pathname;TI"Z/Users/bricker/websites/kpcc/outpost/app/assets/javascripts/outpost/preview.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+d}RI" length;Ti5I" digest;TI"%de87d27b5045a86491c42816a3a7ab20;FI" source;TI"5(function() { outpost.Preview = (function() { function Preview(options) { var _t; this.options = options; _t = this; $("form #preview-submit a.js-preview-btn").on({ click: function(event) { var data, form, id, instance, target, _ref; event.preventDefault(); target = $(this); form = target.closest("form"); if (typeof CKEDITOR !== "undefined" && CKEDITOR !== null) { _ref = CKEDITOR.instances; for (id in _ref) { instance = _ref[id]; instance.updateElement(); } } data = form.serialize(); $.ajax({ type: 'POST', dataType: "html", url: "" + _t.options.baseUrl + "/preview", data: data, beforeSend: function(jqXHR, settings) { _t.openWindow(target.data("windowOptions")); return _t.writeToWindow(JST['outpost/templates/loading']()); }, statusCode: { 200: function(data, textStatus, jqXHR) { return _t.writeToWindow(data); }, 404: function(jqXHR, textStatus, errorThrown) { return _t.writeToWindow("Error: " + errorThrown); }, 500: function(jqXHR, textStatus, errorThrown) { return _t.writeToWindow("Error: " + errorThrown); } } }); return false; } }); } Preview.prototype.openWindow = function(options) { if (options == null) { options = ""; } if (!this.window || (this.window && this.window.closed)) { return this.window = window.open("", "preview", "scrollbars=yes,menubar=no,location=no,directories=no,toolbar=no," + options); } else { return this.window.focus(); } }; Preview.prototype.writeToWindow = function(data) { this.window.document.write(data); return this.window.document.close(); }; return Preview; })(); }).call(this); ;TI"dependency_digest;TI"%ab2dcc92b9622d75cee40b9bbf84b551;FI"required_paths;T[I"Z/Users/bricker/websites/kpcc/outpost/app/assets/javascripts/outpost/preview.js.coffee;FI"dependency_paths;T[{I" path;TI"Z/Users/bricker/websites/kpcc/outpost/app/assets/javascripts/outpost/preview.js.coffee;FI" mtime;TI"2013-11-08T18:26:44-08:00;TI" digest;TI"%a6c0a6cb19e0134e335a238382d7c605;FI" _version;TI"%64b22cf9f770209c1e0beb31754a8cbc;F