o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1357654410.510349: @value"Y {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-08T10:21:05-02:00;FI" length;FiN I" digest;F"%eac2aeeef51c9eb10c27a07c5b8dad4bI" source;FI"N (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() { return { success: (function(collection, response) { return this.trigger('changed-page:success'); }).bind(this), error: (function(collection, response) { return this.trigger('changed-page:error'); }).bind(this) }; }, 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"%83afbfb2cc56bf6ed125b45a53067fe0I" _version;F"%9f3b95dd7ea3030dc35985c0a8020862