lp1790169 call compileSort after closing showColumnDialog
authorJason Etheridge <jason@EquinoxInitiative.org>
Thu, 27 Jun 2019 22:15:50 +0000 (18:15 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Sun, 1 Sep 2019 13:09:18 +0000 (09:09 -0400)
or in other words, make Sort Priority work right away after configuring it

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/web/js/ui/default/staff/services/grid.js

index c347e2e..1d5df7d 100644 (file)
@@ -1216,6 +1216,13 @@ angular.module('egGridMod',
                             }
                             $dialogScope.ok = $dialogScope.cancel = function() {
                                 delete $scope.lastModColumn;
+                                if (grid.columnsProvider.hasSortableColumn()) {
+                                    // only refresh the grid if the user has the
+                                    // ability to modify the sort priorities.
+                                    grid.compileSort();
+                                    grid.offset = 0;
+                                    grid.collect();
+                                }
                                 $uibModalInstance.close()
                             }
                         }