summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorARC <arjunrc@gmail.com>2015-05-13 14:32:56 -0400
committerARC <arjunrc@gmail.com>2015-05-13 14:32:56 -0400
commit1bef6ad92cafa215e3927d0a4d0a29147d52fe56 (patch)
treefe131c15e5ead37c8cbe1ffbd1a7646fde8736f8 /www
parent5a3af8dab3f4739592ad5505f7ed858ac7280cd9 (diff)
added show/hide for ZM state control APIs
Diffstat (limited to 'www')
-rw-r--r--www/js/StateCtrl.js3
-rw-r--r--www/templates/state.html6
2 files changed, 6 insertions, 3 deletions
diff --git a/www/js/StateCtrl.js b/www/js/StateCtrl.js
index 79b2490b..1be2d2d7 100644
--- a/www/js/StateCtrl.js
+++ b/www/js/StateCtrl.js
@@ -9,6 +9,9 @@ angular.module('zmApp.controllers').controller('zmApp.StateCtrl', ['$ionicPopup'
$scope.zmRun="loading...";
$scope.zmLoad="loading...";
$scope.color="";
+ $scope.showDanger=false;
+ $scope.dangerText = ["Show Danger Zone", "Hide Danger Zone"];
+ $scope.dangerButtonColor = ["button-positive", "button-assertive"];
var loginData = ZMDataModel.getLogin();
diff --git a/www/templates/state.html b/www/templates/state.html
index 19042f24..ec25a0c9 100644
--- a/www/templates/state.html
+++ b/www/templates/state.html
@@ -31,11 +31,11 @@
</div>
</ion-item>
<ion-item>
- <button class="button button-full button-assertive">
- <i class="ion-alert-circled" "style:font-size:200%;"></i> Danger Zone
+ <button class="button button-full {{dangerButtonColor[showDanger?1:0]}}" ng-click="showDanger=!showDanger">
+ <i class="ion-alert-circled" "style:font-size:300%;"></i> {{dangerText[showDanger?1:0]}}
</button>
- <div class="button-bar">
+ <div class="button-bar" ng-show="showDanger">
<a class="button button-outline button-dark " ng-click="controlZM('restart');" href="">Restart</a>
<a class="button button-outline button-dark" href="" ng-click="controlZM('stop');" >Stop</a>
<a class="button button-outline button-dark" ng-click="controlZM('start');" href="">Start</a>