fixed indentation of account.js

v1.18.x
Baris Usakli 12 years ago
parent 8c355c53cc
commit a32103efbe

@ -1,40 +1,40 @@
(function() { (function() {
var yourid = templates.get('yourid'), var yourid = templates.get('yourid'),
theirid = templates.get('theirid'), theirid = templates.get('theirid'),
isFollowing = templates.get('isFollowing'); isFollowing = templates.get('isFollowing');
$(document).ready(function() { $(document).ready(function() {
var rep = $('#reputation'); var rep = $('#reputation');
rep.html(app.addCommas(rep.html())); rep.html(app.addCommas(rep.html()));
var postcount = $('#postcount'); var postcount = $('#postcount');
postcount.html(app.addCommas(postcount.html())); postcount.html(app.addCommas(postcount.html()));
var editLink = $('#editLink'); var editLink = $('#editLink');
var followBtn = $('#follow-btn'); var followBtn = $('#follow-btn');
if( yourid !== theirid) { if( yourid !== theirid) {
editLink.hide(); editLink.hide();
if(isFollowing) if(isFollowing)
followBtn.hide(); followBtn.hide();
else else
followBtn.show(); followBtn.show();
} }
else { else {
followBtn.hide(); followBtn.hide();
} }
followBtn.on('click', function() { followBtn.on('click', function() {
$.post('/users/follow', {uid: theirid}, $.post('/users/follow', {uid: theirid},
function(data) { function(data) {
followBtn.remove(); followBtn.remove();
$('#user-action-alert').html('You are now following'+ $('.account-username').text() +'!').show(); $('#user-action-alert').html('You are now following'+ $('.account-username').text() +'!').show();
} }
); );
return false; return false;
}); });
}); });
}()); }());
Loading…
Cancel
Save