]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
577720: Use history.replaceState() so that the URL after processing a bug isn't proce...
authorGuy Pyrzak <guy.pyrzak@gmail.com>
Sun, 3 Oct 2010 20:47:02 +0000 (13:47 -0700)
committerGuy Pyrzak <guy.pyrzak@gmail.com>
Sun, 3 Oct 2010 20:47:02 +0000 (13:47 -0700)
r=mkanat, a=mkanat

https://bugzilla.mozilla.org/show_bug.cgi?id=577720

template/en/default/bug/show-header.html.tmpl

index a17c3201a7eaabc4c51811be890b51dbd49f702f..9619422efca18c4b53ec6e72c1cb4d20c5946e46 100644 (file)
 [% subheader = filtered_desc %]
 [% filtered_timestamp = bug.delta_ts FILTER time %]
 [% title = "$terms.Bug $bug.bug_id &ndash; $filtered_desc" %]
+[% unfiltered_title = "$terms.Bug $bug.bug_id – $bug.short_desc" %]
 [% header = "$terms.Bug&nbsp;$bug.bug_id" %]
 [% header_addl_info = "Last modified: $filtered_timestamp" %]
 [% yui = ['autocomplete', 'calendar'] %]
 [% javascript_urls = [ "js/util.js", "js/field.js" ] %]
+[% IF ! Bugzilla.cgi.url.match("show_bug.cgi") && bug.defined %]
+  [% javascript =  BLOCK %]
+    if( 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 %]";
+    }
+    [% javascript FILTER none %]
+  [% END %]
+[% END %]
 [% style_urls = [ "skins/standard/show_bug.css" ] %]
 [% doc_section = "bug_page.html" %]
 [% bodyclasses = ['bz_bug',