From 1d9e31c2296c7d5c0f68097a1e23f36403f209f5 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 4 May 2019 16:58:03 +1000 Subject: [PATCH] Add a spinning loading icon to modal forms --- InvenTree/static/css/inventree.css | 15 +++++++++++++++ InvenTree/static/script/inventree/modals.js | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/InvenTree/static/css/inventree.css b/InvenTree/static/css/inventree.css index 0a1c34036b..98a4e04de4 100644 --- a/InvenTree/static/css/inventree.css +++ b/InvenTree/static/css/inventree.css @@ -152,3 +152,18 @@ .part-allocation-overallocated { background: #ccf5ff; } + +.glyphicon-refresh-animate { + -animation: spin .7s infinite linear; + -webkit-animation: spin2 .7s infinite linear; +} + +@-webkit-keyframes spin2 { + from { -webkit-transform: rotate(0deg);} + to { -webkit-transform: rotate(360deg);} +} + +@keyframes spin { + from { transform: scale(1) rotate(0deg);} + to { transform: scale(1) rotate(360deg);} +} \ No newline at end of file diff --git a/InvenTree/static/script/inventree/modals.js b/InvenTree/static/script/inventree/modals.js index 73b7c99552..b331343c3e 100644 --- a/InvenTree/static/script/inventree/modals.js +++ b/InvenTree/static/script/inventree/modals.js @@ -24,7 +24,7 @@ function loadingMessageContent() { */ // TODO - This can be made a lot better - return 'Loading...'; + return " Waiting for server..."; } @@ -263,7 +263,7 @@ function openModal(options) { if (options.title) { modalSetTitle(modal, options.title); } else { - modalSetTitle(modal, 'Loading Form Data...'); + modalSetTitle(modal, 'Loading Data...'); } // Unless the content is explicitly set, display loading message