LP1716479: Make sure authority linker works in embedded MARC editors
authorJane Sandberg <sandbej@linnbenton.edu>
Thu, 29 Aug 2019 01:09:35 +0000 (18:09 -0700)
committerGalen Charlton <gmc@equinoxOLI.org>
Tue, 4 Apr 2023 15:09:51 +0000 (11:09 -0400)
1) Perform a z39.50 search
2) Select a record
3) Click Edit then Import
4) Click on the link next to any authorizable field.
5) You will see a mysteriously data-free heading: {{bibField.tag}} {{bibField.ind1}}{{bibField.ind2}}
6) Clicking on the "Immediately" and "Create and edit" buttons doesn't work.
7) Apply this patch and repeat steps 1-6.
8) Note that the heading is now correct, and the buttons work.

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Jennifer Weston <jennifer.weston@equinoxOLI.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>

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

index 3e82d65..8428df1 100644 (file)
@@ -20,20 +20,8 @@ angular.module('egCatalogApp', ['ui.bootstrap','ngRoute','ngLocationUpdate','egC
 .config(function($routeProvider, $locationProvider, $compileProvider) {
     $locationProvider.html5Mode(true);
     $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|blob):/); // grid export
-       
-    var resolver = {delay : ['egCore','egStartup','egUser', function(egCore, egStartup, egUser) {
-        egCore.env.classLoaders.aous = function() {
-            return egCore.org.settings([
-                'cat.marc_control_number_identifier'
-            ]).then(function(settings) {
-                // local settings are cached within egOrg.  Caching them
-                // again in egEnv just simplifies the syntax for access.
-                egCore.env.aous = settings;
-            });
-        }
-        egCore.env.loadClasses.push('aous');
-        return egStartup.go()
-    }]};
+
+    var resolver = {delay : function(egStartup) {return egStartup.go()}};
 
     $routeProvider.when('/cat/catalog/index', {
         templateUrl: './cat/catalog/t_catalog',
index 0a6a0dd..f132cc6 100644 (file)
@@ -1632,8 +1632,14 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap'])
             function ($scope , $uibModal,  egCore,  egAuth) {
 
                 $scope.searchStr = '';
-                var cni = egCore.env.aous['cat.marc_control_number_identifier'] ||
-                  'Set cat.marc_control_number_identifier in Library Settings';
+                var cni = 'Set cat.marc_control_number_identifier in Library Settings';
+                egCore.org.settings([
+                    'cat.marc_control_number_identifier'
+                ]).then(function(settings) {
+                    if (settings['cat.marc_control_number_identifier']) {
+                        cni = settings['cat.marc_control_number_identifier'];
+                    }
+                });
 
                 var axis_list = $scope.controlSet.bibFieldBrowseAxes($scope.bibField.tag);
                 $scope.axis = axis_list[0];