o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1381142256.06579: @value"Y{I" class:EFI"ProcessedAsset;FI"logical_path;FI"7locomotive/views/inline_editor/application_view.js;TI" pathname;FI"’/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.1.0/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-10-07T10:55:40+02:00;FI" length;FiUI" digest;F"%683909cdb49f0f451727bda0e34ee482I" source;FI"U(function() { var _base, _ref, __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() { _ref = ApplicationView.__super__.constructor.apply(this, arguments); return _ref; } 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, _this = this; iframe = this.iframe; return iframe.load(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(); } }); }; 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, _this = this; _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(event, editable) { return _this.toolbar_view.notify(editable.editable); }); }; 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(event.target); 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;F"%42f87fe5bc9edaa850b3a19bcc7c24e5I"required_paths;F[I"’/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.1.0/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee;TI"dependency_paths;F[{I" path;FI"’/Users/papipo/.rvm/gems/ruby-1.9.3-p448/gems/locomotive_cms-2.1.0/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee;TI" mtime;FI"2013-10-07T10:55:40+02:00;FI" digest;F"%8e51ab38fa5d35d184fc249c7d50d035I" _version;F"%ffd318ca8b794f42f5029101c2cf5d91