diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2013-03-21 22:25:53 +0100 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2013-03-21 22:25:53 +0100 |
commit | 2b88ae92c4970f0ff5cccb5b607902f8752590c2 (patch) | |
tree | 5f2586b20f4ca9311877e93c227b23cb6b525a34 /extensions/ProdCompSearch/web | |
parent | 897f58ced15e63ca63e870a40991eaf97de84f2f (diff) | |
download | bugzilla-2b88ae92c4970f0ff5cccb5b607902f8752590c2.tar.gz bugzilla-2b88ae92c4970f0ff5cccb5b607902f8752590c2.tar.xz |
Bug 849905 - bug filing links in my dashboard should be able to be opened in new tabs/windows
r=glob
Diffstat (limited to 'extensions/ProdCompSearch/web')
-rw-r--r-- | extensions/ProdCompSearch/web/js/prod_comp_search.js | 17 |
1 files changed, 15 insertions, 2 deletions
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',''); + } } } }); |