aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorPjotr Prins2016-06-14 10:55:28 +0000
committerPjotr Prins2016-06-14 10:55:28 +0000
commit8a3cd1d9c2908a60de521424622dfae04ba7c297 (patch)
treed183b14c548de527c2671cbd4dc4efd6eb0c72f1 /wqflask
parent312f051074a8509ba85b6961fe1f04d4111a7288 (diff)
downloadgenenetwork2-8a3cd1d9c2908a60de521424622dfae04ba7c297.tar.gz
Menu: fetch species from gn_server
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/static/new/javascript/dataset_select_menu.js21
1 files changed, 18 insertions, 3 deletions
diff --git a/wqflask/wqflask/static/new/javascript/dataset_select_menu.js b/wqflask/wqflask/static/new/javascript/dataset_select_menu.js
index 1fe4cf75..473e920e 100644
--- a/wqflask/wqflask/static/new/javascript/dataset_select_menu.js
+++ b/wqflask/wqflask/static/new/javascript/dataset_select_menu.js
@@ -10,10 +10,25 @@ $(function() {
dataType: 'json',
success: process_json
});
+ $.getJSON("http://localhost:8880/int/menu/species",
+ function(data) {
+ console.log("***** GOT DATA from GN_SERVER ****");
+ console.log(data[0]);
+ var species = data.map(function(item) {
+ console.log(item)
+ menu = [item[1],item[2]]
+ console.log(menu)
+ return menu;
+ });
+
+ console.log(species);
+ redo_dropdown($('#species'), species);
+ });
+
populate_species = function() {
- var species_list;
- species_list = this.jdata.species;
- redo_dropdown($('#species'), species_list);
+ // var species_list;
+ // species_list = this.jdata.species;
+ // redo_dropdown($('#species'), species_list);
return populate_group();
};
window.populate_species = populate_species;