o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1372772480.72684: @value"E{I" class:EFI"ProcessedAsset;FI"logical_path;F"8iugu-ux/components/usecode/iugu-ui-search-filter.jsI" pathname;F"€/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/components/usecode/iugu-ui-search-filter.js.coffeeI"content_type;FI"application/javascript;FI" mtime;FI"2013-06-29T15:50:53-03:00;FI" length;FiŠ I" digest;F"%115b6209c93a37f753a2acf997e50b32I" source;FI"Š (function() { var _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; }; IuguUI.SearchFilter = (function(_super) { __extends(SearchFilter, _super); function SearchFilter() { _ref = SearchFilter.__super__.constructor.apply(this, arguments); return _ref; } SearchFilter.prototype.layout = "iugu-ui-search-filter"; SearchFilter.prototype.className = "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'); button.toggleClass('active'); 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); ;TI"dependency_digest;F"%25fd8a05f59ca9476fe344201d83718fI"required_paths;F["€/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/components/usecode/iugu-ui-search-filter.js.coffeeI"dependency_paths;F[{I" path;F"€/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/components/usecode/iugu-ui-search-filter.js.coffeeI" mtime;FI"2013-06-29T15:50:53-03:00;FI" digest;F"%8b550e2662f419072cd841801f87b3faI" _version;F"%6776f581a4329e299531e1d52aa59832