diff --git a/src/main/webapp/js/controllers.js b/src/main/webapp/js/controllers.js index 58b4bbf2..69009dd5 100644 --- a/src/main/webapp/js/controllers.js +++ b/src/main/webapp/js/controllers.js @@ -346,6 +346,9 @@ module.controller('ManageUserCtrl', function($scope, $state, $stateParams, module.controller('SettingsCtrl', function($scope, $location, SettingsService) { $scope.settingsService = SettingsService; + $scope.$watch('settingsService.settings', function(value) { + $scope.settings = angular.copy(value); + }); $scope.codeMirrorConfig = { mode : 'css', lineNumbers : true @@ -356,8 +359,9 @@ module.controller('SettingsCtrl', function($scope, $location, SettingsService) { }); }; $scope.save = function() { + SettingsService.settings = $scope.settings; SettingsService.save(function() { - $location.path('/'); + window.location.href = window.location.href.substring(0, window.location.href.lastIndexOf('#')); }); }; }); \ No newline at end of file diff --git a/src/main/webapp/templates/settings.html b/src/main/webapp/templates/settings.html index 1e285510..16db3ac9 100644 --- a/src/main/webapp/templates/settings.html +++ b/src/main/webapp/templates/settings.html @@ -2,27 +2,29 @@