From 687f0edec1c6605e0e7840a0a39b5bee4b4a8d5f Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Wed, 28 Aug 2019 18:09:35 -0700 Subject: [PATCH] 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 --- Open-ILS/web/js/ui/default/staff/cat/catalog/app.js | 16 ++-------------- .../web/js/ui/default/staff/cat/services/marcedit.js | 10 ++++++++-- 2 files changed, 10 insertions(+), 16 deletions(-) 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 3e82d65ef5..8428df1195 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 0a6a0dddef..f132cc6a3a 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]; -- 2.11.0