barisusakli 9 years ago
parent 4570edaf39
commit e1a13a807d

@ -4,7 +4,7 @@
$(document).ready(function() {
var env = utils.findBootstrapEnvironment();
setupNProgress();
setupTaskbar();
setupEditedByIcon();
@ -124,7 +124,7 @@ $(document).ready(function() {
'tolerance': 70,
'side': 'right'
});
if (env !== 'xs') {
slideout.disableTouch();
}
@ -180,8 +180,9 @@ $(document).ready(function() {
});
$('#menu [data-section="navigation"] ul').html($('#main-nav').html() + ($('#search-menu').html() || '') + ($('#logged-out-menu').html() || ''));
$('#menu [data-section="profile"] ul').html($('#user-control-list').html())
.find('[component="user/status"]').remove();
$('#user-control-list').children().clone(true, true).appendTo($('#menu [data-section="profile"] ul'));
$('#menu [data-section="profile"] ul').find('[component="user/status"]').remove();
socket.on('event:user_status_change', function(data) {
app.updateUserStatus($('#menu [component="user/status"]'), data.status);
@ -218,7 +219,7 @@ $(document).ready(function() {
if (parseInt(data.uid, 10) === 0) {
return false;
}
socket.emit('user.isFollowing', {uid: data.uid}, function(err, isFollowing) {
app.parseAndTranslate('modules/usercard', data, function(html) {
var card = $(html);
@ -226,7 +227,7 @@ $(document).ready(function() {
if (parseInt(app.user.uid, 10) === parseInt(data.uid, 10) || !app.user.uid) {
card.find('.btn-morph').hide();
} else {
} else {
setupFavouriteMorph(card, data.uid, data.username);
if (isFollowing) {
@ -260,7 +261,7 @@ $(document).ready(function() {
$(document).off('click', removeCard);
}
}
$(document).on('click', removeCard);
}

Loading…
Cancel
Save