o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1357760297.6409731´: @value"f {I" class:EFI"BundledAsset;FI"logical_path;FI")iugu-ux/components/base_resources.js;FI" pathname;FI"v/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/components/base_resources.js.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2013-01-09T11:39:28-02:00;FI" length;Fi[ I" digest;F"%c3c446d5237a7541f41ad42f6f4bb75dI" 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"%2e20ed8c2e7df9a107556daeda6329e0I" _version;F"%9f3b95dd7ea3030dc35985c0a8020862