summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-07-24 00:00:04 +0200
committerDave Lawrence <dlawrence@mozilla.com>2012-07-24 00:00:04 +0200
commitc393215bb6dd344045a4ac63b1107864b2fcbffe (patch)
treedbf257b040948e008b058e0c0ac7451a20db1920
parent68e12cdd7ca90594089327e00cf0b7c50e4d0807 (diff)
downloadbugzilla-c393215bb6dd344045a4ac63b1107864b2fcbffe.tar.gz
bugzilla-c393215bb6dd344045a4ac63b1107864b2fcbffe.tar.xz
Bug 767308 - Bug id should be last field in URL query string (after list_id)
r=glob, a=LpSolit
-rw-r--r--template/en/default/bug/show-header.html.tmpl17
1 files changed, 12 insertions, 5 deletions
diff --git a/template/en/default/bug/show-header.html.tmpl b/template/en/default/bug/show-header.html.tmpl
index 30fb7e8fb..b93f3edf1 100644
--- a/template/en/default/bug/show-header.html.tmpl
+++ b/template/en/default/bug/show-header.html.tmpl
@@ -39,11 +39,18 @@
[% IF bug.defined %]
[% unfiltered_title = "$terms.Bug $bug.bug_id – $bug.short_desc" %]
[% javascript = BLOCK %]
- if( !document.location.href.match(/show_bug\.cgi/) && history && history.replaceState ) {
- history.replaceState( null,
- "[% unfiltered_title FILTER js %]",
- "show_bug.cgi?id=[% bug.bug_id FILTER js %]" );
- document.title = "[% unfiltered_title FILTER js %]";
+ if (history && history.replaceState) {
+ if(!document.location.href.match(/show_bug\.cgi/)) {
+ history.replaceState( null,
+ "[% unfiltered_title FILTER js %]",
+ "show_bug.cgi?id=[% bug.bug_id FILTER js %]" );
+ document.title = "[% unfiltered_title FILTER js %]";
+ }
+ if (document.location.href.match(/show_bug\.cgi\?.*list_id=/)) {
+ var href = document.location.href;
+ href = href.replace(/[\?&]+list_id=(\d+|cookie)/, '');
+ history.replaceState(null, "[% unfiltered_title FILTER js %]", href);
+ }
}
[% javascript FILTER none %]
[% END %]