Bugzilla – Attachment 57875 Details for
Bug 17209
Remove use of onclick from masthead
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17209: Remove use of onclick from masthead
Bug-17209-Remove-use-of-onclick-from-masthead.patch (text/plain), 3.75 KB, created by
Aleisha Amohia
on 2016-12-02 02:56:20 UTC
(
hide
)
Description:
Bug 17209: Remove use of onclick from masthead
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2016-12-02 02:56:20 UTC
Size:
3.75 KB
patch
obsolete
>From b51bf881caf1b5062da1f4243c6dcb70fe010279 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 29 Aug 2016 04:47:36 +0000 >Subject: [PATCH] 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> >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 4 ++-- > koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc | 8 +++++++- > 2 files changed, 9 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index fdce32c..a778aa9 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -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 %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >index 1a13370..497f2f3 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >@@ -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) { >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17209
:
54966
|
54974
|
55592
|
57875
|
58238
|
58455