From 9ffd25e1e31e8cc196a9d8b4d3a3f6e62974066c Mon Sep 17 00:00:00 2001 From: Italo Rossi Date: Tue, 22 Mar 2016 16:10:11 -0300 Subject: [PATCH] FS-8966 - [verto_communicator] Ability to cancel dialing while doing speed test --- html5/verto/verto_communicator/src/css/verto.css | 2 +- .../verto_communicator/src/partials/dialpad.html | 13 +++++++++++-- .../controllers/DialPadController.js | 14 ++++++++++++-- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/html5/verto/verto_communicator/src/css/verto.css b/html5/verto/verto_communicator/src/css/verto.css index 7b87ed070a..a69d645600 100644 --- a/html5/verto/verto_communicator/src/css/verto.css +++ b/html5/verto/verto_communicator/src/css/verto.css @@ -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; diff --git a/html5/verto/verto_communicator/src/partials/dialpad.html b/html5/verto/verto_communicator/src/partials/dialpad.html index e5711d1ef2..a279e26167 100644 --- a/html5/verto/verto_communicator/src/partials/dialpad.html +++ b/html5/verto/verto_communicator/src/partials/dialpad.html @@ -1,6 +1,15 @@
-

Calling to {{ dialpadNumber }}...

- +

Cancelling...

+ +

Determining your speed...

+

+ Calling to {{ dialpadNumber }}... + + Cancel
+
+

+
+
diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/DialPadController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/DialPadController.js index 305e4e60fb..7437907f7f 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/DialPadController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/DialPadController.js @@ -109,6 +109,7 @@ * 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); @@ -116,10 +117,19 @@ $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; + } } ]);