Merge pull request #751 in FS/freeswitch from ~DCOLOMBO/freeswitch:bugfix/FS-8945-dont-show-preview-setting-during to master

* commit '871785d668d80ba5a0e893a872d6d701ed89c3be':
  FS-8945 - [verto_communicator]  don't show preview settings during video call
This commit is contained in:
Italo Rossi 2016-03-18 06:42:37 -05:00
commit c041f43e0e
2 changed files with 14 additions and 3 deletions

View File

@ -35,7 +35,7 @@
</select>
</div>
<a class="btn btn-primary" href="#/preview" ng-click="ok()">Preview Settings</a>
<a class="btn btn-primary" href="" ng-click="showPreview()">Preview Settings</a>
<a class="btn btn-primary" href="" ng-click="refreshDeviceList()">Refresh device list</a>
<div class="form-group">

View File

@ -4,8 +4,8 @@
angular
.module('vertoControllers')
.controller('ModalSettingsController', ['$scope', '$http',
'$location', '$modalInstance', '$rootScope', 'storage', 'verto',
function($scope, $http, $location, $modalInstance, $rootScope, storage, verto) {
'$location', '$modalInstance', '$rootScope', 'storage', 'verto', 'toastr',
function($scope, $http, $location, $modalInstance, $rootScope, storage, verto, toastr) {
console.debug('Executing ModalSettingsController.');
$scope.storage = storage;
@ -35,6 +35,17 @@
return verto.refreshDevices();
};
$scope.showPreview = function() {
$modalInstance.close('Ok.');
if (!verto.data.call) {
$location.path('/preview');
return;
}
else {
toastr.warning('Can\'t display preview settings during a call');
}
};
$scope.testSpeed = function() {
return verto.testSpeed(cb);