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:
parent
2184af8ea6
commit
64a2e68201
|
@ -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 {
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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.');
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
};
|
||||
}
|
||||
]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue