o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1357820267.454581: @value"> {I" class:EFI"BundledAsset;FI"logical_path;FI"8iugu-ux/components/usecode/iugu-ui-search-filter.js;TI" pathname;FI"Œ/Users/nkr/.rvm/gems/ruby-1.9.3-p327/gems/iugu-ux-0.8.7/vendor/assets/javascripts/iugu-ux/components/usecode/iugu-ui-search-filter.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-01-09T15:40:06-02:00;FI" length;Fi I" digest;F"%ed182d669b00882b7f9a17eb312db7dbI" 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 .search-filter-button': 'searchCollection' }; SearchFilter.prototype.searchCollection = function(e) { var button, filter; e.preventDefault(); 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.fetch(); }; SearchFilter.prototype.initialize = function() { this.selected = []; _.bindAll(this, 'searchCollection', 'render'); this.collection.on('all', 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() { if (this.collection.facets) { 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"%d4318cd1ee072944b32a00764600dc52I" _version;F"%6776f581a4329e299531e1d52aa59832