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>
[% 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 %]
verify_images();
});
[% END %]
-
$(".print-large").on("click",function(){
window.print();
return false;
delSingleRecord('[% biblionumber %]');
return false;
});
+ $(".clearsh").on("click", function(){
+ return confirmDelete(MSG_DELETE_SEARCH_HISTORY);
+ });
//]]>
</script>
}
});
+ $(".logout").on("click",function(){
+ navigator.id.logout();
+ });
+
var signinLink = document.getElementById('browserid');
if (signinLink) {