o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1416672646.801763: @value"Ô {I" class:ETI"ProcessedAsset;FI"logical_path;TI")locomotive/views/shared/list_view.js;FI" pathname;TI"”/Users/didier/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/locomotive_cms-2.5.5/app/assets/javascripts/locomotive/views/shared/list_view.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2014-11-22T16:47:36+01:00;TI" length;TiÄ I" digest;TI"%8b930a27119f0a155d1bee1964d0daab;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).Shared || (_base.Shared = {}); Locomotive.Views.Shared.ListView = (function(_super) { var _item_views; __extends(ListView, _super); function ListView() { return ListView.__super__.constructor.apply(this, arguments); } ListView.prototype.tagName = 'div'; _item_views = []; ListView.prototype.initialize = function() { _.bindAll(this, 'insert_item', 'remove_item'); this.collection.bind('add', this.insert_item); return this.collection.bind('remove', this.remove_item); }; ListView.prototype.template = function() {}; ListView.prototype.item_view_class = function() {}; ListView.prototype.render = function() { $(this.el).html(this.template()()); this.render_items(); return this; }; ListView.prototype.render_items = function() { if (this.collection.length === 0) { return this.$('.no-items').show(); } else { return this.collection.each((function(_this) { return function(item) { return _this.insert_item(item); }; })(this)); } }; ListView.prototype.insert_item = function(item) { var klass, view; klass = this.item_view_class(); view = new klass({ model: item, parent_view: this }); (this._item_views || (this._item_views = [])).push(view); this.$('.no-items').hide(); return this.$('ul').append(view.render().el); }; ListView.prototype.remove_item = function(item) { var view; if (this.collection.length === 0) { this.$('.no-items').show(); } view = _.find(this._item_views, function(tmp) { return tmp.model === item; }); if (view != null) { return view.remove(); } }; ListView.prototype.remove = function() { _.each(this._item_views, (function(_this) { return function(view) { return view.remove(); }; })(this)); return ListView.__super__.remove.apply(this, arguments); }; return ListView; })(Backbone.View); }).call(this); ;TI"dependency_digest;TI"%7fe95f972a0be1f828a136984730c66d;FI"required_paths;T[I"”/Users/didier/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/locomotive_cms-2.5.5/app/assets/javascripts/locomotive/views/shared/list_view.js.coffee;FI"dependency_paths;T[{I" path;TI"”/Users/didier/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/locomotive_cms-2.5.5/app/assets/javascripts/locomotive/views/shared/list_view.js.coffee;FI" mtime;TI"2014-11-22T16:47:36+01:00;TI" digest;TI"%2e67875d150d54eb7cf033037aad00fe;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F