]> www.vanbest.org Git - motioneye-debian/commitdiff
update mechanism improvements
authorCalin Crisan <ccrisan@gmail.com>
Sat, 16 Nov 2013 18:11:58 +0000 (20:11 +0200)
committerCalin Crisan <ccrisan@gmail.com>
Sat, 16 Nov 2013 18:11:58 +0000 (20:11 +0200)
doc/todo.txt
src/update.py
static/js/main.js

index 34719ed47e9c2d845b3d429abc5dea97f2b01d0a..d81fb15c502c72f2480047ce3cf576ca323ea291 100644 (file)
@@ -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
index 9d74aa97acdcf8cbd0e0c9b3a99b399d7d208b0a..18d2564c4f50874ffc0e8f2435ae1080944c3949 100644 (file)
@@ -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
index c34c3720be8fbbb013868097da0e89b8195cb86d..4088ae6ec029b3a247f624524c8b8e6d1021f1bb 100644 (file)
@@ -848,9 +848,11 @@ function doUpdate() {
                 showModalDialog('<div class="modal-progress"></div>');
                 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();
 });
+