From 3eca2e0035134ddbfdb40128f56a848a80b438ff Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 27 Oct 2013 15:48:53 +0200 Subject: [PATCH] no more "unstable" versions; click on the camera frame activates full screen --- src/handlers.py | 4 +--- src/update.py | 7 +------ static/css/main.css | 1 + static/js/main.js | 14 ++++++++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/handlers.py b/src/handlers.py index 4489abe..34f203f 100644 --- a/src/handlers.py +++ b/src/handlers.py @@ -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: diff --git a/src/update.py b/src/update.py index ba33d03..c4f2e2d 100644 --- a/src/update.py +++ b/src/update.py @@ -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: diff --git a/static/css/main.css b/static/css/main.css index c2ce587..13a06ab 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -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 { diff --git a/static/js/main.js b/static/js/main.js index 037949b..52e4672 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -807,7 +807,7 @@ function doRemCamera() { function doUpdate() { showModalDialog(''); - 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 () { -- 2.39.5