Bugzilla – Attachment 30526 Details for
Bug 12708
Unexpected behaviour in IE 9 and lower when using openWindow
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12708 - Unexpected behaviour in IE 9 and lower when using openWindow
Bug-12708---Unexpected-behaviour-in-IE-9-and-lower.patch (text/plain), 5.19 KB, created by
David Cook
on 2014-08-04 04:06:36 UTC
(
hide
)
Description:
Bug 12708 - Unexpected behaviour in IE 9 and lower when using openWindow
Filename:
MIME Type:
Creator:
David Cook
Created:
2014-08-04 04:06:36 UTC
Size:
5.19 KB
patch
obsolete
>From 40d2521f3f2bae6f407f768f66123923fcf8dc3f Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 4 Aug 2014 13:49:56 +1000 >Subject: [PATCH] Bug 12708 - Unexpected behaviour in IE 9 and lower when > using openWindow > >This patch removes the whitespace from arguments to the "name" parameter >in "window.open". It also adds a trap for the "openWindow" helper >function, which will use a "null" instead of a "name" if window.open >isn't able to handle a name with whitespace (i.e. if it's IE <= 9). > >_TEST PLAN_ > >1) Switch to an emulated or authentic Internet Explorer version E 9 >or lower >2) Click "Help" >3) Note that it opens the page in the current window rather than as a popup > >4) Apply the patch > >5) Shift refresh your page >6) Click "Help" >7) Note that it now opens (correctly) as a pop-up > >(If you want to be more thorough, you can test in other browsers as well >to make sure that it still works.) >--- > koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 9 +++++++-- > .../prog/en/modules/authorities/authorities.tt | 2 +- > .../prog/en/modules/cataloguing/addbiblio.tt | 2 +- > 3 files changed, 9 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >index c553a6d..fa75b44 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >@@ -81,7 +81,7 @@ function logOut(){ > } > > function openHelp(){ >- openWindow("/cgi-bin/koha/help.pl","Koha help",600,600); >+ openWindow("/cgi-bin/koha/help.pl","KohaHelp",600,600); > } > > jQuery.fn.preventDoubleFormSubmit = function() { >@@ -98,7 +98,12 @@ function openWindow(link,name,width,height) { > name = (typeof name == "undefined")?'popup':name; > width = (typeof width == "undefined")?'600':width; > height = (typeof height == "undefined")?'400':height; >- var newin=window.open(link,name,'width='+width+',height='+height+',resizable=yes,toolbar=false,scrollbars=yes,top'); >+ //IE <= 9 can't handle a "name" with whitespace >+ try { >+ var newin=window.open(link,name,'width='+width+',height='+height+',resizable=yes,toolbar=false,scrollbars=yes,top'); >+ } catch(e) { >+ var newin=window.open(link,null,'width='+width+',height='+height+',resizable=yes,toolbar=false,scrollbars=yes,top'); >+ } > } > > // Use this function to remove the focus from any element for >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >index b7dcbf7..5827198 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >@@ -154,7 +154,7 @@ function confirmnotdup(redirect){ > [% IF ( duplicateauthid ) %] > <div class="dialog alert"> > <h4>Duplicate record suspected</h4> >- <p>Is this a duplicate of <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% duplicateauthid %]" onclick="openWindow('/cgi-bin/koha/authorities/detail.pl?authid=[% duplicateauthid %]&popup=1', 'Duplicate authority','800','600'); return false;" class="button">[% duplicateauthvalue %]</a>?</p> >+ <p>Is this a duplicate of <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% duplicateauthid %]" onclick="openWindow('/cgi-bin/koha/authorities/detail.pl?authid=[% duplicateauthid %]&popup=1', 'DuplicateAuthority','800','600'); return false;" class="button">[% duplicateauthvalue %]</a>?</p> > > <form action="authorities.pl" method="get"> > <input type="hidden" name="authid" value="[% duplicateauthid %]" /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index 5dc1a5f..790a57b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -403,7 +403,7 @@ function Changefwk(FwkList) { > [% IF ( duplicatebiblionumber ) %] > <div class="dialog alert"> > <h4>Duplicate record suspected</h4> >- <p>Is this a duplicate of <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% duplicatebiblionumber %]" onclick="openWindow('/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% duplicatebiblionumber %]&popup=1', 'Duplicate biblio','800','600'); return false;">[% duplicatetitle %]</a>?</p> >+ <p>Is this a duplicate of <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% duplicatebiblionumber %]" onclick="openWindow('/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% duplicatebiblionumber %]&popup=1', 'DuplicateBiblio','800','600'); return false;">[% duplicatetitle %]</a>?</p> > [% IF ( CAN_user_editcatalogue_edit_items ) %]<form action="/cgi-bin/koha/cataloguing/additem.pl" method="get"> > <input type="hidden" name="biblionumber" value="[% duplicatebiblionumber %]" /> > <input type="submit" class="edit" value="Yes: Edit existing items" /> >-- >1.7.7.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 12708
:
30526
|
30556
|
30866