From 59e87770d8c7ffe45b55c31fd4b2acd49de00ecc Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Thu, 8 Oct 2015 14:53:07 -0400 Subject: alarm notifications in modal views added --- www/css/style.css | 19 +++++++++++++++++++ www/js/MontageCtrl.js | 17 +++++++++++++++++ www/templates/events-modal.html | 9 ++++++++- www/templates/monitors-modal.html | 6 ++++++ www/templates/montage.html | 6 ++++++ 5 files changed, 56 insertions(+), 1 deletion(-) (limited to 'www') diff --git a/www/css/style.css b/www/css/style.css index d2781e58..0c8d0ec0 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -183,6 +183,25 @@ http://www.cssportal.com/tryit/index.php?file=blog/css-notification-badge */ opacity:0.7; } +.modal-alarm-badge +{ + position:absolute; + bottom:20px; + left: 100px; + z-index:10; + opacity:1; +} + + +.event-modal-alarm-badge +{ + position:absolute; + + right: 5%; + bottom:30px; + z-index:10; + opacity:1; +} .events-range { diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index dce5cd13..cc6edc1e 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -246,6 +246,23 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' $state.go("events", {"id": 0}, { reload: true }); } }; + + $scope.handleAlarmsWhileMinimized = function() + { + $rootScope.isAlarm=!$rootScope.isAlarm; + + $scope.minimal = !$scope.minimal; + ZMDataModel.zmDebug("MontageCtrl: switch minimal is " + $scope.minimal); + ionic.Platform.fullScreen($scope.minimal, !$scope.minimal); + $interval.cancel(intervalHandle); + + if (!$rootScope.isAlarm) + { + $rootScope.alarmCount="0"; + $ionicHistory.nextViewOptions({disableBack: true}); + $state.go("events", {"id": 0}, { reload: true }); + } + }; //------------------------------------------------------------- // Called when user taps on the reorder button diff --git a/www/templates/events-modal.html b/www/templates/events-modal.html index 2c793e36..0c7133f1 100644 --- a/www/templates/events-modal.html +++ b/www/templates/events-modal.html @@ -63,6 +63,14 @@
+ + + + + + + - diff --git a/www/templates/monitors-modal.html b/www/templates/monitors-modal.html index 3d650ee8..8ab0a0f6 100644 --- a/www/templates/monitors-modal.html +++ b/www/templates/monitors-modal.html @@ -59,6 +59,12 @@ + + + + + diff --git a/www/templates/montage.html b/www/templates/montage.html index f3a5c9ae..c416c4f3 100644 --- a/www/templates/montage.html +++ b/www/templates/montage.html @@ -97,6 +97,12 @@ ng-click="switchMinimal()"> + + + + + -- cgit v1.2.3