From 50ee6eb2ff149ab3f3b67af839680a0e2ea9eedc Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Mon, 27 Feb 2012 14:54:13 +0100 Subject: Bug 730670: Do not redirect in buglist.cgi to improve performance r=glob a=LpSolit --- template/en/default/list/list.html.tmpl | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'template/en/default/list/list.html.tmpl') diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl index be8635408..f6a688c5f 100644 --- a/template/en/default/list/list.html.tmpl +++ b/template/en/default/list/list.html.tmpl @@ -18,13 +18,35 @@ [% PROCESS "global/field-descs.none.tmpl" %] -[% title = "$terms.Bug List" %] +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +[% unfiltered_title = "$terms.Bug List" %] [% IF searchname || defaultsavename %] - [% title = title _ ": " _ (searchname OR defaultsavename) FILTER html %] + [% unfiltered_title = unfiltered_title _ ": " _ (searchname OR defaultsavename) %] [% END %] +[% title = unfiltered_title FILTER html %] [% qorder = order FILTER uri IF order %] +[% javascript = BLOCK %] + [% new_url = cgi.self_url %] + [% IF quicksearch %] + [% new_url = BLOCK ~%] + buglist.cgi?quicksearch=[% quicksearch FILTER uri %] + [%~ IF cgi.param('list_id') ~%] + &list_id=[% cgi.param('list_id') FILTER uri %] + [%~ END %] + [% END %] + [% END %] + + if (history && history.replaceState) { + history.replaceState(null, "[% unfiltered_title FILTER js %]", + "[% new_url FILTER js %]"); + document.title = "[% unfiltered_title FILTER js %]"; + } + [% javascript FILTER none %] +[% END %] [%############################################################################%] [%# Page Header #%] -- cgit v1.2.3-24-g4f1b