prevent negative paging display offset. added paginator to event def grids
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 9 Sep 2009 13:16:52 +0000 (13:16 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 9 Sep 2009 13:16:52 +0000 (13:16 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13985 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Open-ILS/web/templates/default/conify/global/action_trigger/event_definition.tt2

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
index 55da5c2..3e33eb5 100644 (file)
@@ -24,6 +24,7 @@
                     fmClass='atevdef'
                     defaultCellWidth='"auto"'
                     editStyle='pane'
+                    showPaginator='true'
                     editOnEnter='true'>
                 <thead>
                     <tr><th field='name' get='getEventDefNameLink' formatter='formatEventDefNameLink'/></tr>
@@ -48,6 +49,7 @@
                     query="{key: '*'}" 
                     fmClass='ath'
                     defaultCellWidth='20'
+                    showPaginator='true'
                     editOnEnter='true'>
             </table>
         </div>
@@ -66,6 +68,7 @@
                     dojoType="openils.widget.AutoGrid" 
                     query="{module: '*'}" 
                     fmClass='atreact'
+                    showPaginator='true'
                     editOnEnter='true'>
                 <thead>
                     <tr>
@@ -90,6 +93,7 @@
                     dojoType="openils.widget.AutoGrid" 
                     query="{module: '*'}" 
                     fmClass='atval'
+                    showPaginator='true'
                     editOnEnter='true'>
                 <thead>
                     <tr>