no more "unstable" versions; click on the camera frame activates full
authorCalin Crisan <ccrisan@gmail.com>
Sun, 27 Oct 2013 13:48:53 +0000 (15:48 +0200)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 27 Oct 2013 13:48:53 +0000 (15:48 +0200)
screen

src/handlers.py
src/update.py
static/css/main.css
static/js/main.js

index 4489abea41e4d7ebcd5fc38365af977f6ce8a1cb..34f203fb544d2c5f26afd9194d27ea5a9f620025 100644 (file)
@@ -609,9 +609,7 @@ class UpdateHandler(BaseHandler):
     def get(self):
         logging.debug('listing versions')
         
-        stable = self.get_argument('stable', default='false') == 'true'
-        
-        versions = update.get_all_versions(stable=stable)
+        versions = update.get_all_versions()
         current_version = update.get_version()
         update_version = None
         if versions and update.compare_versions(versions[-1], current_version) > 0:
index ba33d03ca5272b939d70dc5a6f5313b8e271d405..c4f2e2d39160bbaff8b1863dadeaa1e97bd960c1 100644 (file)
@@ -40,7 +40,7 @@ def get_version():
     return motioneye.VERSION
 
 
-def get_all_versions(stable=False):
+def get_all_versions():
     url = _BITBUCKET_LIST_TAGS_URL % {
             'root': _BITBUCKET_ROOT_URL,
             'owner': settings.REPO[0],
@@ -56,11 +56,6 @@ def get_all_versions(stable=False):
         logging.debug('available versions: %(versions)s' % {
                 'versions': ', '.join(versions)})
         
-        # stable versions are those of form x.y
-        # unstable versions are of form x.y.z
-        if stable:
-            versions = [v for v in versions if v.count('.') == 1]
-
         return sorted(versions, cmp=compare_versions)
 
     except Exception as e:
index c2ce5870dc0f49909c8c81334bec6503e771c2e7..13a06ab62e67741952e28337e5eb6b5535fd0c3f 100644 (file)
@@ -333,6 +333,7 @@ div.camera-frame {
     transition: all 0.2s, opacity 0s;
     margin: 2px;
     opacity: 0;
+    cursor: pointer;
 }
 
 div.modal-container div.camera-frame {
index 037949b9e15f6c81c37777f48794bc05f625d597..52e46727b116e34b92abf52619266c0312d6cfe3 100644 (file)
@@ -807,7 +807,7 @@ function doRemCamera() {
 
 function doUpdate() {
     showModalDialog('<div class="modal-progress"></div>');
-    ajax('GET', '/update/?stable=true', null, function (data) {
+    ajax('GET', '/update/', null, function (data) {
         if (data.update_version == null) {
             runAlertDialog('motionEye is up to date (current version: ' + data.current_version + ')');
         }
@@ -1215,6 +1215,10 @@ function addCameraFrameUi(cameraId, cameraName, framerate) {
     nameSpan.html(cameraName);
     progressImg.attr('src', staticUrl + 'img/camera-progress.gif');
     
+    cameraFrameDiv.click(function () {
+        doFullScreenCamera(cameraId);
+    });
+    
     /* insert the new camera frame at the right position,
      * with respect to the camera id */
     var pageContainer = $('div.page-container');
@@ -1243,9 +1247,11 @@ function addCameraFrameUi(cameraId, cameraName, framerate) {
         doConfigureCamera(cameraId);
     });
 
-    fullScreenButton.click(function () {
-        doFullScreenCamera(cameraId);
-    });
+    fullScreenButton.click(function (cameraId) {
+        return function () {
+            doFullScreenCamera(cameraId);
+        };
+    }(cameraId));
     
     /* error and load handlers */
     cameraImg.error(function () {