summaryrefslogtreecommitdiff
path: root/www/js/EventModalCtrl.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2018-10-15 09:49:34 -0400
committerPliable Pixels <pliablepixels@gmail.com>2018-10-15 09:49:34 -0400
commitdeeec5ff33576e3b57bce7dd24db6aa0d67eb90b (patch)
treebc4cd0d50cf601e6fb3cdfe9de177c31cd33624e /www/js/EventModalCtrl.js
parentbd1607efcaea59a5b4269628d5aa2999d6911b3e (diff)
beautify
Diffstat (limited to 'www/js/EventModalCtrl.js')
-rw-r--r--www/js/EventModalCtrl.js122
1 files changed, 61 insertions, 61 deletions
diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js
index 0e6d6be7..b992017c 100644
--- a/www/js/EventModalCtrl.js
+++ b/www/js/EventModalCtrl.js
@@ -403,49 +403,49 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
}
})
.then(function (resp) {
- //NVRDataModel.debug ("processEvent success:"+JSON.stringify(resp));
+ //NVRDataModel.debug ("processEvent success:"+JSON.stringify(resp));
- resp = resp.data;
- if (resp.result == "Ok") {
+ resp = resp.data;
+ if (resp.result == "Ok") {
- if (resp.status) $scope.currentProgress.progress = resp.status.progress;
- if (resp.status && resp.status.event) $scope.eventId = resp.status.event;
- $scope.d_eventId = $scope.eventId;
- if (resp.status) $scope.currentRate = resp.status.rate;
-
- if ($scope.currentProgress.progress > $scope.currentEventDuration) $scope.currentProgress.progress = $scope.currentEventDuration;
- $scope.progressText = "At " + $scope.currentProgress.progress + "s of " + $scope.currentEventDuration + "s";
+ if (resp.status) $scope.currentProgress.progress = resp.status.progress;
+ if (resp.status && resp.status.event) $scope.eventId = resp.status.event;
+ $scope.d_eventId = $scope.eventId;
+ if (resp.status) $scope.currentRate = resp.status.rate;
- $scope.sliderProgress.progress = $scope.currentProgress.progress;
+ if ($scope.currentProgress.progress > $scope.currentEventDuration) $scope.currentProgress.progress = $scope.currentEventDuration;
+ $scope.progressText = "At " + $scope.currentProgress.progress + "s of " + $scope.currentEventDuration + "s";
- // lets not do this and use zms to move forward or back
- // as this code conflicts with fast rev etc
- //if (Math.floor(resp.status.progress) >=$scope.currentEventDuration)
+ $scope.sliderProgress.progress = $scope.currentProgress.progress;
- //$timeout (checkEvent(), zm.eventPlaybackQuery);
- //eventQueryHandle = $timeout (function(){checkEvent();}, zm.eventPlaybackQuery);
+ // lets not do this and use zms to move forward or back
+ // as this code conflicts with fast rev etc
+ //if (Math.floor(resp.status.progress) >=$scope.currentEventDuration)
- } else // resp.result was messed up
+ //$timeout (checkEvent(), zm.eventPlaybackQuery);
+ //eventQueryHandle = $timeout (function(){checkEvent();}, zm.eventPlaybackQuery);
- {
- NVRDataModel.debug("Hmm I found an error " + JSON.stringify(resp));
- //window.stop();
- // $scope.connKey = (Math.floor((Math.random() * 999999) + 1)).toString();
+ } else // resp.result was messed up
- // console.log (JSON.stringify(resp));
- /*$timeout(function()
{
- sendCommand('14', $scope.connKey, '&offset=' + $scope.currentProgress.progress);
- }, 500);
- NVRDataModel.debug("so I'm regenerating Connkey to " + $scope.connKey);*/
+ NVRDataModel.debug("Hmm I found an error " + JSON.stringify(resp));
+ //window.stop();
+ // $scope.connKey = (Math.floor((Math.random() * 999999) + 1)).toString();
+
+ // console.log (JSON.stringify(resp));
+ /*$timeout(function()
+ {
+ sendCommand('14', $scope.connKey, '&offset=' + $scope.currentProgress.progress);
+ }, 500);
+ NVRDataModel.debug("so I'm regenerating Connkey to " + $scope.connKey);*/
- }
- },
- function (resp) {
- NVRDataModel.debug("processEvent error:" + JSON.stringify(resp));
- //eventQueryHandle = $timeout (function(){checkEvent();}, zm.eventPlaybackQuery);
+ }
+ },
+ function (resp) {
+ NVRDataModel.debug("processEvent error:" + JSON.stringify(resp));
+ //eventQueryHandle = $timeout (function(){checkEvent();}, zm.eventPlaybackQuery);
- });
+ });
}
@@ -1038,12 +1038,12 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
//desktop
$ionicLoading.hide();
-
- $rootScope.zmPopup = SecuredPopups.show('alert', {
+
+ $rootScope.zmPopup = SecuredPopups.show('alert', {
title: $translate.instant('kNote'),
- template: $translate.instant('kDownloadVideoImage')+"<br/><br/><center><a href='" + url + "' class='button button-assertive icon ion-android-download' download>"+" "+$translate.instant('kDownload')+"</a></center>",
+ template: $translate.instant('kDownloadVideoImage') + "<br/><br/><center><a href='" + url + "' class='button button-assertive icon ion-android-download' download>" + " " + $translate.instant('kDownload') + "</a></center>",
okText: $translate.instant('kDismiss'),
- okType:'button-stable'
+ okType: 'button-stable'
});
@@ -1551,42 +1551,42 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
return $http.delete(apiDelete)
.then(function (data) {
- data = data.data;
- $ionicLoading.hide();
- // NVRDataModel.debug("delete output: " + JSON.stringify(data));
+ data = data.data;
+ $ionicLoading.hide();
+ // NVRDataModel.debug("delete output: " + JSON.stringify(data));
- if (data.message == 'Error') {
- $ionicLoading.show({
- template: "{{'kError' | translate}}...",
- noBackdrop: true,
- duration: 1500
- });
+ if (data.message == 'Error') {
+ $ionicLoading.show({
+ template: "{{'kError' | translate}}...",
+ noBackdrop: true,
+ duration: 1500
+ });
- } else {
+ } else {
- $ionicLoading.hide();
- $ionicLoading.show({
- template: "{{'kSuccess' | translate}}...",
- noBackdrop: true,
- duration: 1000
- });
+ $ionicLoading.hide();
+ $ionicLoading.show({
+ template: "{{'kSuccess' | translate}}...",
+ noBackdrop: true,
+ duration: 1000
+ });
- }
+ }
- // NVRDataModel.displayBanner('info', [$translate.instant('kDeleteEventSuccess')], 2000, 2000);
+ // NVRDataModel.displayBanner('info', [$translate.instant('kDeleteEventSuccess')], 2000, 2000);
- //doRefresh();
+ //doRefresh();
- },
- function (data) {
- $ionicLoading.hide();
- NVRDataModel.debug("delete error: " + JSON.stringify(data));
- NVRDataModel.displayBanner('error', [$translate.instant('kDeleteEventError1'), $translate.instant('kDeleteEventError2')]);
- });
+ },
+ function (data) {
+ $ionicLoading.hide();
+ NVRDataModel.debug("delete error: " + JSON.stringify(data));
+ NVRDataModel.displayBanner('error', [$translate.instant('kDeleteEventError1'), $translate.instant('kDeleteEventError2')]);
+ });
}
//--------------------------------------------------------
//Navigate to next/prev event in full screen mode