Bug 17209: Remove use of onclick from masthead
There are two instances which use onclick in the OPAC masthead: clearing search history, and logging out. To test: Confirm that clearing search history using the 'x' in the masthead, and logging out by clicking 'Log out' in the masthead, work the same before and after the patch. Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
5fdbf16959
commit
0b9dcc9ac4
2 changed files with 9 additions and 3 deletions
|
@ -103,14 +103,14 @@
|
|||
[% END %]
|
||||
[% END %]
|
||||
[% IF EnableOpacSearchHistory %]
|
||||
<li><p class="navbar-text"><a href="/cgi-bin/koha/opac-search-history.pl" title="View your search history">Search history</a> [<a class="logout" href="/cgi-bin/koha/opac-search-history.pl?action=delete" title="Delete your search history" onclick="return confirm(MSG_DELETE_SEARCH_HISTORY);">x</a>]</p></li>
|
||||
<li><p class="navbar-text"><a href="/cgi-bin/koha/opac-search-history.pl" title="View your search history">Search history</a> [<a class="logout clearsh" href="/cgi-bin/koha/opac-search-history.pl?action=delete" title="Delete your search history">x</a>]</p></li>
|
||||
<li class="divider-vertical"></li>
|
||||
[% END %]
|
||||
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
|
||||
[% IF ( loggedinusername ) %]
|
||||
<li><p class="navbar-text">
|
||||
[% IF persona %]
|
||||
<a class="logout" id="logout" href="/cgi-bin/koha/opac-main.pl?logout.x=1" onclick='navigator.id.logout();'>
|
||||
<a class="logout" id="logout" href="/cgi-bin/koha/opac-main.pl?logout.x=1">
|
||||
[% ELSE %]
|
||||
<a class="logout" id="logout" href="/cgi-bin/koha/opac-main.pl?logout.x=1">
|
||||
[% END %]
|
||||
|
|
|
@ -149,7 +149,6 @@ $.widget.bridge('uitooltip', $.ui.tooltip);
|
|||
verify_images();
|
||||
});
|
||||
[% END %]
|
||||
|
||||
$(".print-large").on("click",function(){
|
||||
window.print();
|
||||
return false;
|
||||
|
@ -166,6 +165,9 @@ $.widget.bridge('uitooltip', $.ui.tooltip);
|
|||
delSingleRecord('[% biblionumber %]');
|
||||
return false;
|
||||
});
|
||||
$(".clearsh").on("click", function(){
|
||||
return confirmDelete(MSG_DELETE_SEARCH_HISTORY);
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
@ -251,6 +253,10 @@ $.widget.bridge('uitooltip', $.ui.tooltip);
|
|||
}
|
||||
});
|
||||
|
||||
$(".logout").on("click",function(){
|
||||
navigator.id.logout();
|
||||
});
|
||||
|
||||
var signinLink = document.getElementById('browserid');
|
||||
|
||||
if (signinLink) {
|
||||
|
|
Loading…
Reference in a new issue