o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1361449320.429003tÉ: @value"O {I" class:EFI"BundledAsset;FI"logical_path;FI"8iugu-ux/components/usecode/iugu-ui-search-filter.js;FI" pathname;FI"•/Users/patricknegri/.rvm/gems/ruby-1.9.2-p290/gems/iugu-ux-0.9.2/vendor/assets/javascripts/iugu-ux/components/usecode/iugu-ui-search-filter.js.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2013-01-17T19:18:49-02:00;FI" length;Fi I" digest;F"%3b085a7fc360a922233e1e4cc7a219f2I" source;FI" (function() { var __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; }; IuguUI.SearchFilter = (function(_super) { __extends(SearchFilter, _super); function SearchFilter() { return SearchFilter.__super__.constructor.apply(this, arguments); } SearchFilter.prototype.layout = "iugu-ui-search-filter"; SearchFilter.prototype.defaults = { filterName: "age", fixedFilters: [], multiSelection: false }; SearchFilter.prototype.events = { 'click [data-action=search-filter-button]': 'searchCollection' }; SearchFilter.prototype.searchCollection = function(e) { var button, filter; e.preventDefault(); this.handleEvent("facet:click"); button = $(e.target); filter = button.data('filter'); if (!this.options.multiSelection) { this.selected = []; } if (_.indexOf(this.selected, filter.toString()) !== -1) { this.selected = _.without(this.selected, filter.toString()); } else { this.selected.push(filter.toString()); } if (this.selected.length > 0) { this.collection.configureFilter(this.options.filterName + '_filter', this.selected); } else { this.collection.removeFilter(this.options.filterName + '_filter'); } return this.collection.goTo(1); }; SearchFilter.prototype.initialize = function() { this.selected = []; _.bindAll(this, 'searchCollection', 'render'); this.collection.on('reset', this.render, this); this.collection.on("removed-filter:" + this.options.filterName + "_filter", this.removedFilter, this); SearchFilter.__super__.initialize.apply(this, arguments); return this; }; SearchFilter.prototype.context = function() { return { collection: this.collection, selected: this.selected, filterName: this.options.filterName, fixedFilters: this.options.fixedFilters }; }; SearchFilter.prototype.render = function() { return SearchFilter.__super__.render.apply(this, arguments); }; SearchFilter.prototype.removedFilter = function() { return this.selected = []; }; return SearchFilter; })(IuguUI.Base); this.IuguUI.SearchFilter = IuguUI.SearchFilter; }).call(this); ;FI"required_assets_digest;F"%9c3b91c410d91f0f53d4f5120a91ee23I" _version;F"%6776f581a4329e299531e1d52aa59832