summaryrefslogtreecommitdiffstats
path: root/template/en/default
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2012-02-27 14:54:13 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2012-02-27 14:54:13 +0100
commit50ee6eb2ff149ab3f3b67af839680a0e2ea9eedc (patch)
tree5dbaa90d673b2c6de97c4cdb869e5047f54472d5 /template/en/default
parentc650592f1cdb27e5605d70a80ae03e9a2afb879b (diff)
downloadbugzilla-50ee6eb2ff149ab3f3b67af839680a0e2ea9eedc.tar.gz
bugzilla-50ee6eb2ff149ab3f3b67af839680a0e2ea9eedc.tar.xz
Bug 730670: Do not redirect in buglist.cgi to improve performance
r=glob a=LpSolit
Diffstat (limited to 'template/en/default')
-rw-r--r--template/en/default/global/common-links.html.tmpl7
-rw-r--r--template/en/default/list/list.html.tmpl26
-rw-r--r--template/en/default/search/form.html.tmpl5
-rw-r--r--template/en/default/search/search-specific.html.tmpl7
4 files changed, 43 insertions, 2 deletions
diff --git a/template/en/default/global/common-links.html.tmpl b/template/en/default/global/common-links.html.tmpl
index cbfa7c77a..5af02afa6 100644
--- a/template/en/default/global/common-links.html.tmpl
+++ b/template/en/default/global/common-links.html.tmpl
@@ -21,6 +21,13 @@
onsubmit="if (this.quicksearch.value == '')
{ alert('Please enter one or more search terms first.');
return false; } return true;">
+ <input type="hidden" id="no_redirect" name="no_redirect" value="0">
+ <script type="text/javascript">
+ if (history && history.replaceState) {
+ var no_redirect = document.getElementById("no_redirect");
+ no_redirect.value = 1;
+ }
+ </script>
<input class="txt" type="text" id="quicksearch[% qs_suffix FILTER html %]" name="quicksearch"
title="Quick Search" value="[% quicksearch FILTER html %]">
<input class="btn" type="submit" value="Search"
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 #%]
diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl
index 9b212236e..4b7ac4b07 100644
--- a/template/en/default/search/form.html.tmpl
+++ b/template/en/default/search/form.html.tmpl
@@ -8,7 +8,12 @@
[% PROCESS "global/field-descs.none.tmpl" %]
+<input type="hidden" id="no_redirect" name="no_redirect" value="0">
<script type="text/javascript">
+ if (history && history.replaceState) {
+ var no_redirect = document.getElementById("no_redirect");
+ no_redirect.value = 1;
+ }
// Hide the Advanced Fields by default, unless the user has a cookie
// that specifies otherwise.
diff --git a/template/en/default/search/search-specific.html.tmpl b/template/en/default/search/search-specific.html.tmpl
index ae6fa5e4b..1093f70bc 100644
--- a/template/en/default/search/search-specific.html.tmpl
+++ b/template/en/default/search/search-specific.html.tmpl
@@ -28,6 +28,13 @@ for "crash secure SSL flash".
<form name="queryform" method="get" action="buglist.cgi">
<input type="hidden" name="query_format" value="specific">
<input type="hidden" name="order" value="relevance desc">
+<input type="hidden" id="no_redirect" name="no_redirect" value="0">
+<script type="text/javascript">
+ if (history && history.replaceState) {
+ var no_redirect = document.getElementById("no_redirect");
+ no_redirect.value = 1;
+ }
+</script>
<table summary="Search fields" class="bz_simple_search_form">
<tr>