mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
Settings modal rework -> panel slider at top
This commit is contained in:
@@ -278,6 +278,12 @@
|
||||
angular.element('#wrapper').addClass('toggled');
|
||||
};
|
||||
|
||||
$scope.toggleSettings = function() {
|
||||
var settingsEl = angular.element(document.querySelector('#settings'));
|
||||
settingsEl.toggleClass('toggled');
|
||||
$rootScope.$emit('toggledSettings', settingsEl.hasClass('toggled'));
|
||||
};
|
||||
|
||||
$scope.goFullscreen = function() {
|
||||
if (storage.data.userStatus !== 'connected') {
|
||||
return;
|
||||
|
@@ -3,16 +3,25 @@
|
||||
|
||||
angular
|
||||
.module('vertoControllers')
|
||||
.controller('ModalSettingsController', ['$scope', '$http',
|
||||
'$location', '$modalInstance', '$rootScope', 'storage', 'verto', 'toastr',
|
||||
function($scope, $http, $location, $modalInstance, $rootScope, storage, verto, toastr) {
|
||||
.controller('SettingsController', ['$scope', '$http',
|
||||
'$location', '$rootScope', 'storage', 'verto',
|
||||
function($scope, $http, $location, $rootScope, storage, verto) {
|
||||
console.debug('Executing ModalSettingsController.');
|
||||
|
||||
$.material.init();
|
||||
|
||||
$scope.speakerFeature = typeof document.getElementById('webcam').sinkId !== 'undefined';
|
||||
$scope.storage = storage;
|
||||
$scope.verto = verto;
|
||||
$scope.mydata = angular.copy(storage.data);
|
||||
|
||||
$scope.speakerFeature = typeof document.getElementById('webcam').sinkId !== 'undefined';
|
||||
$rootScope.$on('toggledSettings', function(e, status) {
|
||||
if (status) {
|
||||
$scope.mydata = angular.copy(storage.data);
|
||||
} else {
|
||||
$scope.ok();
|
||||
}
|
||||
});
|
||||
|
||||
$scope.ok = function() {
|
||||
if ($scope.mydata.selectedSpeaker != storage.data.selectedSpeaker) {
|
||||
@@ -24,11 +33,6 @@
|
||||
if (storage.data.autoBand) {
|
||||
$scope.testSpeed();
|
||||
}
|
||||
$modalInstance.close('Ok.');
|
||||
};
|
||||
|
||||
$scope.cancel = function() {
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
|
||||
$scope.refreshDeviceList = function() {
|
||||
@@ -60,7 +64,6 @@
|
||||
if (confirm('Factory Reset Settings?')) {
|
||||
storage.factoryReset();
|
||||
$scope.logout();
|
||||
$modalInstance.close('Ok.');
|
||||
window.location.reload();
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user