Small fix for PagingToolbar - Ext JS

1151 단어 SVNextGo
Jack,
I have a small fix for the PagingToolbar. There was a problem using the "go to end" button when there were no rows "left over" on the final page. It would just go to the second page under these circumstances.
You will find the patch in SVN format below.
Regards,
Gordon
Index: ext/ext-all-debug.js
===================================================================
--- ext/ext-all-debug.js	(revision 11210)
+++ ext/ext-all-debug.js	(working copy)
@@ -12937,7 +12937,8 @@
             case "last":
                 var total = ds.getTotalCount();
                 var extra = total % this.pageSize;
-                var lastStart = total - (extra || total-this.pageSize);
+//                var lastStart = total - (extra || total-this.pageSize); // bug where extra==0
+                var lastStart = extra ? (total - extra) : total-this.pageSize;
                 ds.load({params:{start: lastStart, limit: this.pageSize}});
             break;
             case "refresh":

  #
2  
02-26-2007, 07:11 AM
Thanks Gordon. This is in Rev 5.

좋은 웹페이지 즐겨찾기