-
diff --git a/client/app/components/coordinator/js/ros_scripts.js b/client/app/components/coordinator/js/ros_scripts.js
index 519156b..5f031c9 100644
--- a/client/app/components/coordinator/js/ros_scripts.js
+++ b/client/app/components/coordinator/js/ros_scripts.js
@@ -421,7 +421,7 @@ function invokeSafetyController(event)
{
var keyID = event.keyCode;
//8 == backspace, 46 == delete
- if(keyID == 8 || keyID == 46) {
+ if(keyID == 46) {
triggerService('/aescape/safety_activate')
}
}
diff --git a/client/app/components/coordinator/js/update_guis.js b/client/app/components/coordinator/js/update_guis.js
index 37cbc4e..5ecbf66 100644
--- a/client/app/components/coordinator/js/update_guis.js
+++ b/client/app/components/coordinator/js/update_guis.js
@@ -47,36 +47,6 @@ function getBagTagList(callback)
}
-
-
-setTimeout(function(){
- var $select = $('#bagList').selectize({
- valueField: 'name',
- labelField: 'name',
- searchField: ['name'],
- options: [],
- create: false,
- placeholder : "Select bag to play"
- });
-
- function updateRecordingsList()
- {
- getBagList(function(results){
- var selectize = $select[0].selectize;
- selectize.clearOptions()
- selectize.addOption(results.map(function(bagName){
- return {name : bagName}
- }));
- })
- };
-
- window.setInterval(function(){
- updateRecordingsList()
- }, 1000);
-
-}, 10000);
-
-
setTimeout(function(){
document.querySelector('.hand-panel-right .status-bar').style.height = document.querySelector('.hand-panel-left .status-bar').offsetHeight + 20 + "px";
$(function () {
@@ -156,17 +126,23 @@ function displayTaggingOptions(mode) {
}
function hideTaggingOptions(mode, updateValues=false) {
+ var modeTag = '#' + mode + 'Tag';
+
if(updateValues) {
var modeTag = '#' + mode + 'Tags';
var fileNameSelector = '#' + mode + 'BagFileName';
var categorySelector = '#' + mode + 'BagCategory';
var tagSelector = '#' + mode + 'BagTags';
- updateBagMetadata(mode, bag_name, fileNameSelector, categorySelector, tagSelector)
+ var filename = $(fileNameSelector).val();
+ var category = $(categorySelector).val();
+ var tags = $(tagSelector).val();
+
+ updateBagMetadata(mode, bag_name, filename, category, tags)
}
//TO DO: Wait for the response from the backend before setting the display to none
- document.getElementById(id).setAttribute('overflow', 'hidden');
- document.getElementById(id).classList.remove('open');
+ document.getElementById(modeTag).setAttribute('overflow', 'hidden');
+ document.getElementById(modeTag).classList.remove('open');
}
function updateBagMetadata(mode, bag_name, modified_bag_name, category, tags) {
@@ -185,4 +161,55 @@ function updateBagMetadata(mode, bag_name, modified_bag_name, category, tags) {
})
}
+function displayLoadingOptions() {
+
+ selector = "#bagList"
+
+ document.querySelector(selector).classList.add('open');
+
+ //get bag list
+ //select last recorded bag
+ //do animation
+ var $select = $('#bagList').selectize({
+ valueField: 'filename',
+ labelField: 'filename',
+ searchField: ['filename', 'category', 'tags'],
+ options: [],
+ create: false,
+ placeholder : "Select bag to play",
+ render : {
+ item: function(item, escape) {
+ return '
' +
+ (item.filename ? '' + escape(item.filename) + '' : '') +
+ (item.category ? '' + escape(item.category) + '' : '') +
+ '
';
+ },
+ option: function(item, escape) {
+ var label = item.filename || item.category;
+ var caption = item.filename ? item.category : null;
+ return '
' +
+ '' + escape(label) + '' +
+ (caption ? '' + escape(caption) + '' : '') +
+ '
';
+ }
+ }
+ });
+
+ getBagList(function(results){
+ var selectize = $select[0].selectize;
+ selectize.clearOptions()
+ results = [{'filename' : 'hellobiathco', 'category' : 'hellobiathcat', 'tags' : ['hellobiathtag', 'hellobiatag2']}]
+ selectize.addOption(results);
+ if(results[0]) {
+ selectize.setValue(results[0].filename);
+ }
+ })
+}
+
+function hideLoadingOptions() {
+ var selector = '#bagList';
+
+ document.getElementById(selector).setAttribute('overflow', 'hidden');
+ document.getElementById(selector).classList.remove('open');
+}
diff --git a/client/app/main.css b/client/app/main.css
index bec11d3..8bb2d5a 100644
--- a/client/app/main.css
+++ b/client/app/main.css
@@ -402,11 +402,14 @@ html, body {
}
- .tagging-options {
+ .tagging-options, .loading-options {
height: 0;
overflow: hidden;
transition: height 600ms ease 0ms;
}
.tagging-options.open {
height: 122px;
+ }
+ .loading-options.open {
+ height: 85px;
}
\ No newline at end of file