]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8966 - [verto_communicator] Ability to cancel dialing while doing speed test
authorItalo Rossi <italorossib@gmail.com>
Tue, 22 Mar 2016 19:10:11 +0000 (16:10 -0300)
committerItalo Rossi <italorossib@gmail.com>
Tue, 22 Mar 2016 19:10:22 +0000 (16:10 -0300)
html5/verto/verto_communicator/src/css/verto.css
html5/verto/verto_communicator/src/partials/dialpad.html
html5/verto/verto_communicator/src/vertoControllers/controllers/DialPadController.js

index 7b87ed070ab5134a1d67f2b816026656028ee666..a69d6456000128e7b74fc22e01e470a382847393 100644 (file)
@@ -143,7 +143,7 @@ button.btn i {
   -webkit-animation: rotator 1.4s linear infinite;
           animation: rotator 1.4s linear infinite;
   position: absolute;
-  top: 35%;
+  top: 50%;
   left: 50%;
   margin-left: -35px;
   zoom: 2;
index e5711d1ef2f7511c46a5d8c7f2783b5333de2797..a279e261674464ce62d38efd6f5c7743b108a13a 100644 (file)
@@ -1,6 +1,15 @@
 <div ng-show="loading">
-  <h3 style="margin-top: 4%;" class="text-center">Calling to {{ dialpadNumber }}...</h3>
-  <svg class="spinner" width="65px" height="65px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
+  <h2 ng-show="cancelled" style="margin-top: 4%;" class="text-center">Cancelling...</h2>
+  <span ng-show="!cancelled">
+      <h2 style="margin-top: 4%;" class="text-center">Determining your speed...</h2>
+      <h4 style="margin-top: 4%;" class="text-center">
+          Calling to {{ dialpadNumber }}...
+          <a class="btn btn-sm btn-raised btn-warning" ng-click="cancel()">
+              Cancel<div class="ripple-container"></div>
+          </a>
+      </h4>
+  </span>
+  <svg class="spinner" width="35px" height="35px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
     <circle class="path" fill="none" stroke-width="6" stroke-linecap="round" cx="33" cy="33" r="30"></circle>
   </svg>
 </div>
index 305e4e60fbc7acf0dd98946301666081db912fb9..7437907f7f911326d1cc8f6f9dd4ca33de52dd75 100644 (file)
          * Call to the number in the $rootScope.dialpadNumber.
          */
         $scope.loading = false;
+        $scope.cancelled = false;
         $rootScope.call = function(extension) {
           if (!storage.data.testSpeedJoin || !$rootScope.dialpadNumber) {
             return call(extension);
           $scope.loading = true;
 
           verto.testSpeed(function() {
-            $scope.loading = false;
-            call(extension);
+            if ($scope.cancelled) {
+              $scope.cancelled = false;
+              $scope.loading = false;
+              return;
+            } else {
+              call(extension);
+            }
           });
         }
+
+        $rootScope.cancel = function() {
+          $scope.cancelled = true;
+        }
       }
     ]);