diff options
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/MonitorModalCtrl.js | 38 | ||||
| -rw-r--r-- | www/templates/monitors-modal.html | 25 |
2 files changed, 40 insertions, 23 deletions
diff --git a/www/js/MonitorModalCtrl.js b/www/js/MonitorModalCtrl.js index 624f4a06..d6376b55 100644 --- a/www/js/MonitorModalCtrl.js +++ b/www/js/MonitorModalCtrl.js @@ -265,7 +265,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ .then (function (data) { ZMDataModel.zmDebug ("Success in monitor alarmed status " + JSON.stringify(data)); - $scope.monStatus = " - "+ status[parseInt(data.data.status)]; + $scope.monStatus = status[parseInt(data.data.status)]; }, function (error) { @@ -652,6 +652,40 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ }; + + + //----------------------------------------------------------------------- + // color for monitor state + //----------------------------------------------------------------------- + + $scope.stateColor = function() + { + console.log ("***MONSTATUS**"+$scope.monStatus+"**"); + var color=""; + switch ($scope.monStatus) + { + case "": + color="background-color:none"; + break; + case "idle": + color="background-color:#4B77BE"; + break; + case "pre-alarm": + color="background-color:#e67e22"; + break; + case "alarmed": + color="background-color:#D91E18"; + break; + case "alert": + color="background-color:#e67e22"; + break; + case "record": + color="background-color:#26A65B"; + break; + } + + return "padding-left:4px;padding-right:4px;"+color; + }; //----------------------------------------------------------------------- @@ -1056,7 +1090,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ $scope.connKey = (Math.floor((Math.random() * 999999) + 1)).toString(); console.log ("************* GENERATED CONNKEY " + $scope.connKey); $scope.currentFrame = 1; - + $scope.monStatus = ""; configurePTZ($scope.monitorId); diff --git a/www/templates/monitors-modal.html b/www/templates/monitors-modal.html index b2f06af2..3ccd0113 100644 --- a/www/templates/monitors-modal.html +++ b/www/templates/monitors-modal.html @@ -1,10 +1,8 @@ <div ng-controller="MonitorModalCtrl" ng-cloak> - <!--style="background-color:#444444;width: 90%; height: 90%; top: 5%; left: 5%; right: 5%; bottom: 5%;"--> - <ion-modal-view cache-view="false" style="background-color:#444444" > <ion-content on-double-tap="closeModal();" > - <!-- <div style="background-color:red; color:white"> Modal Rand:{{$root.modalRand}} </div>--> + <ion-scroll delegate-handle="imgscroll" has-bouncing=false min-zoom=1 zooming="true" direction="xy" style="width: 100%;" > <!-- android needs this 100vh - otherwise max- does not work --> <!-- --> @@ -32,7 +30,7 @@ </div> </div> </ion-scroll> - <!--url: {{LoginData.streamingurl}}/cgi-bin/nph-zms?mode=single&monitor={{monitorId}}&maxfps={{LoginData.maxFPS}}&{{$root.authSession}}&rand={{$root.modalRand}}--> + </ion-content> @@ -123,22 +121,7 @@ </ul> </div> -<!-- - <span class="camera-icon"> - <a class="button icon ion-ios-camera button-positive" href="" ng-click="saveImageToPhone(monitorId)"></a> - </span> - - <span ng-if="$root.platformOS == 'desktop'" class="desktop-zoom-icon"> - <a class="button icon ion-plus-round button-assertive" href="" ng-click="zoomImage(1)"></a> - <a class="button icon ion-minus-round button-assertive" href="" ng-click="zoomImage(-1)"></a> - - </span> - - <span class="modal-alarm-badge"> - <a data-badge="{{$root.alarmCount}}" class="animated infinite tada button icon ion-ios-bell notification-badge button-assertive" - ng-click="handleAlarms();" ng-if="$root.isAlarm"></a> - </span> ---> - <div class="monitor-modal-text">{{monitorName}}{{monStatus}}</div> + + <div class="monitor-modal-text">{{monitorName}} <span style="{{stateColor()}}">{{monStatus}} </span></div> </div>
\ No newline at end of file |
