From: Calin Crisan Date: Sat, 16 Nov 2013 18:11:58 +0000 (+0200) Subject: update mechanism improvements X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=31ec9a18d7d69788315c3d1e3043eff0b6faee53;p=motioneye-debian update mechanism improvements --- diff --git a/doc/todo.txt b/doc/todo.txt index 34719ed..d81fb15 100644 --- a/doc/todo.txt +++ b/doc/todo.txt @@ -5,7 +5,6 @@ -> style scroll bars -> hint text next to section titles -> clickable hints --> update mechanism should not say "ok" until the server reloads -> implement working schedule (add another combo deciding what to do during working schedule) -> implement notifications diff --git a/src/update.py b/src/update.py index 9d74aa9..18d2564 100644 --- a/src/update.py +++ b/src/update.py @@ -193,4 +193,4 @@ def perform_update(version): except Exception as e: logging.error('could not perform update: %(msg)s' % {'msg': unicode(e)}) - return False + return False \ No newline at end of file diff --git a/static/js/main.js b/static/js/main.js index c34c372..4088ae6 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -848,9 +848,11 @@ function doUpdate() { showModalDialog(''); ajax('POST', '/update/?version=' + data.update_version, null, function (result) { if (result) { - runAlertDialog('motionEye was successfully updated!', function () { - window.location.reload(true); - }); + setTimeout(function () { + runAlertDialog('motionEye was successfully updated!', function () { + window.location.reload(true); + }); + }, 2000); } else { runAlertDialog('Update failed!', function () { @@ -858,6 +860,8 @@ function doUpdate() { }); } }); + + return false; /* prevents hiding the modal container */ }); } }); @@ -1828,3 +1832,4 @@ $(document).ready(function () { fetchCurrentConfig(); refreshCameraFrames(); }); +