From cc97290133abd5a6b141f4ea526bdf0bf261076c Mon Sep 17 00:00:00 2001 From: pliablepixels Date: Sun, 24 Apr 2016 09:45:52 -0400 Subject: #232 - pass on orientation value to modal so we can rotate Former-commit-id: 6169275f480e0166dcd19cd469c6e0452befdf0a --- www/js/MonitorCtrl.js | 4 +++- www/js/MontageCtrl.js | 4 +++- www/templates/monitors-modal.html | 2 +- www/templates/monitors.html | 2 +- www/templates/montage.html | 4 ++-- 5 files changed, 10 insertions(+), 6 deletions(-) (limited to 'www') diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js index 7b637b1c..26bcade0 100644 --- a/www/js/MonitorCtrl.js +++ b/www/js/MonitorCtrl.js @@ -287,7 +287,7 @@ angular.module('zmApp.controllers') // console.log("**VIEW ** Monitor Ctrl Unloaded"); }); - $scope.openModal = function (mid, controllable, controlid, connKey) { + $scope.openModal = function (mid, controllable, controlid, connKey, orient) { ZMDataModel.zmDebug("MonitorCtrl:Open Monitor Modal with monitor Id=" + mid + " and Controllable:" + controllable + " with control ID:" + controlid); @@ -296,6 +296,8 @@ angular.module('zmApp.controllers') $scope.monitorName = ZMDataModel.getMonitorName(mid); $scope.LoginData = ZMDataModel.getLogin(); $scope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111; + $scope.orientation = orient || '0'; + ZMDataModel.zmLog("Monitor Orientation is: " + $scope.orientation); $rootScope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111; diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 869117f5..6cc20d65 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -628,7 +628,7 @@ function initPackery() //--------------------------------------------------------------------- // main monitor modal open - if drag is not on, this is called on touch //--------------------------------------------------------------------- - $scope.openModal = function (mid, controllable, controlid, connKey) { + $scope.openModal = function (mid, controllable, controlid, connKey, orient) { ZMDataModel.zmDebug("MontageCtrl: Open Monitor Modal with monitor Id=" + mid + " and Controllable:" + controllable + " with control ID:" + controlid); // $scope.isModalActive = true; // Note: no need to setAwake(true) as its already awake @@ -664,6 +664,8 @@ function initPackery() $scope.connKey = (Math.floor((Math.random() * 999999) + 1)).toString(); $scope.isControllable = controllable; + $scope.orientation = orient || '0'; + ZMDataModel.zmLog("Monitor Orientation is: " + $scope.orientation); // This is a modal to show the monitor footage // We need to switch to always awake if set so the feed doesn't get interrupted diff --git a/www/templates/monitors-modal.html b/www/templates/monitors-modal.html index c95e1831..723c9dea 100644 --- a/www/templates/monitors-modal.html +++ b/www/templates/monitors-modal.html @@ -17,7 +17,7 @@
- + diff --git a/www/templates/monitors.html b/www/templates/monitors.html index 6c404812..af0aa506 100644 --- a/www/templates/monitors.html +++ b/www/templates/monitors.html @@ -44,7 +44,7 @@ Configuration Events - Live View + Live View
diff --git a/www/templates/montage.html b/www/templates/montage.html index aea725e9..cd2bce55 100644 --- a/www/templates/montage.html +++ b/www/templates/montage.html @@ -60,12 +60,12 @@ - +
- +
-- cgit v1.2.3