From 25d150610268287394304aaa620f204f59a749cd Mon Sep 17 00:00:00 2001 From: Victoria Lewis Date: Tue, 15 Dec 2015 13:52:11 -0800 Subject: [PATCH] LP#1461739: Added paging controls to the bottom of autogrids This is a repatch of LP#1461739: Paging controls needed at the bottom of the web client patron search. The actions drop-down menu now appears on the Record Buckets, and Copy Buckets pages. staff/services/grid.js was updated to account for the new *Top and *Bottom variables (e.g., gridColumnPickerIsOpenTop). To test the fix for this bug [1] Under Cataloging choose Record Buckets. [2] Under Cataloging choose Copy Buckets. Signed-off-by: Victoria Lewis modified: Open-ILS/src/templates/staff/share/button_bar.tt2 modified: Open-ILS/src/templates/staff/share/t_autogrid.tt2 modified: Open-ILS/web/js/ui/default/staff/services/grid.js --- Open-ILS/src/templates/staff/share/button_bar.tt2 | 14 ++- Open-ILS/src/templates/staff/share/t_autogrid.tt2 | 141 ---------------------- Open-ILS/web/js/ui/default/staff/services/grid.js | 33 +++-- 3 files changed, 31 insertions(+), 157 deletions(-) diff --git a/Open-ILS/src/templates/staff/share/button_bar.tt2 b/Open-ILS/src/templates/staff/share/button_bar.tt2 index be205f8a84..419129ecd9 100644 --- a/Open-ILS/src/templates/staff/share/button_bar.tt2 +++ b/Open-ILS/src/templates/staff/share/button_bar.tt2 @@ -4,7 +4,7 @@
-
+
@@ -96,7 +100,7 @@
  • - {{t}} + {{t}}
  • diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2 index 4d25413f81..31576869aa 100644 --- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 +++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2 @@ -57,147 +57,6 @@ [% INCLUDE "staff/share/button_bar.tt2" top=1 %] - - -
    - - - - - - - - - - - - -
    - - -
    - -
    - - -
    - -
    - - -
    - - -
    diff --git a/Open-ILS/web/js/ui/default/staff/services/grid.js b/Open-ILS/web/js/ui/default/staff/services/grid.js index 66a2bf3908..682344c3b1 100644 --- a/Open-ILS/web/js/ui/default/staff/services/grid.js +++ b/Open-ILS/web/js/ui/default/staff/services/grid.js @@ -356,7 +356,8 @@ angular.module('egGridMod', // remove the stored column configuration preferenc, then recover // the column visibility information from the initial page load. $scope.resetColumns = function() { - $scope.gridColumnPickerIsOpen = false; + $scope.gridColumnPickerIsOpenTop = false; + $scope.gridColumnPickerIsOpenBottom = false; egCore.hatch.removeItem('eg.grid.' + grid.persistKey) .then(function() { grid.columnsProvider.reset(); @@ -365,19 +366,22 @@ angular.module('egGridMod', } $scope.showAllColumns = function() { - $scope.gridColumnPickerIsOpen = false; + $scope.gridColumnPickerIsOpenTop = false; + $scope.gridColumnPickerIsOpenBottom = false; grid.columnsProvider.showAllColumns(); if (grid.selfManagedData) grid.collect(); } $scope.hideAllColumns = function() { - $scope.gridColumnPickerIsOpen = false; + $scope.gridColumnPickerIsOpenTop = false; + $scope.gridColumnPickerIsOpenBottom = false; grid.columnsProvider.hideAllColumns(); // note: no need to fetch new data if no columns are visible } $scope.toggleColumnVisibility = function(col) { - $scope.gridColumnPickerIsOpen = false; + $scope.gridColumnPickerIsOpenTop = false; + $scope.gridColumnPickerIsOpenBottom = false; col.visible = !col.visible; // egGridFlatDataProvider only retrieves data to be @@ -389,7 +393,8 @@ angular.module('egGridMod', // save the columns configuration (position, sort, width) to // eg.grid. $scope.saveConfig = function() { - $scope.gridColumnPickerIsOpen = false; + $scope.gridColumnPickerIsOpenTop = false; + $scope.gridColumnPickerIsOpenBottom = false; if (!grid.persistKey) { console.warn( @@ -847,7 +852,8 @@ angular.module('egGridMod', $scope.showGridConf = true; } - $scope.gridColumnPickerIsOpen = false; + $scope.gridColumnPickerIsOpenTop = false; + $scope.gridColumnPickerIsOpenBottom = false; } // called when a dragged column is dropped onto itself @@ -892,7 +898,8 @@ angular.module('egGridMod', // sets the download file name and inserts the current CSV // into a Blob URL for browser download. $scope.generateCSVExportURL = function() { - $scope.gridColumnPickerIsOpen = false; + $scope.gridColumnPickerIsOpenTop = false; + $scope.gridColumnPickerIsOpenBottom = false; // let the file name describe the grid $scope.csvExportFileName = @@ -907,7 +914,8 @@ angular.module('egGridMod', } $scope.printCSV = function() { - $scope.gridColumnPickerIsOpen = false; + $scope.gridColumnPickerIsOpenTop = false; + $scope.gridColumnPickerIsOpenBottom = false; egCore.print.print({ context : 'default', content : grid.generateCSV(), @@ -983,9 +991,12 @@ angular.module('egGridMod', // ensure all of our dropdowns are closed // TODO: git rid of these and just use dropdown-toggle, // which is more reliable. - $scope.gridColumnPickerIsOpen = false; - $scope.gridRowCountIsOpen = false; - $scope.gridPageSelectIsOpen = false; + $scope.gridColumnPickerIsOpenTop = false; + $scope.gridColumnPickerIsOpenBottom = false; + $scope.gridRowCountIsOpenTop = false; + $scope.gridRowCountIsOpenBottom = false; + $scope.gridPageSelectIsOpenTop = false; + $scope.gridPageSelectIsOpenBottom = false; $scope.items = []; $scope.selected = {}; -- 2.11.0