Bug 11873: Remove decoration on current authority

Previously the current authority was not styled like a link. It was
useful to have a visual feedback knowing which authority is currently
displayed.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2022-01-27 11:10:34 +01:00 committed by Fridolin Somers
parent b3e472090d
commit 026b36dff5
3 changed files with 21 additions and 3 deletions

View file

@ -151,7 +151,12 @@
}
},
"plugins" : [ "types" ]
}).on('ready.jstree', function(){ $(this).jstree('open_all')
}).on('ready.jstree', function(){
$(this).jstree('open_all');
$("#hier"+[% authid %]+"_anchor").on("click",
function(e){e.preventDefault(); return false;}
).css("text-decoration", "none").css("color", "#333");
$(".currentauth").css("text-decoration", "none").css("color", "#333");
}).bind("select_node.jstree", function (e, data) {
e.preventDefault();
document.location.href = data.node.a_attr.href;

View file

@ -91,7 +91,12 @@
}
},
"plugins" : [ "types" ]
}).on('ready.jstree', function(){ $(this).jstree('open_all')
}).on('ready.jstree', function(){
$(this).jstree('open_all')
$("#hier"+[% authid %]+"_anchor").on("click",
function(e){e.preventDefault(); return false;}
).css("text-decoration", "none").css("color", "#333");
$(".currentauth").css("text-decoration", "none").css("color", "#333");
}).bind("select_node.jstree", function (e, data) {
e.preventDefault();
document.location.href = data.node.a_attr.href;

View file

@ -13,6 +13,9 @@
[% Asset.css("lib/jquery/plugins/jstree/themes/default/style.min.css") | $raw %]
[% END %]
[% END %]
[%# FIXME authid is modified when passed authheadingdisplay %]
[%# It's then wrong in the JS %]
[% SET original_authid = authid %]
</head>
[% INCLUDE 'bodytag.inc' bodyid='opac-authoritiesdetail' bodyclass='scrollto' %]
[% INCLUDE 'masthead.inc' %]
@ -183,7 +186,12 @@
}
},
"plugins" : [ "types" ]
}).on('ready.jstree', function(){ $(this).jstree('open_all')
}).on('ready.jstree', function(){
$(this).jstree('open_all');
$("#hier"+[% original_authid %]+"_anchor").on("click",
function(e){e.preventDefault(); return false;}
).css("text-decoration", "none").css("color", "#333");
$(".currentauth").css("text-decoration", "none").css("color", "#333");
}).bind("select_node.jstree", function (e, data) {
e.preventDefault();
document.location.href = data.node.a_attr.href;