From 60a31dc494edf4f443da5b5218cd1d6a277f77fb Mon Sep 17 00:00:00 2001 From: Chuck Date: Wed, 26 Jun 2019 13:53:41 -0400 Subject: [PATCH] fixes --- .../components/coordinator/coordinator.html | 12 +++++----- .../components/coordinator/js/update_guis.js | 22 +++++++++++-------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/client/app/components/coordinator/coordinator.html b/client/app/components/coordinator/coordinator.html index fa0424a..f0537ad 100644 --- a/client/app/components/coordinator/coordinator.html +++ b/client/app/components/coordinator/coordinator.html @@ -327,7 +327,7 @@
-
+
@@ -337,8 +337,8 @@
- - + +
@@ -382,7 +382,7 @@
-
+
@@ -392,8 +392,8 @@
- - + +
diff --git a/client/app/components/coordinator/js/update_guis.js b/client/app/components/coordinator/js/update_guis.js index b6621c0..37cbc4e 100644 --- a/client/app/components/coordinator/js/update_guis.js +++ b/client/app/components/coordinator/js/update_guis.js @@ -74,7 +74,7 @@ setTimeout(function(){ updateRecordingsList() }, 1000); -}, 1000); +}, 10000); setTimeout(function(){ @@ -88,7 +88,7 @@ setTimeout(function(){ function displayTaggingOptions(mode) { - var modeTag = '#' + mode + 'Tag'; + var modeTag = '#' + mode + 'Tags'; var fileNameSelector = '#' + mode + 'BagFileName'; var categorySelector = '#' + mode + 'BagCategory'; var tagSelector = '#' + mode + 'BagTags'; @@ -129,8 +129,8 @@ function displayTaggingOptions(mode) { var categoryNameSelectize = $categoryNameSelect[0].selectize; categoryNameSelectize.clearOptions() - getBagCategoryList(function(result){ - categoryNameSelectize.addOption(['Production', 'Test'].map(function(bagName){ + getBagCategoryList(function(results){ + categoryNameSelectize.addOption(results.map(function(bagName){ return {name : bagName} })); }) @@ -139,7 +139,7 @@ function displayTaggingOptions(mode) { valueField: 'name', labelField: 'name', searchField: ['name'], - maxItems: 3, + maxItems: 20, options: [], create: true, placeholder : "Enter or select tags for the bag" @@ -148,17 +148,21 @@ function displayTaggingOptions(mode) { var tagSelectize = $tagSelect[0].selectize; tagSelectize.clearOptions() getBagTagList(function(results){ - tagSelectize.addOption(['single-arm', 'dual-arm', 'palpation', 'demo'].map(function(bagName){ + tagSelectize.addOption(results.map(function(bagName){ return {name : bagName} })); }) } -function hideTaggingOptions(id, updateValues=false) { +function hideTaggingOptions(mode, updateValues=false) { if(updateValues) { - //get values from the elements - updateBagMetadata(mode, bag_name, modified_bag_name, category, tags) + var modeTag = '#' + mode + 'Tags'; + var fileNameSelector = '#' + mode + 'BagFileName'; + var categorySelector = '#' + mode + 'BagCategory'; + var tagSelector = '#' + mode + 'BagTags'; + + updateBagMetadata(mode, bag_name, fileNameSelector, categorySelector, tagSelector) } //TO DO: Wait for the response from the backend before setting the display to none document.getElementById(id).setAttribute('overflow', 'hidden');