aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorPjotr Prins2016-06-16 08:28:34 +0000
committerPjotr Prins2016-06-16 08:28:34 +0000
commit8a46577d245406531fe4558536130bc0c0cf9170 (patch)
tree9973834d23cbe9ed18fa679e1f8b41fa6d73da01 /wqflask
parentd8e1ea9c4e7ce39391d81f7bc5e3bf19c9ea6b8d (diff)
downloadgenenetwork2-8a46577d245406531fe4558536130bc0c0cf9170.tar.gz
Menu: indentation
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/static/new/javascript/dataset_select_menu.js41
1 files changed, 19 insertions, 22 deletions
diff --git a/wqflask/wqflask/static/new/javascript/dataset_select_menu.js b/wqflask/wqflask/static/new/javascript/dataset_select_menu.js
index 4fb9cf4b..968cda03 100644
--- a/wqflask/wqflask/static/new/javascript/dataset_select_menu.js
+++ b/wqflask/wqflask/static/new/javascript/dataset_select_menu.js
@@ -10,34 +10,31 @@ $(function() {
// success: process_json
// });
$.getJSON("http://localhost:8880/int/menu/main.json",
- function(data) {
- gndata = data;
- console.log("***** GOT DATA from GN_SERVER ****");
- console.log(gndata);
- populate_species();
- }).error(function() {
- console.log("ERROR: GN_SERVER not responding");
- alert("ERROR: GN_SERVER internal REST API is not responding");
- });
+ function(data) {
+ gndata = data;
+ console.log("***** GOT DATA from GN_SERVER ****");
+ console.log(gndata);
+ populate_species();
+ }).error(function() {
+ console.log("ERROR: GN_SERVER not responding");
+ alert("ERROR: GN_SERVER internal REST API is not responding");
+ });
- var populate_species = function() {
- var species_list = Object.keys(gndata.types).map(function(species) {
- var mitem = gndata.types[species][0]
- // console.log("Species menu:",species,mitem)
- return [species,mitem];
- });
- redo_dropdown($('#species'), species_list);
- return populate_group();
+ var populate_species = function() {
+ var species_list = Object.keys(gndata.types).map(function(species) {
+ var mitem = gndata.types[species][0]
+ // console.log("Species menu:",species,mitem)
+ return [species,mitem];
+ });
+ redo_dropdown($('#species'), species_list);
+ return populate_group();
};
window.populate_species = populate_species;
var populate_group = function() {
var species = $('#species').val();
-
- // var groups = gndata.groups[species].map(function(item) {
- var type_list = gndata.types.map(function(name) {
- console.log("Group menu:",species,gndata.types[name])
- return species.slice(1,3);
+ var groups = gndata.groups[species].map(function(item) {
+ return item.slice(1,3);
})
redo_dropdown($('#group'), groups);
return populate_type();