NOBUG: Fixed file access permissions
[moodle.git] / lib / yuilib / 3.13.0 / paginator-core / paginator-core-min.js
blob52bfcbecb2d50547fcb52368e8525f0a25cc0a9d
1 /*
2 YUI 3.13.0 (build 508226d)
3 Copyright 2013 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
6 */
8 YUI.add("paginator-core",function(e,t){var n=e.namespace("Paginator").Core=function(){};n.ATTRS={page:{value:1},totalPages:{readOnly:!0,getter:"_getTotalPagesFn"},itemsPerPage:{value:10},totalItems:{value:0}},e.mix(n.prototype,{prevPage:function(){return this.hasPrevPage()&&this.set("page",this.get("page")-1),this},nextPage:function(){return this.hasNextPage()&&this.set("page",this.get("page")+1),this},hasPrevPage:function(){return this.get("page")>1},hasNextPage:function(){return!this.get("totalItems")||this.get("page")<this.get("totalPages")},_getTotalPagesFn:function(){var e=this.get("itemsPerPage");return e<1?1:Math.ceil(this.get("totalItems")/e)}})},"3.13.0",{requires:["base"]});