reverted updateHeader code in footer.js to fix top bar after an image upload

v1.18.x
Baris Soner Usakli 12 years ago
parent 65b7af365a
commit 45dec91e1b

@ -35,19 +35,12 @@
socket.on('api:updateHeader', function(data) {
var rightMenu = $('#right-menu');
if (data.uid > 0) {
var userLabel = document.createElement('li'),
logoutEl = document.createElement('li');
var userLabel = rightMenu.find('#user_label');
userLabel.attr('href','/users/'+data['username']);
userLabel.find('img').attr('src',data['picture']+"?s=24&default=identicon");
userLabel.find('span').html(data['username']);
userLabel.innerHTML = '<a id="user_label" href="/users/' + data['username'] + '">' +
'<img src="' + data['picture'] + '?s=24&default=identicon"/>' +
'<span>' + data['username'] + '</span>' +
'</a>';
logoutEl.innerHTML = '<a href="/logout">Log out</a>';
rightMenu[0].appendChild(userLabel);
rightMenu[0].appendChild(logoutEl);
} else {
rightMenu.html('');

@ -66,6 +66,15 @@
<li><a href="#"><i class="icon-refresh icon-spin"></i> Loading Notifications</a></li>
</ul>
</li>
<li>
<a id="user_label" href="">
<img src=""/>
<span></span>
</a>
</li>
<li>
<a href="/logout">Log out</a>
</li>
</ul>
</div>
</div>

Loading…
Cancel
Save