summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-06-25 14:05:28 +0200
committerDave Lawrence <dlawrence@mozilla.com>2012-06-25 14:05:28 +0200
commitc696b87beabb93c1d929410b6a51d097aa76c812 (patch)
treefabfb517032b9e6e299424680902fa6323fb6179
parentcf8110a0f153cd482a937afa47adc49f7f9fef71 (diff)
downloadbugzilla-c696b87beabb93c1d929410b6a51d097aa76c812.tar.gz
bugzilla-c696b87beabb93c1d929410b6a51d097aa76c812.tar.xz
Bug 766908 - Show the "fileit" textfield when creating a bug in the full chooser with all product
r=glob
-rw-r--r--extensions/BMO/template/en/default/global/choose-product.html.tmpl37
-rw-r--r--extensions/BMO/template/en/default/global/prod-comp-search.html.tmpl27
-rw-r--r--extensions/BMO/web/js/prod_comp_search.js (renamed from extensions/BMO/web/js/choose_product.js)0
-rw-r--r--extensions/BMO/web/styles/choose_product.css20
-rw-r--r--extensions/BMO/web/styles/prod_comp_search.css22
-rw-r--r--extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl2
6 files changed, 66 insertions, 42 deletions
diff --git a/extensions/BMO/template/en/default/global/choose-product.html.tmpl b/extensions/BMO/template/en/default/global/choose-product.html.tmpl
index 9dd2787c3..c72d72229 100644
--- a/extensions/BMO/template/en/default/global/choose-product.html.tmpl
+++ b/extensions/BMO/template/en/default/global/choose-product.html.tmpl
@@ -29,20 +29,21 @@
[% PROCESS global/variables.none.tmpl %]
+[% style_urls = [ "extensions/BMO/web/styles/choose_product.css" ] %]
+
[% IF target == "enter_bug.cgi" %]
[% title = "Enter $terms.Bug" %]
[% h2 = BLOCK %]First, you must pick a product on which to enter [% terms.abug %]. [% END %]
[% yui = [ 'autocomplete' ] %]
[% javascript_urls = [ "js/field.js", "js/create_bug.js",
- "extensions/BMO/web/js/choose_product.js" ] %]
+ "extensions/BMO/web/js/prod_comp_search.js" ] %]
[% onload = "YAHOO.util.Dom.get('prod_comp_search').focus();" %]
+ [% style_urls.push("extensions/BMO/web/styles/prod_comp_search.css") %]
[% ELSIF target == "describecomponents.cgi" %]
[% title = "Browse" %]
[% h2 = "Please specify the product whose components you want described." %]
[% END %]
-[% style_urls = [ "extensions/BMO/web/styles/choose_product.css" ] %]
-
[% DEFAULT title = "Choose a Product" %]
[% PROCESS global/header.html.tmpl %]
@@ -64,27 +65,10 @@
[% IF target == 'enter_bug.cgi' %]
<h2>Which product is affected by the problem you would like to report?</h2>
-<div id="prod_comp_search_main">
- <div id="prod_comp_search_autocomplete">
- <div id="prod_comp_search_label">
- Type to find product and component by name or description:
- <img id="prod_comp_throbber" src="extensions/BMO/web/images/throbber.gif"
- class="hidden" width="16" height="11">
- </div>
- <input id="prod_comp_search" type="text" size="60">
- <div id="prod_comp_search_autocomplete_container"></div>
- </div>
-</div>
-<script type="text/javascript">
- if(typeof(YAHOO.bugzilla.prodCompSearch) !== 'undefined'
- && YAHOO.bugzilla.prodCompSearch != null)
- {
- YAHOO.bugzilla.prodCompSearch.init(
- "prod_comp_search", "prod_comp_search_autocomplete_container", "[% format FILTER js %]");
- }
-</script>
-
+[% PROCESS "global/prod-comp-search.html.tmpl" %]
<h2>or choose from the following selections</h2>
+[% ELSE %]
+<h2>[% h2 FILTER html %]</h2>
[% END %]
<table align="center" border="0" width="600" cellpadding="5" cellspacing="0">
@@ -144,7 +128,14 @@
</tr>
</table>
[% ELSE %]
+
+[% IF target == 'enter_bug.cgi' %]
+<h2>Which product is affected by the problem you would like to report?</h2>
+[% PROCESS "global/prod-comp-search.html.tmpl" %]
+<h2>or choose from the following selections</h2>
+[% ELSE %]
<h2>[% h2 FILTER html %]</h2>
+[% END %]
<table>
diff --git a/extensions/BMO/template/en/default/global/prod-comp-search.html.tmpl b/extensions/BMO/template/en/default/global/prod-comp-search.html.tmpl
new file mode 100644
index 000000000..8c120e9af
--- /dev/null
+++ b/extensions/BMO/template/en/default/global/prod-comp-search.html.tmpl
@@ -0,0 +1,27 @@
+[%# This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ #
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
+ # defined by the Mozilla Public License, v. 2.0.
+ #%]
+
+<div id="prod_comp_search_main">
+ <div id="prod_comp_search_autocomplete">
+ <div id="prod_comp_search_label">
+ Type to find product and component by name or description:
+ <img id="prod_comp_throbber" src="extensions/BMO/web/images/throbber.gif"
+ class="hidden" width="16" height="11">
+ </div>
+ <input id="prod_comp_search" type="text" size="60">
+ <div id="prod_comp_search_autocomplete_container"></div>
+ </div>
+</div>
+<script type="text/javascript">
+ if(typeof(YAHOO.bugzilla.prodCompSearch) !== 'undefined'
+ && YAHOO.bugzilla.prodCompSearch != null)
+ {
+ YAHOO.bugzilla.prodCompSearch.init(
+ "prod_comp_search", "prod_comp_search_autocomplete_container", "[% format FILTER js %]");
+ }
+</script>
diff --git a/extensions/BMO/web/js/choose_product.js b/extensions/BMO/web/js/prod_comp_search.js
index 31d3ee224..31d3ee224 100644
--- a/extensions/BMO/web/js/choose_product.js
+++ b/extensions/BMO/web/js/prod_comp_search.js
diff --git a/extensions/BMO/web/styles/choose_product.css b/extensions/BMO/web/styles/choose_product.css
index 06ff0f85c..053af542f 100644
--- a/extensions/BMO/web/styles/choose_product.css
+++ b/extensions/BMO/web/styles/choose_product.css
@@ -5,28 +5,12 @@
* This Source Code Form is "Incompatible With Secondary Licenses", as
* defined by the Mozilla Public License, v. 2.0. */
-#choose_product h2,
+#choose_product h2,
#choose_product p {
text-align: center;
}
-#choose_product td h2,
+#choose_product td h2,
#choose_product td p {
text-align: left;
}
-
-#prod_comp_search_main {
- width: 400px;
- margin-right: auto;
- margin-left: auto;
-}
-
-#prod_comp_search_main .hidden {
- display: none;
-}
-
-#prod_comp_search_main li.yui-ac-highlight a {
- text-decoration: none;
- color: #FFFFFF;
- display: block;
-}
diff --git a/extensions/BMO/web/styles/prod_comp_search.css b/extensions/BMO/web/styles/prod_comp_search.css
new file mode 100644
index 000000000..24c0a2cf8
--- /dev/null
+++ b/extensions/BMO/web/styles/prod_comp_search.css
@@ -0,0 +1,22 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This Source Code Form is "Incompatible With Secondary Licenses", as
+ * defined by the Mozilla Public License, v. 2.0. */
+
+#prod_comp_search_main {
+ width: 400px;
+ margin-right: auto;
+ margin-left: auto;
+}
+
+#prod_comp_search_main .hidden {
+ display: none;
+}
+
+#prod_comp_search_main li.yui-ac-highlight a {
+ text-decoration: none;
+ color: #FFFFFF;
+ display: block;
+}
diff --git a/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl b/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl
index fc0a1321e..ee5bea892 100644
--- a/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl
+++ b/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl
@@ -10,7 +10,7 @@
[% js_urls = [ 'extensions/GuidedBugEntry/web/js/products.js',
'extensions/GuidedBugEntry/web/js/guided.js',
'js/field.js', 'js/TUI.js', 'js/bug.js' ] %]
-[% js_urls.push('extensions/BMO/web/js/choose_product.js') IF BMO %]
+[% js_urls.push('extensions/BMO/web/js/prod_comp_search.js') IF BMO %]
[% yui_modules = [ 'history', 'datatable', 'container' ] %]
[% yui_modules.push('autocomplete') IF BMO %]