Change status controller and template

This commit is contained in:
manzerbredes 2016-01-31 13:34:43 +01:00
parent 81696200b0
commit 6905bacd58
3 changed files with 4 additions and 4 deletions

View file

@ -13,10 +13,10 @@ mainApp.controller('statusCtrl', function ($scope,$interval,$sce)
$scope.username=status[1];
$scope.lastconnection=status[2];
if(status[0] == "1"){
$scope.connection=$sce.trustAsHtml("Connection : <span style=\"color:green;\">Online</span>");
$scope.connection=$sce.trustAsHtml("<span style=\"color:green;\">Online</span>");
}
else{
$scope.connection="Connection : <span style=\"color:red;\">Offline</span>";
$scope.connection=$sce.trustAsHtml("<span style=\"color:red;\">Offline</span>");
}
}, 2000);

View file

@ -10,6 +10,6 @@ identity.fetchStatus = function(){
// TODO
return new Array("1", "user1", "25/02/2016");
return new Array("0", "user1", "25/02/2016");
}

View file

@ -20,7 +20,7 @@
<li class="nav-divider"></li>
<li><a href="#">User : {{ username }}</a></li>
<li><a href="#">Last Connection : {{ lastconnection }}</a></li>
<li><a href="#" ng-bind-html="connection"></a></li>
<li><a href="#" >Connection : <span ng-bind-html="connection"></span></a></li>
</ul>