o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1383239455.5513148: @value"¥{I" class:ETI"ProcessedAsset;FI"logical_path;TI"7locomotive/views/inline_editor/application_view.js;FI" pathname;TI"§/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/locomotive_cms-2.3.0/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2013-10-31T17:26:43+01:00;TI" length;TiNI" digest;TI"%300f3a83941417b376f5a18e59059194;FI" source;TI"N(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;TI"%cf84c33cb9cc47d28d4f10169db47398;FI"required_paths;T[I"§/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/locomotive_cms-2.3.0/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee;FI"dependency_paths;T[{I" path;TI"§/Users/didier/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/locomotive_cms-2.3.0/app/assets/javascripts/locomotive/views/inline_editor/application_view.js.coffee;FI" mtime;TI"2013-10-31T17:26:43+01:00;TI" digest;TI"%8e51ab38fa5d35d184fc249c7d50d035;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F