LP#1799963 - fix catalog advanced search type default
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Thu, 25 Oct 2018 21:54:42 +0000 (17:54 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 18 Feb 2019 18:47:13 +0000 (13:47 -0500)
Since eg.search.adv_pane is now a server stored WS setting
it needed to be fetched with the proper way in order to work.

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Angela Kilsdonk <akilsdonk@equinoxinitiative.org>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Open-ILS/web/js/ui/default/staff/cat/catalog/app.js

index 422ebeb..c8a1a36 100644 (file)
@@ -1919,13 +1919,15 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e
         // whatever default pane the user has chosen via workstation
         // preference
         if (url.match(/\/opac\/advanced$/)) {
-            var adv_pane = egCore.hatch.getLocalItem('eg.search.adv_pane');
-            if (adv_pane) {
-                url += '?pane=' + encodeURIComponent(adv_pane);
-            }
+            egCore.hatch.getItem('eg.search.adv_pane').then(function(adv_pane_val){
+                if (adv_pane_val) {
+                    url += '?pane=' + encodeURIComponent(adv_pane_val);
+                }
+
+                $scope.catalog_url = url;
+            });
         }
 
-        $scope.catalog_url = url;
     }
 
     function init_parts_url() {