summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-07-23 23:58:45 +0200
committerDave Lawrence <dlawrence@mozilla.com>2012-07-23 23:58:45 +0200
commit9a63ac0764abca55f1b61a4c0719315002c02ac0 (patch)
treeb76f8f4eb95e13e37ea6e083d77d1288d1273b66 /template/en/default/bug
parentbfabb024d429c1ec92a48ab01e528838ab289a56 (diff)
downloadbugzilla-9a63ac0764abca55f1b61a4c0719315002c02ac0.tar.gz
bugzilla-9a63ac0764abca55f1b61a4c0719315002c02ac0.tar.xz
Bug 767308 - Bug id should be last field in URL query string (after list_id)
r=glob, a=LpSolit
Diffstat (limited to 'template/en/default/bug')
-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 095b91086..6d4e2d595 100644
--- a/template/en/default/bug/show-header.html.tmpl
+++ b/template/en/default/bug/show-header.html.tmpl
@@ -24,11 +24,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 %]