summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-08-22 13:53:20 +0200
committerGitHub <noreply@github.com>2017-08-22 13:53:20 +0200
commite48411401d32c7c5a50f6fdfa9b4ab4369142448 (patch)
tree43108b8a1d7cf41500490c6ce8dc4c84d6561e67
parent293b657da11e7197e90f260dc3e0c118cba126dd (diff)
downloadbugzilla-e48411401d32c7c5a50f6fdfa9b4ab4369142448.tar.gz
bugzilla-e48411401d32c7c5a50f6fdfa9b4ab4369142448.tar.xz
Revert "Bug 1390225 - Make general/untriaged component as default, if available"
-rw-r--r--extensions/BugModal/web/new_bug.css9
-rw-r--r--extensions/BugModal/web/new_bug.js30
-rw-r--r--template/en/default/bug/new_bug.html.tmpl5
3 files changed, 7 insertions, 37 deletions
diff --git a/extensions/BugModal/web/new_bug.css b/extensions/BugModal/web/new_bug.css
index 9264d9b38..8a161bb9a 100644
--- a/extensions/BugModal/web/new_bug.css
+++ b/extensions/BugModal/web/new_bug.css
@@ -49,12 +49,3 @@
.file-container {
padding: 8px;
}
-
-#comp_change {
- float: right;
- display: none;
-}
-
-#component_wrap {
- display: inline-block;
-}
diff --git a/extensions/BugModal/web/new_bug.js b/extensions/BugModal/web/new_bug.js
index f3551f5c8..7298b1d20 100644
--- a/extensions/BugModal/web/new_bug.js
+++ b/extensions/BugModal/web/new_bug.js
@@ -13,32 +13,22 @@ var component_load = function(product) {
$('#product-throbber').hide();
$('#component').attr('disabled', false);
$('#comp_desc').text('Select a component to read its description.');
- var selectize = $("#version")[0].selectize;
+ var selectize = $("#component")[0].selectize;
selectize.clear();
selectize.clearOptions();
selectize.load(function(callback) {
- callback(data.versions);
+ callback(data.components)
});
- selectize = $("#component")[0].selectize;
+ for (var i in data.components)
+ comp_desc[data.components[i]["name"]] = data.components[i]["description"];
+
+ selectize = $("#version")[0].selectize;
selectize.clear();
selectize.clearOptions();
selectize.load(function(callback) {
- callback(data.components)
+ callback(data.versions);
});
- selectize.enable();
- $('#comp_change').css('display', 'none');
-
- for (component in data.components) {
- if (data.components[component].name.toLowerCase() === "untriaged" || data.components[component].name.toLowerCase() === "general") {
- selectize.setValue(data.components[component].name, false);
- selectize.disable();
- $('#comp_change').css('display', 'inline-block');
- }
- }
-
- for (var i in data.components)
- comp_desc[data.components[i]["name"]] = data.components[i]["description"];
},
function() {
alert("Network issues. Please refresh the page and try again");
@@ -116,12 +106,6 @@ $(document).ready(function() {
component_load($("#product").val());
});
- $('#comp_change').on("click", function () {
- selectize = $("#component")[0].selectize;
- selectize.enable();
- $('#comp_change').css('display', 'none');
- })
-
component_sel.on("change", function () {
var selectize = $("#component")[0].selectize;
$('#comp_desc').text(comp_desc[selectize.getValue()]);
diff --git a/template/en/default/bug/new_bug.html.tmpl b/template/en/default/bug/new_bug.html.tmpl
index 631b9e6d5..bed0c5578 100644
--- a/template/en/default/bug/new_bug.html.tmpl
+++ b/template/en/default/bug/new_bug.html.tmpl
@@ -122,7 +122,6 @@
[% END %]
[%# component %]
- <div id="component_wrap" style="display:inline-block">
[% WRAPPER bug_modal/field.html.tmpl
field = bug_fields.component
field_type = constants.FIELD_TYPE_SINGLE_SELECT
@@ -145,10 +144,6 @@
</div>
</span>
[% END %]
- </div>
- <div id="comp_change">
- <sup><a>Change</a></sup>
- </div>
[% INCLUDE bug_modal/field.html.tmpl
field = bug_fields.version