FS-8018 [verto_communicator] separation of concerns. Get storage service to manage all settings instead of vertoService.

This commit is contained in:
Joao Mesquita
2015-08-27 19:00:43 -03:00
parent ac945c012a
commit 6a6d2ae8d6
5 changed files with 47 additions and 107 deletions

View File

@@ -277,7 +277,6 @@
verto.hangup();
});
} else {
verto.changeData(storage);
console.log('redirect to incall page');
$location.path('/incall');
}
@@ -381,9 +380,9 @@
storage.data.onHold = false;
verto.data.call.answer({
useStereo: verto.data.useStereo,
useCamera: verto.data.useCamera,
useMic: verto.data.useMic,
useStereo: storage.data.useStereo,
useCamera: storage.data.selectedVideo,
useMic: storage.data.useMic,
callee_id_name: verto.data.name,
callee_id_number: verto.data.login
});

View File

@@ -4,16 +4,16 @@
angular
.module('vertoControllers')
.controller('ModalSettingsController', ['$scope', '$http',
'$location', '$modalInstance', 'verto', 'storage',
function($scope, $http, $location, $modalInstance, verto, storage) {
'$location', '$modalInstance', 'storage', 'verto',
function($scope, $http, $location, $modalInstance, storage, verto) {
console.debug('Executing ModalSettingsController.');
verto.changeData(storage);
$scope.verto = verto;
$scope.storage = storage;
$scope.verto = verto;
$scope.mydata = angular.copy(storage.data);
$scope.ok = function() {
storage.changeData(verto);
storage.changeData($scope.mydata);
$modalInstance.close('Ok.');
};