From efe88c035f1d92965197899c7ff9e3fdf6a1a754 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 18 Aug 2021 18:44:54 +0800 Subject: [PATCH] handle exception on store load if paging toolbar is used --- Roo/bootstrap/PagingToolbar.js | 2 +- roojs-bootstrap-debug.js | 2 +- roojs-bootstrap.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Roo/bootstrap/PagingToolbar.js b/Roo/bootstrap/PagingToolbar.js index bde357542e..5f6003b194 100644 --- a/Roo/bootstrap/PagingToolbar.js +++ b/Roo/bootstrap/PagingToolbar.js @@ -258,7 +258,7 @@ Roo.extend(Roo.bootstrap.PagingToolbar, Roo.bootstrap.nav.Simplebar, { }, // private - onLoadError : function(o){ + onLoadError : function(proxy, o){ this.loading.enable(); if (this.ds.events.loadexception.listeners.length < 2) { // nothing has been assigned to loadexception except this... diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index a3cf4d4450..a8ebd5ad6c 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -28779,7 +28779,7 @@ Roo.extend(Roo.bootstrap.PagingToolbar, Roo.bootstrap.nav.Simplebar, { }, // private - onLoadError : function(o){ + onLoadError : function(proxy, o){ this.loading.enable(); if (this.ds.events.loadexception.listeners.length < 2) { // nothing has been assigned to loadexception except this... diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 509c9b3429..23795c1e0b 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1218,7 +1218,7 @@ this.navgroup.parentId=this.id;this.navgroup.onRender(this.el,null);if(this.disp });},updateInfo:function(){if(this.displayEl){var A=(typeof(this.getCount)=='undefined')?this.ds.getCount():this.getCount();var B=A==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+A,this.ds.getTotalCount());this.displayEl.update(B); }},onLoad:function(ds,r,o){this.cursor=o.params&&o.params.start?o.params.start:0;var d=this.getPageData(),ap=d.activePage,ps=d.pages;this.afterTextEl.dom.innerHTML=String.format(this.afterPageText,d.pages);this.field.dom.value=ap;this.first.setDisabled(ap==1); this.prev.setDisabled(ap==1);this.next.setDisabled(ap==ps);this.last.setDisabled(ap==ps);this.loading.enable();this.updateInfo();},getPageData:function(){var A=this.ds.getTotalCount();return {total:A,activePage:Math.ceil((this.cursor+this.pageSize)/this.pageSize),pages:A=1&parseInt(v,10)+B<=d.pages){this.field.dom.value=parseInt(v,10)+B;A=Math.min(Math.max(1,A+B),d.pages)-1;this.ds.load({params:{start:A*this.pageSize,limit:this.pageSize} -- 2.39.2