Browse Source

Make sure that settings are saved on reload.

pull/32/head
Simon Eisenmann 12 years ago
parent
commit
3aeca7069e
  1. 9
      static/js/directives/settings.js

9
static/js/directives/settings.js

@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
define(['underscore', 'text!partials/settings.html'], function(_, template) { define(['jquery', 'underscore', 'text!partials/settings.html'], function($, _, template) {
return ["$compile", "mediaStream", function($compile, mediaStream) { return ["$compile", "mediaStream", function($compile, mediaStream) {
@ -50,6 +50,13 @@ define(['underscore', 'text!partials/settings.html'], function(_, template) {
var localStream = null; var localStream = null;
// Make sure to save settings when they are open and the page is reloaded.
$(window).on("unload", function() {
if ($scope.layout.settings) {
$scope.saveSettings();
}
});
$scope.saveSettings = function() { $scope.saveSettings = function() {
var user = $scope.user; var user = $scope.user;
$scope.update(user); $scope.update(user);

Loading…
Cancel
Save