aboutsummaryrefslogtreecommitdiff
path: root/src/shell.html
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-08-09 17:32:10 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-08-09 17:32:10 -0700
commit609fa655772655c6376fb7eff8860a9b3c83c6e9 (patch)
tree59786dca64db970cc2aee9e1f3107feac78ba98d /src/shell.html
parent91a6f5cdabad809c94c52ccc2f0eac518ac65679 (diff)
show progress on datafile download
Diffstat (limited to 'src/shell.html')
-rw-r--r--src/shell.html46
1 files changed, 17 insertions, 29 deletions
diff --git a/src/shell.html b/src/shell.html
index 683b1b68..3a0171de 100644
--- a/src/shell.html
+++ b/src/shell.html
@@ -49,35 +49,23 @@
}
},
canvas: document.getElementById('canvas'),
- setStatus: function(text) {
- if (Module.setStatus.interval) clearInterval(Module.setStatus.interval);
- var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
- var statusElement = document.getElementById('status');
- var progressElement = document.getElementById('progress');
- if (m) {
- text = m[1];
- progressElement.value = parseInt(m[2])*100;
- progressElement.max = parseInt(m[4])*100;
- progressElement.hidden = false;
- } else {
- progressElement.value = null;
- progressElement.max = null;
- progressElement.hidden = true;
- }
- statusElement.innerHTML = text;
- if (text) {
- var counter = 0;
- Module.setStatus.interval = setInterval(function() {
- counter++;
- counter %= 3;
- var dots = ' ';
- for (var i = 0; i < counter; i++) dots += '.';
- dots += '*';
- for (var i = counter; i < 2; i++) dots += '.';
- statusElement.innerHTML = text.replace('...', dots);
- }, 300);
- }
- },
+ setStatus: function(text) {
+ if (Module.setStatus.interval) clearInterval(Module.setStatus.interval);
+ var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
+ var statusElement = document.getElementById('status');
+ var progressElement = document.getElementById('progress');
+ if (m) {
+ text = m[1];
+ progressElement.value = parseInt(m[2])*100;
+ progressElement.max = parseInt(m[4])*100;
+ progressElement.hidden = false;
+ } else {
+ progressElement.value = null;
+ progressElement.max = null;
+ progressElement.hidden = true;
+ }
+ statusElement.innerHTML = text;
+ },
totalDependencies: 0,
monitorRunDependencies: function(left) {
this.totalDependencies = Math.max(this.totalDependencies, left);