Bugzilla – Attachment 5769 Details for
Bug 6970
logout not redirecting to login page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Fix for Bug 6970 - logout not redirecting to login page
SIGNED-OFF-Fix-for-Bug-6970---logout-not-redirecti.patch (text/plain), 3.21 KB, created by
Nicole C. Engard
on 2011-10-07 12:43:24 UTC
(
hide
)
Description:
[SIGNED-OFF] Fix for Bug 6970 - logout not redirecting to login page
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2011-10-07 12:43:24 UTC
Size:
3.21 KB
patch
obsolete
>From 8470544788b0ea6f697d80cecca9f2376af366e2 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 5 Oct 2011 09:53:02 -0400 >Subject: [PATCH] [SIGNED-OFF] Fix for Bug 6970 - logout not redirecting to login page > >For some reason the latest version of Firefox doesn't like >the javascript which empties the cart on logout. As Ian points >out, there is code which tries to redirect to "about:blank" >and close the window (since the main context of the function >is the Cart's popup window. > >This patch adds a parameter to the delBasket function so >that we can pass a "popup" context to the function and >choose whether or not we want to ask JS to close the window. > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/includes/header.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/js/basket.js | 15 ++++++++++----- > .../intranet-tmpl/prog/en/modules/basket/basket.tt | 2 +- > 3 files changed, 12 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >index 1faf0ca..333748a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >@@ -65,7 +65,7 @@ > [% loggedinusername %] > </span> > [% IF ( intranetbookbag ) %] >- (<a href="/cgi-bin/koha/mainpage.pl?logout.x=1" onclick="delBasket(true);">Log Out</a>) | >+ (<a href="/cgi-bin/koha/mainpage.pl?logout.x=1" onclick="delBasket('main',true);">Log Out</a>) | > [% ELSE %] > (<a href="/cgi-bin/koha/mainpage.pl?logout.x=1">Log Out</a>) | > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js >index 9946cf7..3a09f64 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/basket.js >@@ -299,15 +299,20 @@ function delRecord (n, s) { > } > > >-function delBasket(rep) { >+function delBasket(context,rep) { > if (rep == undefined){ > rep = confirm(MSG_CONFIRM_DEL_BASKET); > } > if (rep) { >- delCookie(nameCookie); >- document.location = "about:blank"; >- updateBasket(0,top.opener); >- window.close(); >+ if(context == "popup"){ >+ delCookie(nameCookie); >+ document.location = "about:blank"; >+ updateBasket(0,top.opener); >+ window.close(); >+ } else { >+ delCookie(nameCookie); >+ updateBasket(0,top.opener); >+ } > } > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt >index 38b25e2..0896075 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt >@@ -103,7 +103,7 @@ function placeHold () { > </li> > <li> > <span id="delete" class="yui-button yui-link-button"><span class="first-child"> >- <a class="empty" href="basket.pl" onclick="delBasket(); return false;">Empty and Close</a> >+ <a class="empty" href="basket.pl" onclick="delBasket('popup'); return false;">Empty and Close</a> > </span></span> > </li> > <li> >-- >1.7.2.3
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 6970
:
5714
| 5769