From 2b88ae92c4970f0ff5cccb5b607902f8752590c2 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Thu, 21 Mar 2013 17:25:53 -0400 Subject: Bug 849905 - bug filing links in my dashboard should be able to be opened in new tabs/windows r=glob --- .../template/en/default/pages/prodcompsearch.html.tmpl | 1 + .../template/en/default/prodcompsearch/form.html.tmpl | 15 +++++++++++++++ extensions/ProdCompSearch/web/js/prod_comp_search.js | 17 +++++++++++++++-- 3 files changed, 31 insertions(+), 2 deletions(-) (limited to 'extensions/ProdCompSearch') diff --git a/extensions/ProdCompSearch/template/en/default/pages/prodcompsearch.html.tmpl b/extensions/ProdCompSearch/template/en/default/pages/prodcompsearch.html.tmpl index 533ade888..649a205db 100644 --- a/extensions/ProdCompSearch/template/en/default/pages/prodcompsearch.html.tmpl +++ b/extensions/ProdCompSearch/template/en/default/pages/prodcompsearch.html.tmpl @@ -17,6 +17,7 @@
[% PROCESS prodcompsearch/form.html.tmpl query_header = "File a $terms.Bug:" + script_name = "enter_bug.cgi" %]
diff --git a/extensions/ProdCompSearch/template/en/default/prodcompsearch/form.html.tmpl b/extensions/ProdCompSearch/template/en/default/prodcompsearch/form.html.tmpl index 9d75f66f1..8d4f46e07 100644 --- a/extensions/ProdCompSearch/template/en/default/prodcompsearch/form.html.tmpl +++ b/extensions/ProdCompSearch/template/en/default/prodcompsearch/form.html.tmpl @@ -6,6 +6,21 @@ # defined by the Mozilla Public License, v. 2.0. #%] + +
[% input_label FILTER none %]  diff --git a/extensions/ProdCompSearch/web/js/prod_comp_search.js b/extensions/ProdCompSearch/web/js/prod_comp_search.js index bc0f41a2b..7cb1ec73b 100644 --- a/extensions/ProdCompSearch/web/js/prod_comp_search.js +++ b/extensions/ProdCompSearch/web/js/prod_comp_search.js @@ -11,7 +11,8 @@ var ProdCompSearch = { script_name: 'enter_bug.cgi', script_choices: ['enter_bug.cgi', 'describecomponents.cgi'], format: null, - cloned_bug_id: null + cloned_bug_id: null, + new_tab: null }; YUI({ @@ -100,7 +101,19 @@ YUI({ if (ProdCompSearch.script_name == 'describecomponents.cgi') { url += "#" + encodeURIComponent(data.component); } - window.location.href = url; + if (ProdCompSearch.new_tab) { + window.open(url, '_blank'); + } + else { + window.location.href = url; + } + } + }, + after: { + select: function(e) { + if (ProdCompSearch.new_tab) { + input.set('value',''); + } } } }); -- cgit v1.2.3-24-g4f1b