Преглед изворни кода

Merge branch 'master' of https://github.com/Musare/Musare

Wesley McCann пре 9 година
родитељ
комит
4a080e216f
2 измењених фајлова са 4 додато и 4 уклоњено
  1. 3 3
      app/client/client.js
  2. 1 1
      app/client/templates/header.html

+ 3 - 3
app/client/client.js

@@ -347,9 +347,6 @@ Handlebars.registerHelper('active', function(path) {
 });
 
 Template.header.helpers({
-    currentUser: function() {
-        return Meteor.user();
-    },
     userId: function() {
         return Meteor.userId();
     }
@@ -362,6 +359,9 @@ Template.header.events({
         if (hpSound !== undefined) {
             hpSound.stop();
         }
+    },
+    "click #profile": function(){
+        window.location = "/u/" + Meteor.user().profile.username;
     }
 });
 

+ 1 - 1
app/client/templates/header.html

@@ -26,7 +26,7 @@
                     <li class="dropdown">
                       <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{> avatar userId=userId shape="circle" size="header" class="header-avatar" initials=initials}} {{currentUser.profile.username}} <span class="caret"></span></a>
                         <ul class="dropdown-menu" id="header-dropdown">
-                            <li><a href="/u/{{currentUser.profile.username}}">Profile</a></li>
+                            <li><a id="profile">Profile</a></li>
                             <li><a href="/settings">Settings</a></li>
                             <li role="separator" class="divider"></li>
                             <li><a class="logout" href="#">Logout</a></li>