From 001edcb20b3b408e9df9f901169749e5585b8b26 Mon Sep 17 00:00:00 2001
From: Jason Etheridge <jason@EquinoxInitiative.org>
Date: Thu, 27 Jun 2019 18:15:50 -0400
Subject: [PATCH] lp1790169 call compileSort after closing showColumnDialog

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 | 7 +++++++
 1 file changed, 7 insertions(+)

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 c347e2e36f..1d5df7dea3 100644
--- a/Open-ILS/web/js/ui/default/staff/services/grid.js
+++ b/Open-ILS/web/js/ui/default/staff/services/grid.js
@@ -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()
                             }
                         }
-- 
2.11.0