From e4f936e9732f5ad2e99553425d8c5c9222e486f2 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 16 Nov 2015 14:04:27 +1300 Subject: Add loading spinner to the webpage --- web/app.css | 38 +++++++++++++++++++++++++++++++++++++- web/app/controller/Root.js | 1 + web/debug.html | 7 ++++--- web/release.html | 7 ++++--- 4 files changed, 46 insertions(+), 7 deletions(-) diff --git a/web/app.css b/web/app.css index 897fd0cbc..3c4507e38 100644 --- a/web/app.css +++ b/web/app.css @@ -12,8 +12,44 @@ } #attribution { - position: fixed; + position: absolute; bottom: 10px; right: 15px; font-size: x-small; } + +#spinner { + position: absolute; + top: 50%; + left: 50%; + height: 60px; + width: 60px; + margin-top: -30px; + margin-left: -30px; + -webkit-animation: rotation .8s infinite linear; + -moz-animation: rotation .8s infinite linear; + -o-animation: rotation .8s infinite linear; + animation: rotation .8s infinite linear; + border-left: 6px solid rgba(56, 146, 212, .15); + border-right: 6px solid rgba(56, 146, 212, .15); + border-bottom: 6px solid rgba(56, 146, 212, .15); + border-top: 6px solid rgba(56, 146, 212, .8); + border-radius: 100%; +} + +@-webkit-keyframes rotation { + from { -webkit-transform: rotate(0deg); } + to { -webkit-transform: rotate(359deg); } +} +@-moz-keyframes rotation { + from { -moz-transform: rotate(0deg); } + to { -moz-transform: rotate(359deg); } +} +@-o-keyframes rotation { + from { -o-transform: rotate(0deg); } + to { -o-transform: rotate(359deg); } +} +@keyframes rotation { + from { transform: rotate(0deg); } + to { transform: rotate(359deg); } +} diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js index b260cb8a1..041e0b902 100644 --- a/web/app/controller/Root.js +++ b/web/app/controller/Root.js @@ -40,6 +40,7 @@ Ext.define('Traccar.controller.Root', { onServerReturn: function (options, success, response) { var result; + Ext.get('spinner').remove(); if (Traccar.ErrorManager.check(success, response)) { result = Ext.decode(response.responseText); if (result.success) { diff --git a/web/debug.html b/web/debug.html index de63d32a2..c4340af97 100644 --- a/web/debug.html +++ b/web/debug.html @@ -8,14 +8,15 @@ + + +
+
Powered by Traccar GPS Tracking System
- - -
Powered by Traccar GPS Tracking System
diff --git a/web/release.html b/web/release.html index 27200b142..100849130 100644 --- a/web/release.html +++ b/web/release.html @@ -8,6 +8,10 @@ + + +
+
Powered by Traccar GPS Tracking System
@@ -16,8 +20,5 @@ - - -
Powered by Traccar GPS Tracking System
-- cgit v1.2.3