/* * pagination.js 2.5.0 * A jQuery plugin to provide simple yet fully customisable pagination * https://github.com/superRaytin/paginationjs * Homepage: http://pagination.js.org * * Copyright 2014-2100, superRaytin * Released under the MIT license. */ !function(n,c){void 0===c&&l("Pagination requires jQuery.");var r="pagination",s="__pagination-",I=(c.fn.pagination&&l('plugin conflicted, the name "pagination" has been taken by another jQuery plugin.'),c.fn[r]=function(a){if(void 0!==a){var t,u=c(this),D=c.extend({},c.fn[r].defaults,a),e={initialize:function(){var e,t=this;u.data("pagination")||u.data("pagination",{}),!1!==t.callHook("beforeInit")&&(u.data("pagination").initialized&&c(".paginationjs",u).remove(),t.disabled=!!D.disabled,e=t.model={pageRange:D.pageRange,pageSize:D.pageSize},t.parseDataSource(D.dataSource,function(a){t.isAsync=I.isString(a),I.isArray(a)&&(e.totalNumber=D.totalNumber=a.length),t.isDynamicTotalNumber=t.isAsync&&D.totalNumberLocator;a=t.render(!0);D.className&&a.addClass(D.className),e.el=a,u["bottom"===D.position?"append":"prepend"](a),t.observer(),u.data("pagination").initialized=!0,t.callHook("afterInit",a)}))},render:function(a){var e=this,t=e.model,o=t.el||c('
'),a=!0!==a,t=(e.callHook("beforeRender",a),t.pageNumber||D.pageNumber),i=D.pageRange||0,n=e.getTotalPage(),r=t-i,s=t+i;return(r=n