]> www.vanbest.org Git - motioneye-debian/commitdiff
applying settings improvements and fixes
authorCalin Crisan <ccrisan@gmail.com>
Sat, 18 Jan 2014 17:09:37 +0000 (19:09 +0200)
committerCalin Crisan <ccrisan@gmail.com>
Sat, 18 Jan 2014 17:09:37 +0000 (19:09 +0200)
src/handlers.py
static/css/main.css
static/js/main.js

index 91b7dfe746dea3519e74be91d5c424dfb1f37177..f107628e21f40781111ef2ad23058c861cda5d15 100644 (file)
@@ -286,6 +286,7 @@ class ConfigHandler(BaseHandler):
                 for key, cfg in ui_config.items():
                     if key == 'main':
                         reload = set_main_config(cfg) or reload
+                        check_finished(None, reload)
                         
                     else:
                         set_camera_config(int(key), cfg, check_finished)
index 467dfd89492eb06e7800ebaa4dbf1cd358ede0c0..158ed190f20a1a6fa4f8d279b4d940546850795f 100644 (file)
@@ -716,10 +716,19 @@ div.camera-progress {
     cursor: pointer;
 }
 
+div.camera-progress.visible {
+    opacity: 0.4;
+}
+
 img.camera-progress {
-    margin-top: 20%;
     border: 10px solid white;
     border-radius: 10px;
+    position: absolute;
+    top: 0px;
+    left: 0px;
+    bottom: 0px;
+    right: 0px;
+    margin: auto;
 }
 
 
index 0a63be298f1d7a5df3c2f529d771e5c1c6d97578..77aea0cbb67b17c15072d8719cc4574702a4562d 100644 (file)
@@ -251,7 +251,7 @@ function initUI() {
             updateConfigUi();
         }
         else {
-            beginProgress();
+            beginProgress([$(this).val()]);
             fetchCurrentCameraConfig(endProgress);
         }
     });
@@ -752,11 +752,11 @@ function beginProgress(cameraIds) {
     /* show the camera progress indicators */
     if (cameraIds) {
         cameraIds.forEach(function (cameraId) {
-            $('div.camera-frame#camera' + cameraId + ' div.camera-progress').css('opacity', '0.5');
+            $('div.camera-frame#camera' + cameraId + ' div.camera-progress').addClass('visible');
         });
     }
     else {
-        $('div.camera-progress').css('opacity', '0.5');
+        $('div.camera-progress').addClass('visible');
     }
     
     /* remove the settings progress lock */
@@ -785,7 +785,7 @@ function endProgress() {
     $('div.settings-progress').css('opacity', '0');
     
     /* hide the camera progress indicator */
-    $('div.camera-progress').css('opacity', '0');
+    $('div.camera-progress').removeClass('visible');
 
     setTimeout(function () {
         $('div.settings-progress').css('width', '0px');
@@ -884,7 +884,7 @@ function doApply() {
         pushConfigs = {};
         endProgress();
         
-        recreateCameraFrames();
+        //recreateCameraFrames();
     });
 }
 
@@ -1730,10 +1730,8 @@ function addCameraFrameUi(cameraConfig, framerate) {
         doFullScreenCamera(cameraId);
     });
     
-    //if (inProgress) { TODO
-        cameraProgress.css('opacity', '0.5');
-        cameraPlaceholder.css('opacity', '0');
-//    }
+    cameraProgress.addClass('visible');
+    cameraPlaceholder.css('opacity', '0');
     
     /* insert the new camera frame at the right position,
      * with respect to the camera id */
@@ -1788,7 +1786,7 @@ function addCameraFrameUi(cameraConfig, framerate) {
         cameraImg.addClass('error').removeClass('loading');
         cameraImg.height(Math.round(cameraImg.width() * 0.75));
         cameraPlaceholder.css('opacity', 1);
-        cameraProgress.css('opacity', 0);
+        cameraProgress.removeClass('visible');
     });
     cameraImg.load(function () {
         if (refreshDisabled) {
@@ -1801,7 +1799,7 @@ function addCameraFrameUi(cameraConfig, framerate) {
         cameraImg.removeClass('error').removeClass('loading');
         cameraImg.css('height', '');
         cameraPlaceholder.css('opacity', 0);
-        cameraProgress.css('opacity', 0);
+        cameraProgress.removeClass('visible');
         
         if (fullScreenCameraId) {
             /* update the modal dialog position when image is loaded */