added loading animation
fixed bug in uuid validation
This commit is contained in:
parent
5f20335a4d
commit
f2781b2fb5
5 changed files with 9 additions and 5 deletions
Binary file not shown.
Before Width: | Height: | Size: 4.9 KiB |
BIN
frontend/images/loading.gif
Normal file
BIN
frontend/images/loading.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
|
@ -324,7 +324,7 @@ vz.entities.each = function(cb) {
|
|||
*/
|
||||
vz.plot.data.load = function() {
|
||||
vz.plot.data.clear();
|
||||
$('#plot').html('<div id="loading">loading...</div>'); // TODO insert loading animation
|
||||
$('#plot').html('<div id="loading"><img src="images/loading.gif" alt="loading..." /><p>Loading...</p></div>'); // 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) {
|
||||
|
|
|
@ -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}$/);
|
||||
};
|
|
@ -121,6 +121,10 @@ tbody tr td {
|
|||
text-align: right;
|
||||
}
|
||||
|
||||
.loading {
|
||||
/* TODO center */
|
||||
}
|
||||
#loading {
|
||||
display: block;
|
||||
margin: auto;
|
||||
padding-top: 150px;
|
||||
text-align: center;
|
||||
color: grey;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue