From: Calin Crisan Date: Sun, 13 Dec 2015 16:20:00 +0000 (+0200) Subject: action buttons fixes X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=f6545e260e8e734a70fe429e5f6ea599ce48e479;p=motioneye-debian action buttons fixes --- diff --git a/motioneye/handlers.py b/motioneye/handlers.py index 73dba83..f622f0a 100644 --- a/motioneye/handlers.py +++ b/motioneye/handlers.py @@ -1499,6 +1499,15 @@ class ActionHandler(BaseHandler): else: self.io_loop.add_timeout(datetime.timedelta(milliseconds=100), self.check_command) + + def snapshot(self): + self.finish_json({}) + + def record_start(self): + self.finish_json({}) + + def record_stop(self): + self.finish_json({}) class PrefsHandler(BaseHandler): diff --git a/motioneye/static/css/main.css b/motioneye/static/css/main.css index 58598d1..289ba01 100644 --- a/motioneye/static/css/main.css +++ b/motioneye/static/css/main.css @@ -980,7 +980,7 @@ div.camera-overlay-bottom.few-buttons { div.camera-info { display: inline-block; white-space: nowrap; - width: 50%; + width: 40%; overflow: hidden; text-overflow: ellipsis; vertical-align: top; @@ -998,13 +998,12 @@ span.camera-info { div.camera-action-buttons { display: inline-block; - width: 50%; + width: 60%; vertical-align: top; text-align: right; } div.camera-action-buttons-wrapper { - width: 10em; display: inline-block; white-space: normal; } diff --git a/motioneye/static/js/main.js b/motioneye/static/js/main.js index 3c9a248..d458392 100644 --- a/motioneye/static/js/main.js +++ b/motioneye/static/js/main.js @@ -3835,17 +3835,17 @@ function addCameraFrameUi(cameraConfig) { '' + '
' + '
' + - '' + + '' + '
' + '
' + '
' + '
' + - '
' + - '
' + - '
' + '
' + + '
' + '
' + + '
' + '
' + + '
' + '
' + '
' + '
' + @@ -3971,7 +3971,7 @@ function addCameraFrameUi(cameraConfig) { 'light_off': lightOffButton, 'alarm_on': alarmOnButton, 'alarm_off': alarmOffButton, - 'snapshpt': snapshotButton, + 'snapshot': snapshotButton, 'record': recordButton }; @@ -4007,6 +4007,9 @@ function addCameraFrameUi(cameraConfig) { if (cameraConfig.actions.length <= 4) { cameraOverlay.find('div.camera-overlay-bottom').addClass('few-buttons'); } + else { + cameraOverlay.find('div.camera-action-buttons-wrapper').css('width', Math.ceil(cameraConfig.actions.length / 2) * 2.5 + 'em'); + } var FPS_LEN = 4; cameraImg[0].fpsTimes = [];