From 64a2e6820140de6b080b6bc033eec9897c2c151b Mon Sep 17 00:00:00 2001 From: Italo Rossi Date: Tue, 22 Sep 2015 10:49:41 -0300 Subject: [PATCH] FS-8095 [verto_communicator] Moving factory reset button to bottom left with red color and confirmation. Reloading page upon reset. --- html5/verto/verto_communicator/src/css/verto.css | 6 ++++++ .../src/partials/modal_settings.html | 2 +- .../vertoControllers/controllers/MainController.js | 2 +- .../controllers/ModalSettingsController.js | 11 ++++++++--- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/html5/verto/verto_communicator/src/css/verto.css b/html5/verto/verto_communicator/src/css/verto.css index 160ede11df..6fbb90f448 100644 --- a/html5/verto/verto_communicator/src/css/verto.css +++ b/html5/verto/verto_communicator/src/css/verto.css @@ -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 { diff --git a/html5/verto/verto_communicator/src/partials/modal_settings.html b/html5/verto/verto_communicator/src/partials/modal_settings.html index dc08dbb9cc..0f258c2802 100644 --- a/html5/verto/verto_communicator/src/partials/modal_settings.html +++ b/html5/verto/verto_communicator/src/partials/modal_settings.html @@ -24,7 +24,6 @@ Refresh device list - Factory reset
@@ -113,6 +112,7 @@
diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js index f7e3d5bb91..f189b8c667 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js @@ -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.'); diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/ModalSettingsController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/ModalSettingsController.js index 9324fa2f37..b144d3026e 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/ModalSettingsController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/ModalSettingsController.js @@ -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(); + }; + }; } ]);