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;
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);