diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2012-07-23 17:58:45 -0400 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2012-07-23 17:58:45 -0400 |
commit | 9a63ac0764abca55f1b61a4c0719315002c02ac0 (patch) | |
tree | b76f8f4eb95e13e37ea6e083d77d1288d1273b66 /template/en | |
parent | bfabb024d429c1ec92a48ab01e528838ab289a56 (diff) | |
download | bugs-9a63ac0764abca55f1b61a4c0719315002c02ac0.tar bugs-9a63ac0764abca55f1b61a4c0719315002c02ac0.tar.gz bugs-9a63ac0764abca55f1b61a4c0719315002c02ac0.tar.bz2 bugs-9a63ac0764abca55f1b61a4c0719315002c02ac0.tar.xz bugs-9a63ac0764abca55f1b61a4c0719315002c02ac0.zip |
Bug 767308 - Bug id should be last field in URL query string (after list_id)
r=glob, a=LpSolit
Diffstat (limited to 'template/en')
-rw-r--r-- | template/en/default/bug/show-header.html.tmpl | 17 |
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 %] |