From 871785d668d80ba5a0e893a872d6d701ed89c3be Mon Sep 17 00:00:00 2001 From: Davide Colombo Date: Wed, 16 Mar 2016 10:32:39 +0100 Subject: [PATCH] FS-8945 - [verto_communicator] don't show preview settings during video call --- .../src/partials/modal_settings.html | 2 +- .../controllers/ModalSettingsController.js | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/html5/verto/verto_communicator/src/partials/modal_settings.html b/html5/verto/verto_communicator/src/partials/modal_settings.html index 5df1573292..e4aa9021f1 100644 --- a/html5/verto/verto_communicator/src/partials/modal_settings.html +++ b/html5/verto/verto_communicator/src/partials/modal_settings.html @@ -35,7 +35,7 @@ - Preview Settings + Preview Settings Refresh device list
diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/ModalSettingsController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/ModalSettingsController.js index a99fefe058..34fa507a35 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/ModalSettingsController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/ModalSettingsController.js @@ -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);