CAT-199 Save state of default browse dropdown
authorKyle Huckins <khuckins@catalyte.io>
Mon, 18 Mar 2019 17:16:03 +0000 (17:16 +0000)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:54:48 +0000 (15:54 -0400)
- Ensure Default Browse Sort selector displays existing choice.

Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
 Changes to be committed:
modified:   Open-ILS/web/js/ui/default/staff/admin/workstation/app.js

Open-ILS/web/js/ui/default/staff/admin/workstation/app.js

index 1b0da00..2322c89 100644 (file)
@@ -206,6 +206,10 @@ function($scope , $window , $location , egCore , egConfirmDialog) {
         }
     });
 
+    $scope.results_sort = 'pubdate';
+    egCore.hatch.getItem('eg.search.browse_sort_default').then(function(val) {
+        $scope.results_sort = val;
+    });
     $scope.$watch('results_sort', function(newVal, oldVal) {
         if (typeof newVal != 'undefined' && newVal != oldVal) {
             egCore.hatch.setItem('eg.search.browse_sort_default', newVal);