From 0f0202a3aa248eb4a5d6fcaf47f8463ffe3f2f72 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 12 Jan 2016 15:25:48 +0530 Subject: [PATCH] download/install indication --- static/js/appDialog.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/static/js/appDialog.js b/static/js/appDialog.js index 2e90b8e..c679591 100644 --- a/static/js/appDialog.js +++ b/static/js/appDialog.js @@ -63,14 +63,22 @@ oml.ui.appDialog = function() { width: 128 }).bindEvent({ click: function() { + var _this = this; this.options({ disabled: true, - title: Ox._('Installing...') + title: Ox._('Downloading...') }); oml.isRelaunching = true; oml.api.restart({update: true}, function(response) { if (response.status.code == 200) { + _this.options({ + title: Ox._('Installing...') + }); setTimeout(reload, 500); + } else { + _this.options({ + title: Ox._('Download failed...') + }); } }); } @@ -178,7 +186,6 @@ oml.ui.appDialog = function() { ws.close(); }; ws.onclose = function(event) { - console.log('waiting...'); setTimeout(reload, 500); }; }