提交 64a2e682 authored 作者: Italo Rossi's avatar Italo Rossi

FS-8095 [verto_communicator] Moving factory reset button to bottom left with red…

FS-8095 [verto_communicator] Moving factory reset button to bottom left with red color and confirmation. Reloading page upon reset.
上级 2184af8e
......@@ -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() {
if (confirm('Factory Reset Settings?')) {
storage.factoryReset();
}
$scope.logout();
$scope.ok();
window.location.reload();
};
};
}
]);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论