{I" class:ETI"ProcessedAsset; FI"logical_path; TI"jquery.simplePagination.js; FI" pathname; TI"b/Users/aaron/dev/push_type_split/wysiwyg/vendor/assets/javascripts/jquery.simplePagination.js; FI"content_type; TI"application/javascript; TI" mtime; Tl+¥TÒTI"length; TiÓ'I"digest; TI"%4b9d9feb5b503defc3fabe57285f0fb5; FI"source; TI"Ó'/** * simplePagination.js v1.6 * A simple jQuery pagination plugin. * http://flaviusmatis.github.com/simplePagination.js/ * * Copyright 2012, Flavius Matis * Released under the MIT license. * http://flaviusmatis.github.com/license.html */ (function($){ var methods = { init: function(options) { var o = $.extend({ items: 1, itemsOnPage: 1, pages: 0, displayedPages: 5, edges: 2, currentPage: 0, hrefTextPrefix: '#page-', hrefTextSuffix: '', prevText: 'Prev', nextText: 'Next', ellipseText: '…', cssStyle: 'light-theme', labelMap: [], selectOnClick: true, nextAtFront: false, invertPageOrder: false, useStartEdge : true, useEndEdge : true, onPageClick: function(pageNumber, event) { // Callback triggered when a page is clicked // Page number is given as an optional parameter }, onInit: function() { // Callback triggered immediately after initialization } }, options || {}); var self = this; o.pages = o.pages ? o.pages : Math.ceil(o.items / o.itemsOnPage) ? Math.ceil(o.items / o.itemsOnPage) : 1; if (o.currentPage) o.currentPage = o.currentPage - 1; else o.currentPage = !o.invertPageOrder ? 0 : o.pages - 1; o.halfDisplayed = o.displayedPages / 2; this.each(function() { self.addClass(o.cssStyle + ' simple-pagination').data('pagination', o); methods._draw.call(self); }); o.onInit(); return this; }, selectPage: function(page) { methods._selectPage.call(this, page - 1); return this; }, prevPage: function() { var o = this.data('pagination'); if (!o.invertPageOrder) { if (o.currentPage > 0) { methods._selectPage.call(this, o.currentPage - 1); } } else { if (o.currentPage < o.pages - 1) { methods._selectPage.call(this, o.currentPage + 1); } } return this; }, nextPage: function() { var o = this.data('pagination'); if (!o.invertPageOrder) { if (o.currentPage < o.pages - 1) { methods._selectPage.call(this, o.currentPage + 1); } } else { if (o.currentPage > 0) { methods._selectPage.call(this, o.currentPage - 1); } } return this; }, getPagesCount: function() { return this.data('pagination').pages; }, getCurrentPage: function () { return this.data('pagination').currentPage + 1; }, destroy: function(){ this.empty(); return this; }, drawPage: function (page) { var o = this.data('pagination'); o.currentPage = page - 1; this.data('pagination', o); methods._draw.call(this); return this; }, redraw: function(){ methods._draw.call(this); return this; }, disable: function(){ var o = this.data('pagination'); o.disabled = true; this.data('pagination', o); methods._draw.call(this); return this; }, enable: function(){ var o = this.data('pagination'); o.disabled = false; this.data('pagination', o); methods._draw.call(this); return this; }, updateItems: function (newItems) { var o = this.data('pagination'); o.items = newItems; o.pages = methods._getPages(o); this.data('pagination', o); methods._draw.call(this); }, updateItemsOnPage: function (itemsOnPage) { var o = this.data('pagination'); o.itemsOnPage = itemsOnPage; o.pages = methods._getPages(o); this.data('pagination', o); methods._selectPage.call(this, 0); return this; }, _draw: function() { var o = this.data('pagination'), interval = methods._getInterval(o), i, tagName; methods.destroy.call(this); tagName = (typeof this.prop === 'function') ? this.prop('tagName') : this.attr('tagName'); var $panel = tagName === 'UL' ? this : $('