o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1357820267.256995: @value"s {I" class:EFI"BundledAsset;FI"logical_path;FI")iugu-ux/components/base_resources.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/base_resources.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-01-09T15:40:06-02:00;FI" length;Fi[ I" digest;F"%611957e2527603e5348e3284ce454e2dI" source;FI"[ (function() { window.app.BaseResources = Backbone.Paginator.requestPager.extend({ paginator_ui: { firstPage: 1, currentPage: 1, perPage: 30 }, server_api: { 'limit': function() { return this.perPage; }, 'start': function() { return (this.currentPage - 1) * this.perPage; }, 'api_token': function() { return api_token; } }, configureFilter: function(param, value) { this.server_api[param] = value; return this.trigger('configured-filter', param); }, removeFilter: function(param) { delete this.server_api[param]; return this.trigger("removed-filter:" + param); }, removeFiltersEndingWith: function(param) { var self; self = this; return _.each(this.server_api, function(value, key) { var _regex; _regex = new RegExp("" + param + "$"); if (key.match(_regex)) { return self.removeFilter(key); } }); }, parse: function(response) { this.totalRecords = response.totalItems; this.facets = response.facets; this.totalPages = Math.ceil(this.totalRecords / this.perPage); return response.items; }, buildChangedPageEventOptions: function() { var that; that = this; return { success: (function(collection, response) { return that.trigger('changed-page:success'); }), error: (function(collection, response) { return that.trigger('changed-page:error'); }) }; }, gotoFirst: function() { return this.goTo(this.information.firstPage, this.buildChangedPageEventOptions()); }, gotoLast: function() { return this.goTo(this.information.lastPage, this.buildChangedPageEventOptions()); }, gotoPage: function(page) { return this.goTo(page, this.buildChangedPageEventOptions()); }, gotoNext: function() { if (this.information.currentPage < this.information.lastPage) { return this.requestNextPage(this.buildChangedPageEventOptions()); } }, gotoPrevious: function() { if (this.information.currentPage > 1) { return this.requestPreviousPage(this.buildChangedPageEventOptions()); } }, disablePagination: function() { return this.perPage = 9223372036854775807; } }); }).call(this); ;FI"required_assets_digest;F"%0a7b10fe9871d8f18aacb79e5a4891bcI" _version;F"%6776f581a4329e299531e1d52aa59832