o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1383239457.570325: @value" {I" class:ETI"ProcessedAsset;FI"logical_path;TI")locomotive/views/shared/list_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/shared/list_view.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2013-10-31T17:26:43+01:00;TI" length;Ti I" digest;TI"%04fb475c51ec7210842f3a1ab5ebdd3d;FI" source;TI" (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).Shared || (_base.Shared = {}); Locomotive.Views.Shared.ListView = (function(_super) { var _item_views; __extends(ListView, _super); function ListView() { _ref = ListView.__super__.constructor.apply(this, arguments); return _ref; } 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() { var _this = this; if (this.collection.length === 0) { return this.$('.no-items').show(); } else { return this.collection.each(function(item) { return _this.insert_item(item); }); } }; 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() { var _this = this; _.each(this._item_views, function(view) { return view.remove(); }); return ListView.__super__.remove.apply(this, arguments); }; return ListView; })(Backbone.View); }).call(this); ;TI"dependency_digest;TI"%515fd6799c96e0352fc2f0607e6962f5;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/shared/list_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/shared/list_view.js.coffee;FI" mtime;TI"2013-10-31T17:26:43+01:00;TI" digest;TI"%2e67875d150d54eb7cf033037aad00fe;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F