From 751f746d817ce8059d87afbb365d3b340cad9d7c Mon Sep 17 00:00:00 2001 From: Freeyorp Date: Mon, 27 May 2013 02:54:11 +1200 Subject: Disable controls until init has finished Before, if you were quick or your connection was slow, you could select the files before mv.init registers the callback. This left things stuck, either requiring another set of files to be selected, or a refresh of the page. This closes #18. --- public/css/style.css | 8 ++++++++ public/index.html | 4 ++-- public/js/mv/main.js | 3 +++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index f0b7c02..4d7299e 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -289,3 +289,11 @@ a:hover { border-top-color: #1b435e; background: #1b435e; } + +.disabled-button, .disabled-button:hover, .disabled-button:active { + border-top: 1px solid #999; + background: #777; + text-decoration: none; + color: white; +} + diff --git a/public/index.html b/public/index.html index e3ad3c3..f51f8b7 100644 --- a/public/index.html +++ b/public/index.html @@ -76,9 +76,9 @@

You can load any number of files at once.

Please note that this is very js intensive. The tab may briefly lock up as it loads everything.

- + - or Use the most recent dataset + or Use the most recent dataset
0%
diff --git a/public/js/mv/main.js b/public/js/mv/main.js index b5a2b3a..8d7a660 100644 --- a/public/js/mv/main.js +++ b/public/js/mv/main.js @@ -31,6 +31,9 @@ var mv = function(mv) { mv.loader.setname = function(n) { name = n; }; /* Set zip.js worker path */ zip.workerScriptsPath = "/js/zip/WebContent/"; + /* Init done! Enable controls. */ + document.getElementById("input").disabled = false; + d3.select("#latest-link").attr("class", "button"); }; /* When a file has finished loading, handle it. */ function handleFile(data, name, after) { -- cgit v1.2.3-60-g2f50