From 1139b026aedbc609189a5b3cb7ef446e1ceec09d Mon Sep 17 00:00:00 2001 From: lucas_nz Date: Sat, 5 Sep 2020 11:41:25 +1200 Subject: select event view thumbnails type, replaces enableThumbs in dev options. Enables selection of different thumbnail types. If gif is selected limit the number of events returned to 5 to improve load time. --- www/js/DevOptionsCtrl.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'www/js/DevOptionsCtrl.js') diff --git a/www/js/DevOptionsCtrl.js b/www/js/DevOptionsCtrl.js index 2ad40bfa..d735f967 100644 --- a/www/js/DevOptionsCtrl.js +++ b/www/js/DevOptionsCtrl.js @@ -181,6 +181,35 @@ angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope' }); }; + $scope.selectEventViewThumbs = function() { + + var buttons = [ + { text: $translate.instant('kNone').toLowerCase(), value:'none' }, + { text: 'snapshot', value:'snapshot' }, + { text: 'objdetect', value:'objdetect' }, + { text: 'objdetect_jpg', value:'objdetect_jpg' }, + { text: 'objdetect_gif', value:'objdetect_gif' }, + + ]; + + $ionicActionSheet.show({ + titleText: $translate.instant('kSelect'), + buttons: buttons, + + cancelText: $translate.instant('kButtonCancel'), + cancel: function() { + NVR.debug ('obfuscation actionsheet cancelled'); + }, + buttonClicked: function(index) { + + $scope.loginData.eventViewThumbs = buttons[index].value; + NVR.debug ('changed event view thumbs to:'+$scope.loginData.eventViewThumbs ); + return true; + }, + + }); + }; + $scope.saveDevOptions = function () { saveDevOptions(); -- cgit v1.2.3