webstaff: for selected grids, allow display of 10000 items
authorMike Rylander <mrylander@gmail.com>
Thu, 22 Oct 2015 15:42:15 +0000 (11:42 -0400)
committerKathy Lussier <klussier@masslnc.org>
Tue, 2 Feb 2016 19:58:53 +0000 (14:58 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/cat/bucket/copy/t_view.tt2
Open-ILS/src/templates/staff/share/t_autogrid.tt2
Open-ILS/web/js/ui/default/staff/services/grid.js

index 9f9ec65..655e785 100644 (file)
@@ -1,6 +1,6 @@
 <eg-grid
   ng-hide="forbidden"
-  features="-display"
+  features="allowAll,-display"
   id-field="id"
   idl-class="acp"
   auto-fields="true"
index 087b058..3ffd9f2 100644 (file)
     </div>
 
     <div class="btn-group" dropdown is-open="gridRowCountIsOpen" ng-show="showPagination">
-      <button type="button" title="[% ('Select Row Count') %]"
+      <button type="button" title="[% l('Select Row Count') %]"
         class="btn btn-default dropdown-toggle">
         [% l('Rows [_1]', '{{limit()}}') %]
         <span class="caret"></span>
             {{t}}
           </a>
         </li>
+        <li ng-if="allowAll" >
+          <a href ng-click='offset(0);limit(10000);collect()'>[% l('All') %]</a>
+        </li>
       </ul>
     </div>
 
     <div class="btn-group" dropdown is-open="gridPageSelectIsOpen" ng-show="showPagination">
-      <button type="button" title="[% ('Select Page') %]"
+      <button type="button" title="[% l('Select Page') %]"
         class="btn btn-default dropdown-toggle">
         [% l('Page [_1]', '{{page()}}') %]
         <span class="caret"></span>
index 4e48f93..d02841e 100644 (file)
@@ -38,10 +38,11 @@ angular.module('egGridMod',
             // comma-separated list of supported or disabled grid features
             // supported features:
             //  startSelected : init the grid with all rows selected by default
+            //  allowAll : add an "All" option to row count (really 10000)
             //  -menu : don't show any menu buttons (or use space for them)
             //  -picker : don't show the column picker
             //  -pagination : don't show any pagination elements, and set
-            //                the limit to 1000
+            //                the limit to 10000
             //  -actions : don't show the actions dropdown
             //  -index : don't show the row index column (can't use "index"
             //           as the idField in this case)
@@ -132,6 +133,7 @@ angular.module('egGridMod',
 
                 $scope.showIndex = (features.indexOf('-index') == -1);
 
+                $scope.allowAll = (features.indexOf('allowAll') > -1);
                 $scope.startSelected = $scope.selectAll = (features.indexOf('startSelected') > -1);
                 $scope.showActions = (features.indexOf('-actions') == -1);
                 $scope.showPagination = (features.indexOf('-pagination') == -1);