FS-8095 [verto_communicator] Moving factory reset button to bottom left with red color and confirmation. Reloading page upon reset.

This commit is contained in:
Italo Rossi 2015-09-22 10:49:41 -03:00
parent 2184af8ea6
commit 64a2e68201
4 changed files with 16 additions and 5 deletions

View File

@ -36,6 +36,12 @@ body {
height: 100%;
}
.modal-content .modal-footer button.btn-pull-left {
padding-left: 16px;
padding-right: 16px;
margin-left: 5px;
}
/* This is an technique to align the block centered vertically
and horizontally in a page. */
.centered-block-frame {

View File

@ -24,7 +24,6 @@
</select>
<a class="btn btn-primary" href="" ng-click="refreshDeviceList()">Refresh device list</a>
<a class="btn btn-primary" href="" ng-click="resetSettings()">Factory reset</a>
</div>
<div class="form-group">
@ -113,6 +112,7 @@
</div>
<div class="modal-footer">
<button class="btn btn-danger pull-left btn-pull-left" ng-click="resetSettings()">Factory reset</button>
<!-- <button class="btn btn-primary" ng-click="cancel()">Cancel</button> -->
<button class="btn btn-primary" ng-click="ok()">Save Device Settings</button>
</div>

View File

@ -83,7 +83,7 @@
* Logout the user from verto server and
* redirects him to login page.
*/
$scope.logout = function() {
$rootScope.logout = function() {
var disconnect = function() {
var disconnectCallback = function(v, connected) {
console.debug('Redirecting to login page.');

View File

@ -24,11 +24,16 @@
$scope.refreshDeviceList = function() {
return verto.refreshDevices();
}
};
$scope.resetSettings = function() {
storage.factoryReset();
}
if (confirm('Factory Reset Settings?')) {
storage.factoryReset();
$scope.logout();
$scope.ok();
window.location.reload();
};
};
}
]);