' + '
' + '
|
'; return html; } /* Set all needed properties for scrollThumb and it's width */ Paginator.prototype.initScrollThumb = function(){ this.html.scrollThumb.widthMin = '8'; // minimum width of the scrollThumb (px) this.html.scrollThumb.widthPercent = this.inputData.pagesSpan/this.inputData.pagesTotal * 100; this.html.scrollThumb.xPosPageCurrent = (this.inputData.pageCurrent - Math.round(this.inputData.pagesSpan/2))/this.inputData.pagesTotal * this.html.table.offsetWidth; this.html.scrollThumb.xPos = this.html.scrollThumb.xPosPageCurrent; this.html.scrollThumb.xPosMin = 0; this.html.scrollThumb.xPosMax; this.html.scrollThumb.widthActual; this.setScrollThumbWidth(); } Paginator.prototype.setScrollThumbWidth = function(){ // Try to set width in percents this.html.scrollThumb.style.width = this.html.scrollThumb.widthPercent + "%"; // Fix the actual width in px this.html.scrollThumb.widthActual = this.html.scrollThumb.offsetWidth; // If actual width less then minimum which we set if(this.html.scrollThumb.widthActual = this.inputData.pagesTotal - this.inputData.pagesSpan) { cellFirstValue = this.inputData.pagesTotal - this.inputData.pagesSpan + 1; this.html.scrollThumb.xPos = this.html.table.offsetWidth - this.html.scrollThumb.offsetWidth; this.moveScrollThumb(); } for(var i=0; i" + cellCurrentValue + "" + ""; } else { html = "