update bootstrap and add robot id tooltip

This commit is contained in:
Silver Kuusik
2018-08-17 18:34:52 +02:00
parent 0842926b35
commit a80cc89403
7 changed files with 41 additions and 16 deletions

View File

@@ -11,6 +11,12 @@ var codingEnabled = false;
var liveStreamVisible = false;
window.addEventListener('load', function() {
// Activate tooltips
$('[data-toggle="tooltip"]').tooltip({
animated: 'fade',
placement: 'bottom',
html: true
});
// Set the robot ID from the localstorage
$('#robot-id').val(getLocalStorageItem('sumorobot.robotId'));
@@ -194,8 +200,8 @@ window.addEventListener('load', function() {
// Robot GO button listener
$('.btn-robot-go').click(function() {
// Extract and validate the selected robot ID
var robotId = $('#robot-id').val().trim();
// Get and validate the selected robot ID
var robotId = $('#robot-id').val().trim().toLowerCase();
if (robotId === '' || /^([a-f0-9]{6})$/.test(robotId) == false) {
$('#robot-id, #robot-label').addClass('has-error');
return;

7
assets/js/min/bootstrap.min.js vendored Executable file

File diff suppressed because one or more lines are too long

5
assets/js/min/popper.min.js vendored Normal file

File diff suppressed because one or more lines are too long