aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jsaccess/jsa/jsa.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/jsaccess/jsa/jsa.js b/jsaccess/jsa/jsa.js
index eb28a01..c2e40f2 100644
--- a/jsaccess/jsa/jsa.js
+++ b/jsaccess/jsa/jsa.js
@@ -93,8 +93,8 @@ function _dl(file, pass) {
xhr.overrideMimeType("application/base64");
},
success: function ( data ) {
- _status("Download complete, decrypting ...");
- _decrypt(data, pass, file);
+ _status("Download complete, decrypting ...",
+ function() { _decrypt(data, pass, file); });
},
error: function (xhr, opts, err) {
_status("Dowload failed (status="+xhr.status+")");
@@ -123,13 +123,19 @@ function _save(obj, name) {
}
var blob = new Blob([ia], {type:"application/octet-binary"});
saveAs(blob, name);
- _status("File \""+name+"\" is in your hands,");
- _status("Have a good day.");
+ _status("File \""+name+"\" is in your hands,<br/>Have a good day.");
}
-function _status(txt) {
+function _status(txt, run_func) {
var div = document.getElementById('status');
div.innerHTML = div.innerHTML + '<br/>' + txt;
- $('#status').hide().show();
+ jQuery.fn.redraw = function() {
+ return this.hide(0, function() {
+ $(this).show();
+ });
+ };
+ $('#status').redraw();
+ if (run_func)
+ setTimeout(run_func, 100); /* to force refresh */
}