o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1396022041.130234: @value"f{I" class:ETI"ProcessedAsset;FI"logical_path;TI"7locomotive/views/inline_editor/application_view.js;FI" pathname;TI"}/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2013-11-25T17:42:15+01:00;TI" length;TiI" digest;TI"%b8aace11c655eed8d65248cbfc981b9c;FI" source;TI"(function() { var _base, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; (_base = Locomotive.Views).InlineEditor || (_base.InlineEditor = {}); Locomotive.Views.InlineEditor.ApplicationView = (function(_super) { __extends(ApplicationView, _super); function ApplicationView() { return ApplicationView.__super__.constructor.apply(this, arguments); } ApplicationView.prototype.el = 'body'; ApplicationView.prototype.initialize = function() { ApplicationView.__super__.initialize.apply(this, arguments); this.iframe = this.$('#page iframe'); _.bindAll(this, '_$'); this.toolbar_view = new Locomotive.Views.InlineEditor.ToolbarView({ target: this.iframe }); return this.content_assets_picker_view = new Locomotive.Views.ContentAssets.PickerView({ collection: new Locomotive.Models.ContentAssetsCollection() }); }; ApplicationView.prototype.render = function() { ApplicationView.__super__.render.apply(this, arguments); this.enable_iframe_autoheight(); this.toolbar_view.render(); return this.content_assets_picker_view.render(); }; ApplicationView.prototype.enable_iframe_autoheight = function() { var iframe; iframe = this.iframe; return iframe.load((function(_this) { return function() { var iframe_content; if (_this._$('meta[name=inline-editor]').size() > 0) { iframe_content = iframe.contents(); iframe_content.resize(function() { var elem; elem = $(this); if (elem.outerHeight(true) > iframe.outerHeight(true)) { return iframe.css({ height: elem.outerHeight(true) }); } }); return iframe_content.resize(); } else { _this.toolbar_view.show_status('disabled', true).hide_editing_mode_block(); return _this.enhance_iframe_links(); } }; })(this)); }; ApplicationView.prototype.set_page = function(attributes) { this.page = new Locomotive.Models.Page(attributes); this.toolbar_view.model = this.page; this.enhance_iframe(); return this.toolbar_view.refresh(); }; ApplicationView.prototype.enhance_iframe = function() { var _window; _window = this._window(); _window.Aloha.settings.locale = window.locale; window.document.title = _window.document.title; window.history.replaceState('OBJECT', 'TITLE', _window.location.href.replace('_edit', '_admin')); if ($.browser.webkit) { window.history.pushState('OBJECT', 'TITLE', _window.location.href.replace('_edit', '_admin')); } this.enhance_iframe_links(_window.Aloha.jQuery); return _window.Aloha.bind('aloha-editable-deactivated', (function(_this) { return function(event, editable) { return _this.toolbar_view.notify(editable.editable); }; })(this)); }; ApplicationView.prototype.enhance_iframe_links = function(_jQuery) { var toolbar_view, _window; toolbar_view = this.toolbar_view; _jQuery || (_jQuery = this._$); _window = this._window(); return _jQuery('a[class!="ui-tabs-anchor"]').live('click', function(event) { var link, url; link = _jQuery(this); url = link.attr('href'); if ((url != null) && url.indexOf('#') !== 0 && /^(www|http)/.exec(url) === null && /(\/_edit)$/.exec(url) === null && /^\/sites\//.exec(url) === null) { if (!link.parents('div.editable-long-text, div.editable-short-text').hasClass('aloha-editable')) { if (url === '/') { url = '/index'; } if (!(url.indexOf('_edit') > 0)) { if (url.indexOf('?') > 0) { url = url.replace('?', '/_edit?'); } else { url = "" + url + "/_edit"; } } toolbar_view.show_status('loading'); return link.attr('href', url); } } else { event.preventDefault(); return window.open(url); } }); }; ApplicationView.prototype.unique_dialog_zindex = function() { var _base1; (_base1 = window.Locomotive).jQueryModals || (_base1.jQueryModals = 0); return 1050 + window.Locomotive.jQueryModals++; }; ApplicationView.prototype._window = function() { return this.iframe[0].contentWindow; }; ApplicationView.prototype._$ = function(selector) { return $(selector, this._window().document); }; return ApplicationView; })(Backbone.View); }).call(this); ;TI"dependency_digest;TI"%4a3d40d7e5f2f8677012a5ca9cce86bb;FI"required_paths;T[I"}/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee;FI"dependency_paths;T[{I" path;TI"}/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee;FI" mtime;TI"2013-11-25T17:42:15+01:00;TI" digest;TI"%f89fa1984bd7d00fa5f9e6fe476571d0;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F