From 0b34b41bbeb47019ba7cd5e814cb314be2bfde5e Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Sun, 8 Sep 2013 11:39:30 -0400 Subject: [PATCH] fix to toggle helm --- public/js/controllers/userAvatarCtrl.js | 3 +++ views/options/profile.jade | 2 +- views/static/front.jade | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/public/js/controllers/userAvatarCtrl.js b/public/js/controllers/userAvatarCtrl.js index c8f2a0b0a8..79ac6f082b 100644 --- a/public/js/controllers/userAvatarCtrl.js +++ b/public/js/controllers/userAvatarCtrl.js @@ -6,4 +6,7 @@ habitrpg.controller("UserAvatarCtrl", ['$scope', '$location', 'User', $scope.hideUserAvatar = function() { $(".userAvatar").hide(); }; + $scope.toggleHelm = function(val){ + User.log({op:'set', data:{'preferences.showHelm':val}}); + } }]); diff --git a/views/options/profile.jade b/views/options/profile.jade index 0fff087e07..664e819619 100644 --- a/views/options/profile.jade +++ b/views/options/profile.jade @@ -9,7 +9,7 @@ button.m_head_0.customize-option(type='button', ng-click='set("preferences.gender","m")') button.f_head_0.customize-option(type='button', ng-click='set("preferences.gender","f")') label.checkbox - input(type='checkbox', checked='{{user.preferences.showHelm}}') + input(type='checkbox', ng-model='user.preferences.showHelm', ng-change='toggleHelm(user.preferences.showHelm)') | Show Helm // hair li.customize-menu diff --git a/views/static/front.jade b/views/static/front.jade index 3d6d3dea81..091e2f83b7 100644 --- a/views/static/front.jade +++ b/views/static/front.jade @@ -4,7 +4,7 @@ block vars - var layoutEnv = env block title - title HabitRPG | Gamify Your Life + title HabitRPG | Gamify Your Life block content div(ng-app='habitrpg')