o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1355344799.790863: @value"8 {I" class:EFI"BundledAsset;FI"logical_path;FI"*woople-theme/pagination/pagination.js;TI" pathname;FI"|/Users/mundane/Developer/Applications/Rails/woople-theme/app/assets/javascripts/woople-theme/pagination/pagination.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2012-12-11T18:30:51-05:00;FI" length;Fi I" digest;F"%2ea1029621f96f1ef75ccd8304985a7eI" source;FI" (function() { var Pagination; Pagination = (function() { function Pagination() {} Pagination.prototype.init = function(selector, options, debugMode) { this.selector = selector; if (options == null) { options = {}; } this.debugMode = debugMode != null ? debugMode : false; this.log('initialize'); this.options = $.extend({ container: null, timeout: 2500, scrollTo: 0 }, options); return this.setupListeners(); }; Pagination.prototype.pushStateSupported = function() { return $.support.pjax; }; Pagination.prototype.setupListeners = function() { this.log('setup listeners'); if (this.pushStateSupported()) { return this.configureWithPushState(); } else { return this.configureWithoutPushState(); } }; Pagination.prototype.configureWithPushState = function() { var _this = this; this.log('configuring with pushState support'); $.pjax.defaults.scrollTo = this.options.scrollTo; return $(document).pjax(this.selector, this.options).on('pjax:beforeSend', function(e, xhr, err) { return _this.requestStart(e, xhr, err); }).on('pjax:success', function(e, xhr, err) { return _this.requestEnd(e, xhr, err); }); }; Pagination.prototype.configureWithoutPushState = function() { var _this = this; this.log('configuring without pushState support'); return $(document).on('click', this.selector, function(e) { e.preventDefault(); return $.ajax({ url: $(e.target).attr('href'), context: _this, beforeSend: function(xhr) { xhr.setRequestHeader('X-PJAX', 'true'); return this.requestStart(e, xhr, null); }, success: function(data, textStatus, xhr) { return this.requestEnd(e, xhr, null); } }); }); }; Pagination.prototype.requestStart = function(e, xhr, err) { this.log('request is starting'); return $(this.options.container).find('table tbody').css('opacity', 0.5); }; Pagination.prototype.requestEnd = function(e, xhr, err) { this.log('request has finished'); if (!this.pushStateSupported()) { $(this.options.container).html(xhr.responseText); this.log(typeof this.options.scrollTo); if (typeof this.options.scrollTo === 'number') { $(document).scrollTop(this.options.scrollTo); } } return $(this.options.container).find('table tbody').css('opacity', 1); }; Pagination.prototype.log = function(message) { if (this.debugMode) { return console.log("[Pagination] " + message); } }; return Pagination; })(); this.Pagination = Pagination; }).call(this); ;FI"required_assets_digest;F"%82ad30437a96c8b738f1e1fdfbb823a6I" _version;F"%9f3b95dd7ea3030dc35985c0a8020862