From: Jane Sandberg Date: Thu, 29 Aug 2019 01:09:35 +0000 (-0700) Subject: LP1716479: Make sure authority linker works in embedded MARC editors X-Git-Url: http://git.equinoxoli.org/?p=evergreen-equinox.git;a=commitdiff_plain;h=687f0edec1c6605e0e7840a0a39b5bee4b4a8d5f LP1716479: Make sure authority linker works in embedded MARC editors 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 Signed-off-by: Jennifer Weston Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js index 3e82d65..8428df1 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js @@ -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', diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js b/Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js index 0a6a0dd..f132cc6 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js +++ b/Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js @@ -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];