diff --git a/frontend/images/ladebild.gif b/frontend/images/ladebild.gif deleted file mode 100644 index 2014bb8..0000000 Binary files a/frontend/images/ladebild.gif and /dev/null differ diff --git a/frontend/images/loading.gif b/frontend/images/loading.gif new file mode 100644 index 0000000..c69e937 Binary files /dev/null and b/frontend/images/loading.gif differ diff --git a/frontend/javascripts/frontend.js b/frontend/javascripts/frontend.js index 4fd02b3..4c350bb 100644 --- a/frontend/javascripts/frontend.js +++ b/frontend/javascripts/frontend.js @@ -324,7 +324,7 @@ vz.entities.each = function(cb) { */ vz.plot.data.load = function() { vz.plot.data.clear(); - $('#plot').html('
loading...
'); // TODO insert loading animation + $('#plot').html('
loading...

Loading...

'); // TODO insert loading animation vz.entities.each(function(entity, parent) { if (entity.active && entity.type != 'group') { $.getJSON(vz.options.backendUrl + '/data/' + entity.uuid + '.json', { from: Math.floor(vz.from), to: Math.ceil(vz.to), tuples: vz.options.tuples }, waitAsync(function(json) { diff --git a/frontend/javascripts/uuid.js b/frontend/javascripts/uuid.js index 63fe718..c2b11eb 100644 --- a/frontend/javascripts/uuid.js +++ b/frontend/javascripts/uuid.js @@ -71,5 +71,5 @@ vz.uuids.remove = function(uuid) { * Validate UUID */ vz.uuids.validate = function(uuid) { - return new uuid.match(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/) > 0; + return uuid.match(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/); }; \ No newline at end of file diff --git a/frontend/stylesheets/style.css b/frontend/stylesheets/style.css index 0cfab98..8622a00 100644 --- a/frontend/stylesheets/style.css +++ b/frontend/stylesheets/style.css @@ -121,6 +121,10 @@ tbody tr td { text-align: right; } -.loading { - /* TODO center */ -} \ No newline at end of file +#loading { + display: block; + margin: auto; + padding-top: 150px; + text-align: center; + color: grey; +}