From 485e691b432cfbcc9cfe5900dfeab617aeb17eae Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 29 Oct 2014 17:07:04 -0400 Subject: [PATCH] KMAIN-403 - Mockups for bib record links in manage authorities Cross-port: eb75b2c --- KCLS/openils/var/templates_kcls/cat/authority/list.tt2 | 1 - .../openils/var/templates_kcls/cat/authority/list_id.tt2 | 1 - .../perlmods/lib/OpenILS/Application/Cat/Authority.pm | 5 +++-- Open-ILS/web/js/ui/kcls/cat/authority/list.js | 15 +++++++-------- Open-ILS/web/js/ui/kcls/cat/authority/list_id.js | 16 +++++++--------- 5 files changed, 17 insertions(+), 21 deletions(-) diff --git a/KCLS/openils/var/templates_kcls/cat/authority/list.tt2 b/KCLS/openils/var/templates_kcls/cat/authority/list.tt2 index b38f10aaa3..19968631f5 100644 --- a/KCLS/openils/var/templates_kcls/cat/authority/list.tt2 +++ b/KCLS/openils/var/templates_kcls/cat/authority/list.tt2 @@ -8,7 +8,6 @@ .authEntry > *:first-child { float: left; width: 20%; } .authEntry > .text { float: left; width: 48%; } .authEntry > .authority-control-set { float: right; width: 16%; ; font-style: italic; } - .authEntry > .bibrecord { visibility: hidden } .authority-control-set .acs-name { font-weight: bold; } .authority-control-set .acs-id { } diff --git a/KCLS/openils/var/templates_kcls/cat/authority/list_id.tt2 b/KCLS/openils/var/templates_kcls/cat/authority/list_id.tt2 index cbc81fee9e..27a6b2f4ad 100644 --- a/KCLS/openils/var/templates_kcls/cat/authority/list_id.tt2 +++ b/KCLS/openils/var/templates_kcls/cat/authority/list_id.tt2 @@ -7,7 +7,6 @@ .authEntry > *:first-child { float: left; width: 20%; } .authEntry > .text { float: left; width: 48%; } .authEntry > .authority-control-set { float: right; width: 16%; ; font-style: italic; } - .authEntry > .bibrecord { visibility: hidden } .authority-control-set .acs-name { font-weight: bold; } .authority-control-set .acs-id { } diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm index 5252ed95b1..6a5f36e426 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm @@ -252,11 +252,12 @@ sub titled_linked_bibs { foreach my $bib (@{$response}){ # add to auth's array if it's already there - if ($linked_bibs{${$bib}[0]}){ + if (exists $linked_bibs{${$bib}[0]}){ - my %oldAuth = $linked_bibs{${$bib}[0]}; + my %oldAuth = %{ $linked_bibs{${$bib}[0]} }; $oldAuth{${$bib}[1]} = ${$bib}[2]; + $linked_bibs{${$bib}[0]} = \%oldAuth; } # otherwise, make a new auth object diff --git a/Open-ILS/web/js/ui/kcls/cat/authority/list.js b/Open-ILS/web/js/ui/kcls/cat/authority/list.js index f58b2c4ad0..58556aa38f 100644 --- a/Open-ILS/web/js/ui/kcls/cat/authority/list.js +++ b/Open-ILS/web/js/ui/kcls/cat/authority/list.js @@ -102,7 +102,7 @@ function displayAuthorities(data) { '
' + '
' + '' + auth.text + '
ID: ' + + auth.id + ');">' + auth.text + '
ID: ' + auth.id + '
' + '
Control Set: ' + fetch_control_set(auth.thesaurus).name() + @@ -272,9 +272,9 @@ function getAssociatedBibs(authIds) { count ++; dojo.place(' ', - 'auth' + authIds[i], + 'auth' + authIds[i] + 'BibResults', 'last'); } @@ -287,8 +287,7 @@ function getAssociatedBibs(authIds) { else{ - dojo.place('0 ', 'authLabel' + authIds[i], 'first'); - dojo.place('
-
', 'auth' + authIds[i], 'last'); + dojo.place(' 0 ', 'authLabel' + authIds[i], 'first'); } } } @@ -304,15 +303,15 @@ function toggleBibsForAuthority(authId){ if (bibs[i] != undefined && bibs[i].style != undefined){ - if (bibs[i].style.visibility == "" || bibs[i].style.visibility == "hidden"){ + if (bibs[i].style.display == "" || bibs[i].style.display == "none"){ - bibs[i].style.visibility = "visible"; + bibs[i].style.display = "block"; show = true; } else{ - bibs[i].style.visibility = "hidden"; + bibs[i].style.display = "none"; show = false; } } diff --git a/Open-ILS/web/js/ui/kcls/cat/authority/list_id.js b/Open-ILS/web/js/ui/kcls/cat/authority/list_id.js index 6c9ef38bb4..7da461cada 100644 --- a/Open-ILS/web/js/ui/kcls/cat/authority/list_id.js +++ b/Open-ILS/web/js/ui/kcls/cat/authority/list_id.js @@ -102,7 +102,7 @@ function displayAuthorities(data) { '
' + '
' + '' + auth.text + '
ID: ' + + auth.id + ');">' + auth.text + '
ID: ' + auth.id + '
' + '
Control Set: ' + fetch_control_set(auth.thesaurus).name() + @@ -266,10 +266,9 @@ function getAssociatedBibs(authIds) { var count = 0; for (var bib in msg[authIds[i]]){ count ++; - dojo.place('
- ' + msg[authIds[i]][bib] + + dojo.place(' ', - 'auth' + authIds[i], + 'auth' + authIds[i] + 'BibResults', 'last'); } dojo.place('0 ', 'authLabel' + authIds[i], 'first'); - dojo.place('
-
', 'auth' + authIds[i], 'last'); + dojo.place('0 ', 'authLabel' + authIds[i], 'first'); } } } @@ -292,12 +290,12 @@ function toggleBibsForAuthority(authId){ var show = true; for (var i in bibs){ if (bibs[i] != undefined && bibs[i].style != undefined){ - if (bibs[i].style.visibility == "" || bibs[i].style.visibility == "hidden"){ - bibs[i].style.visibility = "visible"; + if (bibs[i].style.display == "" || bibs[i].style.display == "none"){ + bibs[i].style.display = "block"; show = true; } else{ - bibs[i].style.visibility = "hidden"; + bibs[i].style.display = "none"; show = false; } } -- 2.11.0