prevent negative paging display offset. added paginator to event def grids
[working/Evergreen.git] / Open-ILS / web / js / dojo / openils / widget / AutoGrid.js
index eabe8ae..e51d621 100644 (file)
@@ -85,6 +85,8 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) {
                         onclick : function() { 
                             self.resetStore();
                             self.cachedQueryOpts.offset = self.displayOffset -= self.displayLimit;
+                            if(self.displayOffset < 0)
+                                self.cachedQueryOpts.offset = self.displayOffset = 0;
                             if(self.dataLoader)
                                 self.dataLoader()
                             else