"+this.i18n.paging.page+(i+1)+"", "paging_page.gif");
}
this.aToolBar.setItemText("pages", this.i18n.paging.page+page);
}
// pButton.setSelected(page.toString())
if (this._WTDef[1]){
if (!this.getRowsNum())
this.aToolBar.setItemText('results',this.i18n.paging.notfound);
else
this.aToolBar.setItemText('results',""+this.i18n.paging.records+(start+1)+this.i18n.paging.to+end+"
");
}
if (this._WTDef[3])
this.aToolBar.setItemText("perpagenum", this.rowsBufferOutSize.toString()+" "+this.i18n.paging.perpage);
this.callEvent("onPaging",[]);
}
dhtmlXGridObject.prototype._pgn_createToolBar = function(){
this.aToolBar = new dhtmlXToolbarObject({
parent: this._pgn_parentObj,
skin: (this._pgn_skin_tlb||this.skin_name),
icons_path: this.imgURL
});
if (!this._WTDef) this.setPagingWTMode(true, true, true, true);
var self = this;
this.aToolBar.attachEvent("onClick", function(val){
val = val.split("_");
switch (val[0]){
case "leftabs":
self.changePage(1);
break;
case "left":
self.changePage(self.currentPage-1);
break;
case "rightabs":
self.changePage(99999);
break;
case "right":
self.changePage(self.currentPage+1);
break;
case "perpagenum":
if (val[1]===this.undefined) return;
self.rowsBufferOutSize = parseInt(val[1]);
self.changePage();
self.aToolBar.setItemText("perpagenum", val[1]+" "+self.i18n.paging.perpage);
break;
case "pages":
if (val[1]===this.undefined) return;
self.changePage(val[1]);
self.aToolBar.setItemText("pages", self.i18n.paging.page+val[1]);
break;
}
});
// add buttons
if (this._WTDef[0]) {
this.aToolBar.addButton("leftabs", NaN, null, "ar_left_abs.gif", "ar_left_abs_dis.gif");
this.aToolBar.addButton("left", NaN, null, "ar_left.gif", "ar_left_dis.gif");
}
if (this._WTDef[1]) {
this.aToolBar.addText("results", NaN, this.i18n.paging.results);
this.aToolBar.setWidth("results", "150");
this.aToolBar.disableItem("results");
}
if (this._WTDef[0]) {
this.aToolBar.addButton("right", NaN, null, "ar_right.gif", "ar_right_dis.gif");
this.aToolBar.addButton("rightabs", NaN, null, "ar_right_abs.gif", "ar_right_abs_dis.gif");
}
if (this._WTDef[2]) {
if (this.aToolBar.conf.skin == "dhx_terrace") this.aToolBar.addSeparator();
this.aToolBar.addButtonSelect("pages", NaN, "select page", [], "paging_pages.gif", null, false, true);
}
var arr;
if (arr = this._WTDef[3]) {
if (this.aToolBar.conf.skin == "dhx_terrace") this.aToolBar.addSeparator();
this.aToolBar.addButtonSelect("perpagenum", NaN, "select size", [], "paging_rows.gif", null, false, true);
if (typeof arr != "object") arr = [5,10,15,20,25,30];
var w = {dhx_skyblue: 4, dhx_web: 0, dhx_terrace: 18}[this.aToolBar.conf.skin];
for (var k=0; k"+arr[k]+" "+this.i18n.paging.perpage+"", "paging_page.gif");
}
}
//var td = document.createElement("TD"); td.width = "5"; this.aToolBar.tr.appendChild(td);
//var td = document.createElement("TD"); td.width = "100%"; this.aToolBar.tr.appendChild(td);
return this.aToolBar;
}