aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2019-10-25 15:02:10 -0500
committerzsloan2019-10-25 15:02:10 -0500
commitb8f4ab7358fbc504cec50a71fd0223afde9229ee (patch)
treecc8b9adcf2b7f944ce6fbae33a1984c5b4aaf422 /wqflask
parent79746271681c330148838c8fd2453076a2458e4f (diff)
downloadgenenetwork2-b8f4ab7358fbc504cec50a71fd0223afde9229ee.tar.gz
Fixed issue that caused some items to not appear in dropdown
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js b/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js
index d5e3f9d6..b3af016c 100644
--- a/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js
+++ b/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js
@@ -67,26 +67,27 @@ redo_dropdown = function(dropdown, items) {
for (_i = 0, _len = items.length; _i < _len; _i++) {
item = items[_i];
group_family = item[2].toString().split(":")[1]
- if (group_family != "None"){
- group_family_list.push([item[0], item[1], group_family, group_family])
- } else {
- group_family_list.push([item[0], item[1], group_family, item[1]])
- }
+ group_family_list.push([item[0], item[1], group_family])
}
current_family = ""
this_opt_group = null
for (_i = 0, _len = group_family_list.length; _i < _len; _i++) {
item = group_family_list[_i];
+ console.log("THE ITEM:", item)
if (item[2] != "None" && current_family == ""){
current_family = item[2]
this_opt_group = $("<optgroup label=\"" + item[2] + "\">")
} else if (current_family != "" && item[2] == current_family){
this_opt_group.append($("<option />").val(item[0]).text(item[1]));
- } else if (current_family != "" && item[2] != "None"){
+ } else if (current_family != "" && item[2] != current_family && item[2] != "None"){
current_family = item[2]
_results.push(dropdown.append(this_opt_group))
- this_opt_group = $("<optgroup label=\"" + item[2] + "\">")
+ this_opt_group = $("<optgroup label=\"" + current_family + "\">")
+ } else if (current_family != "" && this_opt_group != null && item[2] == "None"){
+ _results.push(dropdown.append(this_opt_group))
+ current_family = ""
+ _results.push(dropdown.append($("<option />").val(item[0]).text(item[1])));
} else {
_results.push(dropdown.append($("<option />").val(item[0]).text(item[1])));
}