o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1397508830.97955: @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/bundler/gems/engine-5337f0929131/app/assets/javascripts/locomotive/views/shared/list_view.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2014-04-10T01:06:58+02: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.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/engine-5337f0929131/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/bundler/gems/engine-5337f0929131/app/assets/javascripts/locomotive/views/shared/list_view.js.coffee;FI" mtime;TI"2014-04-10T01:06:58+02:00;TI" digest;TI"%2e67875d150d54eb7cf033037aad00fe;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F