o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1374760179.174261: @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-07-22T14:48:55-03:00;FI" length;FiŠ I" digest;F"%3fa60e5d477ac4ea34c4893e9a3aba08I" 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 = { name: "age", filterNames: ["age"], fixedFilters: [], multiSelection: false, translateTerms: false, translationPrefix: "translation." }; 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.length > 0 && _.first(this.selected) === filter))) { 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.name + '_filter', this.selected); } else { this.collection.removeFilter(this.options.name + '_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.name + "_filter", this.removedFilter, this); SearchFilter.__super__.initialize.apply(this, arguments); return this; }; SearchFilter.prototype.context = function() { return { collection: this.collection, selected: this.selected, filterNames: this.options.filterNames, fixedFilters: this.options.fixedFilters, translateTerms: this.options.translateTerms, translationPrefix: this.options.translationPrefix }; }; 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"%a8d5bf92b1da2e9e0046d689196f049eI"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-07-22T14:48:55-03:00;FI" digest;F"%587716c854614497802e3f752e234a48I" _version;F"%6776f581a4329e299531e1d52aa59832