From 2c8a5b5ff8ff0b2bb14559001af29e14139af46e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Jureti=C4=87?= Date: Mon, 16 Sep 2013 22:58:20 -0300 Subject: [PATCH 1/2] remove website in edit profile page works --- public/js/controllers/userCtrl.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/js/controllers/userCtrl.js b/public/js/controllers/userCtrl.js index a71867f0a8..1d01cc4888 100644 --- a/public/js/controllers/userCtrl.js +++ b/public/js/controllers/userCtrl.js @@ -17,5 +17,6 @@ habitrpg.controller("UserCtrl", ['$scope', '$location', 'User', } $scope.removeWebsite = function($index){ User.user.profile.websites.splice($index,1); + User.set('profile.websites', User.user.profile.websites); } }]); From daa06943abf7a11592c24c4c34bab9b30dca8bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Jureti=C4=87?= Date: Mon, 16 Sep 2013 22:59:08 -0300 Subject: [PATCH 2/2] fix user profile websites show/hide conditions --- views/options/profile.jade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/options/profile.jade b/views/options/profile.jade index 293e3c8e1f..8a280da0d1 100644 --- a/views/options/profile.jade +++ b/views/options/profile.jade @@ -55,11 +55,11 @@ //{{profile.profile.blurb | linky:'_blank'}} h4 Websites - ul(ng-show='profile.profile.websites') + ul(ng-show='profile.profile.websites.length > 0') // TODO let's remove links eventually, since we can do markdown on profiles li(ng-repeat='website in profile.profile.websites') a(target='_blank', ng-href='{{website}}') {{website}} - span.muted(ng-hide='profile.profile.websites') - None - + span.muted(ng-hide='profile.profile.websites.length > 0') - None - div.whatever-options(ng-show='_editing.profile') // TODO use photo-upload instead: https://groups.google.com/forum/?fromgroups=#!topic/derbyjs/xMmADvxBOak