o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1384093245.2315059: @value"Ã{I" class:ETI"ProcessedAsset;FI"logical_path;TI"/locomotive/views/current_site/edit_view.js;FI" pathname;TI"z/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2013-06-27T10:26:45+02:00;TI" length;TiWI" digest;TI"%111345c32fa448f028fef72d6485bfa1;FI" source;TI"W(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).CurrentSite || (_base.CurrentSite = {}); Locomotive.Views.CurrentSite.EditView = (function(_super) { __extends(EditView, _super); function EditView() { _ref = EditView.__super__.constructor.apply(this, arguments); return _ref; } EditView.prototype.el = '#content'; EditView.prototype.events = { 'submit': 'save' }; EditView.prototype.initialize = function() { this.model = new Locomotive.Models.CurrentSite(this.options.site); return Backbone.ModelBinding.bind(this, { checkbox: 'class' }); }; EditView.prototype.render = function() { EditView.__super__.render.call(this); this.add_toggle_mode_for_locales(); this.make_locales_sortable(); this.render_domains(); this.render_memberships(); return this.enable_liquid_editing(); }; EditView.prototype.add_toggle_mode_for_locales = function() { return this.$('#site_locales_input .list input[type=checkbox]').bind('change', function(event) { var el; el = $(event.target); if (el.is(':checked')) { return el.closest('.entry').addClass('selected'); } else { return el.closest('.entry').removeClass('selected'); } }); }; EditView.prototype.make_locales_sortable = function() { var _this = this; return this.sortable_locales_list = this.$('#site_locales_input .list').sortable({ items: '.entry', tolerance: 'pointer', update: function() { var list; list = _.map(_this.$('#site_locales_input .list input:checked'), function(el) { return $(el).val(); }); return _this.model.set({ locales: list }); } }); }; EditView.prototype.render_domains = function() { this.domains_view = new Locomotive.Views.Sites.DomainsView({ model: this.model, errors: this.options.errors }); return this.$('#site_domains_input label').after(this.domains_view.render().el); }; EditView.prototype.render_memberships = function() { this.memberships_view = new Locomotive.Views.Sites.MembershipsView({ model: this.model }); return this.$('#site_memberships_input').append(this.memberships_view.render().el); }; EditView.prototype.enable_liquid_editing = function() { var input, _this = this; if (($('#site_robots_txt').length)) { input = this.$('#site_robots_txt'); this.editor = CodeMirror.fromTextArea(input.get()[0], { mode: 'liquid', autoMatchParens: false, lineNumbers: false, passDelay: 50, tabMode: 'shift', theme: 'default' }); return this.editor.on('change', function(editor, change) { return _this.model.set({ robots_txt: editor.getValue() }); }); } }; EditView.prototype.save = function(event) { if (!this.model.get('subdomain') || this.model.includes_domain(window.location.host)) { return this.save_in_ajax(event); } }; EditView.prototype.show_error = function(attribute, message, html) { if (attribute === 'domains') { return this.domains_view.show_error(message); } else { return EditView.__super__.show_error.apply(this, arguments); } }; EditView.prototype.after_inputs_fold = function() { return this.editor.refresh(); }; EditView.prototype.remove = function() { this.domains_view.remove(); this.memberships_view.remove(); return EditView.__super__.remove.apply(this, arguments); }; return EditView; })(Locomotive.Views.Shared.FormView); }).call(this); ;TI"dependency_digest;TI"%cb9d7a44ccebfd5850c8a7d531006731;FI"required_paths;T[I"t/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee;FI"v/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/sites/domains_view.js.coffee;FI"z/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee;FI"dependency_paths;T[{I" path;TI"z/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee;FI" mtime;TI"2013-06-27T10:26:45+02:00;TI" digest;TI"%be7822633d4132dad356ed05983a5508;F{I" path;TI"t/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee;FI" mtime;TI"2013-10-25T15:32:29+02:00;TI" digest;TI"%530d8faa1e59d267e84e809bd2f80524;F{I" path;TI"v/Users/didier/Documents/LocomotiveCMS/engine/app/assets/javascripts/locomotive/views/sites/domains_view.js.coffee;FI" mtime;TI"2012-04-06T12:27:39+02:00;TI" digest;TI"%1e3c50655b4cbf1908edc109ee95288c;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F