From 703a75b4b029169778b60420714ef1fcb5f33888 Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 25 Oct 2019 13:48:37 -0500 Subject: Added Menu Order ID to dropdown menu sort logic and fixed issue that caused Safari sort order to be reversed --- wqflask/wqflask/api/gen_menu.py | 2 +- wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/api/gen_menu.py b/wqflask/wqflask/api/gen_menu.py index 1b2818ca..455cf15a 100644 --- a/wqflask/wqflask/api/gen_menu.py +++ b/wqflask/wqflask/api/gen_menu.py @@ -76,7 +76,7 @@ def get_groups(species): WHERE Species.Name = '{}' AND InbredSet.SpeciesId = Species.Id GROUP by InbredSet.Name - ORDER BY IFNULL(InbredSet.Family, InbredSet.FullName) ASC, InbredSet.FullName ASC""".format(species_name)).fetchall() + ORDER BY IFNULL(InbredSet.Family, InbredSet.FullName) ASC, InbredSet.FullName ASC, InbredSet.MenuOrderId ASC""".format(species_name)).fetchall() for result in results: family_name = "Family:" + str(result[2]) 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 93964916..b5553500 100644 --- a/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js +++ b/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js @@ -74,7 +74,6 @@ redo_dropdown = function(dropdown, items) { } } - group_family_list.sort(function(a, b){return a[3] > b[3]}) current_family = "" this_opt_group = null for (_i = 0, _len = group_family_list.length; _i < _len; _i++) { -- cgit v1.2.3