o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1364984307.138043: @value"<{I" class:EFI"ProcessedAsset;FI"logical_path;FI")locomotive/views/application_view.js;TI" pathname;FI"p/Users/papipo/Projects/locomotive/engine/app/assets/javascripts/locomotive/views/application_view.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-04-03T11:01:13+02:00;FI" length;Fi¾I" digest;F"%ee66c35244238c75c00fc00e3425337bI" source;FI"¾(function() { var _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; }; Locomotive.Views.ApplicationView = (function(_super) { __extends(ApplicationView, _super); function ApplicationView() { _ref = ApplicationView.__super__.constructor.apply(this, arguments); return _ref; } ApplicationView.prototype.el = 'body'; ApplicationView.prototype.render = function() { this.render_flash_messages(this.options.flash); this.add_submenu_behaviours(); this.center_ui_dialog(); this.enable_sites_picker(); this.enable_content_locale_picker(); window.Locomotive.tinyMCE.defaultSettings.language = window.locale; window.Locomotive.tinyMCE.minimalSettings.language = window.locale; if (this.options.view != null) { this.view = new this.options.view(this.options.view_data || {}); this.view.render(); } return this; }; ApplicationView.prototype.render_flash_messages = function(messages) { return _.each(messages, function(couple) { return $.growl(couple[0], couple[1]); }); }; ApplicationView.prototype.center_ui_dialog = function() { return $(window).resize(function() { return $('.ui-dialog-content:visible').dialog('option', 'position', 'center'); }); }; ApplicationView.prototype.add_submenu_behaviours = function() { var css; $('#submenu ul li.hoverable').each(function() { var link, popup, timer; timer = null; link = $(this); (popup = link.find('.popup')).removeClass('popup').addClass('submenu-popup').bind('show', function() { return link.find('a').addClass('hover') & popup.css({ top: link.offset().top + link.height() - 2, left: link.offset().left - parseInt(popup.css('padding-left')) }).show(); }).bind('hide', function() { return link.find('a').removeClass('hover') & $(this).hide(); }).bind('mouseleave', function() { return popup.trigger('hide'); }).bind('mouseenter', function() { return clearTimeout(timer); }); $(document.body).append(popup); return link.hover(function() { return popup.trigger('show'); }, function() { return timer = window.setTimeout((function() { return popup.trigger('hide'); }), 30); }); }); css = $('#submenu > ul').attr('class'); if (css !== '') { return $("#submenu > ul > li." + css).addClass('on'); } }; ApplicationView.prototype.enable_sites_picker = function() { var left, link, picker; link = this.$('#sites-picker-link'); picker = this.$('#sites-picker'); if (picker.size() === 0) { return; } left = link.position().left + link.parent().position().left - (picker.width() - link.width()); picker.css('left', left); return link.bind('click', function(event) { event.stopPropagation() & event.preventDefault(); return picker.toggle(); }); }; ApplicationView.prototype.enable_content_locale_picker = function() { var link, picker; link = this.$('#content-locale-picker-link'); picker = this.$('#content-locale-picker'); if (picker.size() === 0) { return; } link.bind('click', function(event) { event.stopPropagation() & event.preventDefault(); return picker.toggle(); }); return picker.find('li').bind('click', function(event) { var locale; locale = $(this).data('locale'); return window.addParameterToURL('content_locale', locale); }); }; ApplicationView.prototype.unique_dialog_zindex = function() { var _base; (_base = window.Locomotive).jQueryModals || (_base.jQueryModals = 0); return 998 + window.Locomotive.jQueryModals++; }; return ApplicationView; })(Backbone.View); }).call(this); ;TI"dependency_digest;F"%8c5fc0752886123e402e3127b8caaf20I"required_paths;F[I"p/Users/papipo/Projects/locomotive/engine/app/assets/javascripts/locomotive/views/application_view.js.coffee;TI"dependency_paths;F[{I" path;FI"p/Users/papipo/Projects/locomotive/engine/app/assets/javascripts/locomotive/views/application_view.js.coffee;TI" mtime;FI"2013-04-03T11:01:13+02:00;FI" digest;F"%a00bc3560dce0767602c7c26bb0e6d14I" _version;F"%6776f581a4329e299531e1d52aa59832