diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-10-08 14:53:07 -0400 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-10-08 14:53:07 -0400 |
| commit | 59e87770d8c7ffe45b55c31fd4b2acd49de00ecc (patch) | |
| tree | d12bf444c6864882363534cc73864bc61ec4a41d /www | |
| parent | ac992d9d8be5dd71e60c5650efe84c3f40a36e6e (diff) | |
alarm notifications in modal views added
Diffstat (limited to 'www')
| -rw-r--r-- | www/css/style.css | 19 | ||||
| -rw-r--r-- | www/js/MontageCtrl.js | 17 | ||||
| -rw-r--r-- | www/templates/events-modal.html | 9 | ||||
| -rw-r--r-- | www/templates/monitors-modal.html | 6 | ||||
| -rw-r--r-- | www/templates/montage.html | 6 |
5 files changed, 56 insertions, 1 deletions
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 @@ <div style="width:90%"> <input ng-model="ionRange.index" type="text" id="mySlider2" slider options="slider_modal_options" /> </div> + + + </div> + + <span class="event-modal-alarm-badge"> + <a data-badge="{{$root.alarmCount}}" class="animated infinite tada button icon button-clear ion-ios-bell notification-badge" + ng-click="handleAlarms();" ng-if="$root.isAlarm" ></a> + </span> <!-- <nav mfb-menu position="bl" effect="zoomin" label="collapse" @@ -92,4 +100,3 @@ class="eventprogress"></progress> --> -</div> 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 @@ <span class="camera-icon"> <a class="button icon ion-ios-camera button-positive" href="" ng-click="saveImageToPhone(monitorId)"></a> + </span> + + <span class="modal-alarm-badge"> + <a data-badge="{{$root.alarmCount}}" class="animated infinite tada button icon button-clear ion-ios-bell notification-badge" + ng-click="handleAlarms();" ng-if="$root.isAlarm"></a> + </span> </div> 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()"> </button> </nav> + + <span class="modal-alarm-badge"> + <a data-badge="{{$root.alarmCount}}" class="animated infinite tada button icon button-clear ion-ios-bell notification-badge" + ng-click="handleAlarmsWhileMinimized();" ng-if="$root.isAlarm"></a> + </span> + </div> </ion-view> |
