summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rw-r--r--www/js/EventCtrl.js11
-rw-r--r--www/js/ModalCtrl.js10
-rw-r--r--www/js/MonitorCtrl.js10
-rw-r--r--www/js/MontageCtrl.js14
4 files changed, 39 insertions, 6 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js
index 8d9bd57b..dacb5345 100644
--- a/www/js/EventCtrl.js
+++ b/www/js/EventCtrl.js
@@ -17,6 +17,7 @@ angular.module('zmApp.controllers').controller('zmApp.EventCtrl', ['$scope', '$r
var segmentHandle = 0; // holds timer for progress bar
$scope.totalEventTime = 0; // used to display max of progress bar
$scope.currentEventTime = 0;
+ $scope.imageStyle=true;
@@ -136,7 +137,7 @@ angular.module('zmApp.controllers').controller('zmApp.EventCtrl', ['$scope', '$r
// which is the view - and when you are in the modal it will go away
console.log("*** Refreshing Modal view ***");
//$state.go($state.current, {}, {reload: true});
- $scope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111;
+ $rootScope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111;
$ionicLoading.show({
template: "refreshed view",
noBackdrop: true,
@@ -428,7 +429,7 @@ angular.module('zmApp.controllers').controller('zmApp.EventCtrl', ['$scope', '$r
$scope.eventId = eid;
$scope.eventDur = Math.round(edur);
$scope.loginData = ZMDataModel.getLogin();
- $scope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111;
+ $rootScope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111;
$scope.totalEventTime = Math.round(parseFloat(edur)) - 1;
$scope.currentEventTime = 0;
@@ -632,4 +633,10 @@ angular.module('zmApp.controllers').controller('zmApp.EventCtrl', ['$scope', '$r
});
}; //dorefresh
+ $scope.scaleImage = function() {
+ console.log ("Switching image style");
+ $scope.imageStyle = !$scope.imageStyle;
+
+ };
+
}]);
diff --git a/www/js/ModalCtrl.js b/www/js/ModalCtrl.js
index 535cadf3..cce6db09 100644
--- a/www/js/ModalCtrl.js
+++ b/www/js/ModalCtrl.js
@@ -9,9 +9,13 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
console.log("**** INSIDE MODAL CTRL *****");
+
// This holds the PTZ menu control
// Note that I hacked radialMenu
// so please don't use the one you get from bower
+
+ //var imageStyle=1;
+ //$scope.imageAspect = "max-width: 100%;max-height: 100%;";
$scope.radialMenuOptions = {
content: '',
@@ -121,6 +125,10 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
},
]};
+
+
+
+
//-------------------------------------------------------------
// Send PTZ command to ZM
// Note: PTZ fails on desktop, don't bother about it
@@ -214,4 +222,6 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
};
+
+
}]);
diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js
index a98c6b1b..02a6dcce 100644
--- a/www/js/MonitorCtrl.js
+++ b/www/js/MonitorCtrl.js
@@ -19,6 +19,8 @@ angular.module('zmApp.controllers').controller('zmApp.MonitorCtrl', ['$ionicPopu
monitorStateCheck();
console.log ("Setting Awake to "+ZMDataModel.getKeepAwake());
ZMDataModel.setAwake(ZMDataModel.getKeepAwake());
+ $scope.imageStyle=true;
+
$scope.openMenu = function () {
@@ -40,6 +42,8 @@ angular.module('zmApp.controllers').controller('zmApp.MonitorCtrl', ['$ionicPopu
});
};
+
+
//-----------------------------------------------------------------------
// This function takes care of changing monitor parameters
// For now, I've only limited it to enable/disable and change monitor mode
@@ -345,4 +349,10 @@ angular.module('zmApp.controllers').controller('zmApp.MonitorCtrl', ['$ionicPopu
};
+ $scope.scaleImage = function() {
+ console.log ("Switching image style");
+ $scope.imageStyle = !$scope.imageStyle;
+
+ };
+
}]);
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index 94ec78ab..20843a94 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -17,6 +17,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
$scope.minimal = $stateParams.minimal;
$scope.isRefresh = $stateParams.isRefresh;
var sizeInProgress = false;
+ $scope.imageStyle = true;
$ionicSideMenuDelegate.canDragContent(false);
@@ -70,8 +71,8 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
console.log("Montage order is " + myorder);
console.log("Hidden order is " + myhiddenorder);
- montageOrder = myorder.split(",");
- hiddenOrder = myhiddenorder.split(",");
+ if (myorder) montageOrder = myorder.split(",");
+ if (myhiddenorder) hiddenOrder = myhiddenorder.split(",");
} // at this stage, the monitor arrangement is not matching
// the montage order. Its in true order. Let us first process the hiddenOrder part
@@ -158,7 +159,6 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
this.loadNotifications = function () {
// randomval is appended to img src, so after each interval the image reloads
$scope.randomval = (new Date()).getTime();
- //console.log ("**** NOTIFICATION with rand="+$scope.randomval+"*****");
};
var intervalHandle = $interval(function () {
@@ -377,7 +377,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
// in montage view
$scope.monitorId = mid;
$scope.LoginData = ZMDataModel.getLogin();
- $scope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111;
+ $rootScope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111;
$scope.ptzMoveCommand = "";
// This is a modal to show the monitor footage
@@ -607,5 +607,11 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
};
+ $scope.scaleImage = function() {
+ console.log ("Switching image style");
+ $scope.imageStyle = !$scope.imageStyle;
+
+ };
+
}]);