FS-8966 - [verto_communicator] Ability to cancel dialing while doing speed test
This commit is contained in:
parent
fa702f2710
commit
9ffd25e1e3
|
@ -143,7 +143,7 @@ button.btn i {
|
||||||
-webkit-animation: rotator 1.4s linear infinite;
|
-webkit-animation: rotator 1.4s linear infinite;
|
||||||
animation: rotator 1.4s linear infinite;
|
animation: rotator 1.4s linear infinite;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 35%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
margin-left: -35px;
|
margin-left: -35px;
|
||||||
zoom: 2;
|
zoom: 2;
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
<div ng-show="loading">
|
<div ng-show="loading">
|
||||||
<h3 style="margin-top: 4%;" class="text-center">Calling to {{ dialpadNumber }}...</h3>
|
<h2 ng-show="cancelled" style="margin-top: 4%;" class="text-center">Cancelling...</h2>
|
||||||
<svg class="spinner" width="65px" height="65px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
|
<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>
|
<circle class="path" fill="none" stroke-width="6" stroke-linecap="round" cx="33" cy="33" r="30"></circle>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -109,6 +109,7 @@
|
||||||
* Call to the number in the $rootScope.dialpadNumber.
|
* Call to the number in the $rootScope.dialpadNumber.
|
||||||
*/
|
*/
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
|
$scope.cancelled = false;
|
||||||
$rootScope.call = function(extension) {
|
$rootScope.call = function(extension) {
|
||||||
if (!storage.data.testSpeedJoin || !$rootScope.dialpadNumber) {
|
if (!storage.data.testSpeedJoin || !$rootScope.dialpadNumber) {
|
||||||
return call(extension);
|
return call(extension);
|
||||||
|
@ -116,10 +117,19 @@
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
|
|
||||||
verto.testSpeed(function() {
|
verto.testSpeed(function() {
|
||||||
$scope.loading = false;
|
if ($scope.cancelled) {
|
||||||
call(extension);
|
$scope.cancelled = false;
|
||||||
|
$scope.loading = false;
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
call(extension);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$rootScope.cancel = function() {
|
||||||
|
$scope.cancelled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue