Roo/bootstrap/PagingToolbar.js
authorAlan Knowles <alan@roojs.com>
Wed, 28 Nov 2018 08:40:51 +0000 (16:40 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 28 Nov 2018 08:40:51 +0000 (16:40 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/PagingToolbar.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 8fe0d23..b20ab0c 100644 (file)
@@ -46,9 +46,10 @@ Roo.bootstrap.PagingToolbar = function(config)
     
     if (Roo.bootstrap.version == 4) {
         this.navgroup = new Roo.bootstrap.ButtonGroup({ cls: 'pagination' });
-    }
+    } else {
     
-    this.navgroup = new Roo.bootstrap.NavGroup({ cls: 'pagination' });
+        this.navgroup = new Roo.bootstrap.NavGroup({ cls: 'pagination' });
+    }
     
 };
 
index bc96c46..261a7d3 100644 (file)
@@ -24658,7 +24658,12 @@ Roo.bootstrap.PagingToolbar = function(config)
         this.bind(this.ds);
     }
     
-    this.navgroup = new Roo.bootstrap.NavGroup({ cls: 'pagination' });
+    if (Roo.bootstrap.version == 4) {
+        this.navgroup = new Roo.bootstrap.ButtonGroup({ cls: 'pagination' });
+    } else {
+    
+        this.navgroup = new Roo.bootstrap.NavGroup({ cls: 'pagination' });
+    }
     
 };
 
index 2353be4..4ed50fa 100644 (file)
@@ -1024,7 +1024,7 @@ if(k==e.TAB){e.stopEvent();ed.completeEdit();if(e.shiftKey){B=g.walkCells(ed.row
 }else{B=g.walkCells(ed.row+1,ed.col,1,this.acceptsNav,this);}}else if(k==e.ESC){ed.cancelEdit();}if(B){g.startEditing(B[0],B[1]);}}});
 // Roo/bootstrap/PagingToolbar.js
 Roo.bootstrap.PagingToolbar=function(A){this.ds=A.dataSource;if(A.store&&!this.ds){this.store=Roo.factory(A.store,Roo.data);this.ds=this.store;this.ds.xmodule=this.xmodule||false;}this.toolbarItems=[];if(A.items){this.toolbarItems=A.items;}Roo.bootstrap.PagingToolbar.superclass.constructor.call(this,A);
-this.cursor=0;if(this.ds){this.bind(this.ds);}this.navgroup=new Roo.bootstrap.NavGroup({cls:'pagination'});};Roo.extend(Roo.bootstrap.PagingToolbar,Roo.bootstrap.NavSimplebar,{pageSize:20,displayMsg:'Displaying {0} - {1} of {2}',emptyMsg:'No data to display',beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",buttons:false,onRender:function(ct,A){Roo.bootstrap.PagingToolbar.superclass.onRender.call(this,ct,A);
+this.cursor=0;if(this.ds){this.bind(this.ds);}if(Roo.bootstrap.version==4){this.navgroup=new Roo.bootstrap.ButtonGroup({cls:'pagination'});}else{this.navgroup=new Roo.bootstrap.NavGroup({cls:'pagination'});}};Roo.extend(Roo.bootstrap.PagingToolbar,Roo.bootstrap.NavSimplebar,{pageSize:20,displayMsg:'Displaying {0} - {1} of {2}',emptyMsg:'No data to display',beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",buttons:false,onRender:function(ct,A){Roo.bootstrap.PagingToolbar.superclass.onRender.call(this,ct,A);
 this.navgroup.parentId=this.id;this.navgroup.onRender(this.el,null);if(this.displayInfo){this.el.select('ul.navbar-nav',true).first().createChild({cls:'x-paging-info'});this.displayEl=this.el.select('.x-paging-info',true).first();}var B=this;if(this.buttons){Roo.each(B.buttons,function(e){Roo.factory(e).render(B.el);
 });}Roo.each(B.toolbarItems,function(e){B.navgroup.addItem(e);});this.first=this.navgroup.addItem({tooltip:this.firstText,cls:"prev",icon:'fa fa-step-backward',disabled:true,preventDefault:true,listeners:{click:this.onClick.createDelegate(this,["first"])}
 });this.prev=this.navgroup.addItem({tooltip:this.prevText,cls:"prev",icon:'fa fa-backward',disabled:true,preventDefault:true,listeners:{click:this.onClick.createDelegate(this,["prev"])}});var C=this.navgroup.addItem({tagtype:'span',cls:'x-paging-position',html:this.beforePageText+'<input type="text" size="3" value="1" class="x-grid-page-number">'+'<span class="x-paging-after">'+String.format(this.afterPageText,1)+'</span>'}