]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8095 [verto_communicator] Moving factory reset button to bottom left with red...
authorItalo Rossi <italorossib@gmail.com>
Tue, 22 Sep 2015 13:49:41 +0000 (10:49 -0300)
committerItalo Rossi <italorossib@gmail.com>
Tue, 22 Sep 2015 13:49:41 +0000 (10:49 -0300)
html5/verto/verto_communicator/src/css/verto.css
html5/verto/verto_communicator/src/partials/modal_settings.html
html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js
html5/verto/verto_communicator/src/vertoControllers/controllers/ModalSettingsController.js

index 160ede11dfa6a4660756471751bd2ef15217bcce..6fbb90f4480ed01e06c8f0cc139f328b87997df4 100644 (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 {
index dc08dbb9cccfdd3f6449e369b0d993b34188be66..0f258c28022ce4cd06cddc20544c36bf19ec85cb 100644 (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">
 
 </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>
index f7e3d5bb91791463e2f0566320bf5111eaaa7b65..f189b8c6673864154fa3cbd9dcbe69bf5410bbae 100644 (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.');
index 9324fa2f37e93e8c0e6d83a9d63a1cff8efc8b1e..b144d3026ef4b01bfbe95ee36a477bf70078979d 100644 (file)
 
         $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();
+         };
+        };
       }
     ]);