o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1372441617.298669: @value"R{I" class:EFI"ProcessedAsset;FI"logical_path;F")iugu-ux/components/base_resources.jsI" pathname;F"v/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/components/base_resources.js.coffeeI"content_type;FI"application/javascript;FI" mtime;FI"2013-06-27T10:44:24-03:00;FI" length;FiÖ I" digest;F"%6a82b21c8e5dbeb5d1c3b8020863a4a4I" 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); }, configureAjax: function() { return app.ajaxSetup({ headers: { Authorization: $.base64.encode(api_token) } }); }, 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 || response; }, 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; }, destroy: function(object) { if (object.id != null) { object.set('_destroy', true); return this.trigger('remove'); } else { return this.remove(object); } } }); }).call(this); ;TI"dependency_digest;F"%7dd31cc019b7d5af8789ce166e64ef08I"required_paths;F["v/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/components/base_resources.js.coffeeI"dependency_paths;F[{I" path;F"v/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/components/base_resources.js.coffeeI" mtime;FI"2013-06-27T10:44:24-03:00;FI" digest;F"%86f1f3d5ff0ba7feff72a2ad9f97a90aI" _version;F"%6776f581a4329e299531e1d52aa59832