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%; 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 /* This is an technique to align the block centered vertically
and horizontally in a page. */ and horizontally in a page. */
.centered-block-frame { .centered-block-frame {

View File

@ -24,7 +24,6 @@
</select> </select>
<a class="btn btn-primary" href="" ng-click="refreshDeviceList()">Refresh device list</a> <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>
<div class="form-group"> <div class="form-group">
@ -113,6 +112,7 @@
</div> </div>
<div class="modal-footer"> <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="cancel()">Cancel</button> -->
<button class="btn btn-primary" ng-click="ok()">Save Device Settings</button> <button class="btn btn-primary" ng-click="ok()">Save Device Settings</button>
</div> </div>

View File

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

View File

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