From cf129cc5e91c65372742c39b9ed7c95c8fed86fc Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Sun, 3 Oct 2010 21:05:23 +0000 Subject: [PATCH] 577720: Use history.replaceState() so that the URL after processing a bug isn't process_bug.cgi, post_bug.cgi, or attachment.cgi r=mkanat, a=mkanat git-svn-id: svn://10.0.0.236/trunk@261330 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- .../template/en/default/bug/show-header.html.tmpl | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index b50a706ef75..ee53a3ab564 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -7513 \ No newline at end of file +7514 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/template/en/default/bug/show-header.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/bug/show-header.html.tmpl index a17c3201a7e..9619422efca 100644 --- a/mozilla/webtools/bugzilla/template/en/default/bug/show-header.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/bug/show-header.html.tmpl @@ -32,10 +32,22 @@ [% subheader = filtered_desc %] [% filtered_timestamp = bug.delta_ts FILTER time %] [% title = "$terms.Bug $bug.bug_id – $filtered_desc" %] +[% unfiltered_title = "$terms.Bug $bug.bug_id – $bug.short_desc" %] [% header = "$terms.Bug $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',