From 45f4979819d2d5deb8550959c69954579fee42c7 Mon Sep 17 00:00:00 2001 From: Jason Calabrese Date: Sun, 15 Mar 2015 02:40:47 -0700 Subject: [PATCH] prevent some flashing while data loads --- static/css/main.css | 9 +++++++++ static/index.html | 2 +- static/js/client.js | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/static/css/main.css b/static/css/main.css index bec90f9fcdf..fe2606b2637 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -118,6 +118,11 @@ span.pill label { font-size: 20px; line-height: 30px; } + +.loading #lastEntry { + display: none; +} + #lastEntry { background: #808080; border-color: #808080; @@ -249,6 +254,10 @@ div.tooltip { display: none; } +.loading .focus-range { + display: none; +} + .focus-range { list-style: none; margin: 4px; diff --git a/static/index.html b/static/index.html index e9cce740f68..5fab9d6b180 100644 --- a/static/index.html +++ b/static/index.html @@ -24,7 +24,7 @@

Nightscout

-
+
diff --git a/static/js/client.js b/static/js/client.js index 39a970b84d8..492225f2ea7 100644 --- a/static/js/client.js +++ b/static/js/client.js @@ -973,6 +973,10 @@ var app = {}, browserSettings = {}, browserStorage = $.localStorage; // update x axis domain context.select('.x') .call(xAxis2); + + if (init) { + $('.container').removeClass('loading'); + } } function sgvToColor(sgv) {