Skip to content

Node.js based forum software built for the modern web

closes #238

Baris Usakli2deb0e1708cd
diff --git a/public/src/forum/account.js b/public/src/forum/account.js
index 5818cae7b1..516d9196f3 100644
--- a/public/src/forum/account.js
+++ b/public/src/forum/account.js
@@ -6,7 +6,7 @@
$(document).ready(function() {
app.addCommasToNumbers();
-
+
var followBtn = $('#follow-btn');
var unfollowBtn = $('#unfollow-btn');
@@ -18,6 +18,9 @@
followBtn.show();
unfollowBtn.hide();
}
+ } else {
+ followBtn.hide();
+ unfollowBtn.hide();
}
followBtn.on('click', function() {
@@ -51,9 +54,9 @@
$('.user-recent-posts .topic-row').on('click', function() {
ajaxify.go($(this).attr('topic-url'));
});
-
+
var onlineStatus = $('.account-online-status');
-
+
function handleUserOnline(data) {
if(data.online) {
onlineStatus.find('span span').text('online');
diff --git a/public/src/forum/followers.js b/public/src/forum/followers.js
index 5e4ec7a00d..9093dcbd1e 100644
--- a/public/src/forum/followers.js
+++ b/public/src/forum/followers.js
@@ -5,14 +5,14 @@
followersCount = templates.get('followersCount');
$(document).ready(function() {
-
+
if(parseInt(followersCount, 10) === 0) {
- $('#no-followers-notice').show();
+ $('#no-followers-notice').removeClass('hide');
}
-
+
app.addCommasToNumbers();
-
+
});
-
+
}());
\ No newline at end of file
diff --git a/public/src/forum/following.js b/public/src/forum/following.js
index 836fc274ca..0353b72236 100644
--- a/public/src/forum/following.js
+++ b/public/src/forum/following.js
@@ -5,9 +5,9 @@
followingCount = templates.get('followingCount');
$(document).ready(function() {
-
+
if(parseInt(followingCount, 10) === 0) {
- $('#no-following-notice').show();
+ $('#no-following-notice').removeClass('hide');
}
@@ -18,7 +18,7 @@
$('.unfollow-btn').on('click',function() {
var unfollowBtn = $(this);
var followingUid = $(this).attr('followingUid');
-
+
socket.emit('api:user.unfollow', {uid: followingUid}, function(success) {
var username = unfollowBtn.attr('data-username');
if(success) {
@@ -34,6 +34,6 @@
app.addCommasToNumbers();
});
-
+
}());
\ No newline at end of file
diff --git a/public/templates/account.tpl b/public/templates/account.tpl
index 16e87313c6..aa9bfd8ccb 100644
--- a/public/templates/account.tpl
+++ b/public/templates/account.tpl
@@ -19,8 +19,8 @@
<span class="label label-danger">banned</span>
</div>
<div id="user-actions">
- <a id="follow-btn" href="#" class="btn hide">Follow</a>
- <a id="unfollow-btn" href="#" class="btn hide">Unfollow</a>
+ <a id="follow-btn" href="#" class="btn btn-default">Follow</a>
+ <a id="unfollow-btn" href="#" class="btn btn-default">Unfollow</a>
</div>
</div>
diff --git a/public/templates/following.tpl b/public/templates/following.tpl
index c713b7a6a6..cbdc3d7911 100644
--- a/public/templates/following.tpl
+++ b/public/templates/following.tpl
@@ -25,7 +25,7 @@
<span class='formatted-number'>{following.postcount}</span>
<i class='icon-pencil'></i>
</div>
- <a id="unfollow-btn" href="#" class="btn unfollow-btn" followingUid="{following.uid}" data-username="{following.username}">Unfollow</a>
+ <a id="unfollow-btn" href="#" class="btn btn-default unfollow-btn" followingUid="{following.uid}" data-username="{following.username}">Unfollow</a>
</div>
<!-- END following -->
</div>