Skip to content

Node.js based forum software built for the modern web

fixed indents

Baris Usakli93097228984d
diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js
index d5daa8d907..a56ac7611d 100644
--- a/public/src/ajaxify.js
+++ b/public/src/ajaxify.js
@@ -103,9 +103,9 @@ var ajaxify = {};
function evalScript(elem) {
var data = (elem.text || elem.textContent || elem.innerHTML || "" ),
- head = document.getElementsByTagName("head")[0] ||
- document.documentElement,
- script = document.createElement("script");
+ head = document.getElementsByTagName("head")[0] ||
+ document.documentElement,
+ script = document.createElement("script");
script.type = "text/javascript";
try {
diff --git a/public/src/app.js b/public/src/app.js
index 3cb7d0aece..274f3d7c3f 100644
--- a/public/src/app.js
+++ b/public/src/app.js
@@ -82,10 +82,10 @@ var socket,
// takes a string like 1000 and returns 1,000
app.addCommas = function(text) {
- return text.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
- }
+ return text.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
+ }
- // Willingly stolen from: http://phpjs.org/functions/strip_tags/
+ // Willingly stolen from: http://phpjs.org/functions/strip_tags/
app.strip_tags = function(input, allowed) {
allowed = (((allowed || "") + "").toLowerCase().match(/<[a-z][a-z0-9]*>/g) || []).join(''); // making sure the allowed arg is a string containing only tags in lowercase (<a><b><c>)
var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,
diff --git a/public/src/forum/accountedit.js b/public/src/forum/accountedit.js
index 817074ea9e..191eee262c 100644
--- a/public/src/forum/accountedit.js
+++ b/public/src/forum/accountedit.js
@@ -7,8 +7,8 @@ $(document).ready(function() {
- $('#uploadForm').submit(function() {
- status('uploading the file ...');
+ $('#uploadForm').submit(function() {
+ status('uploading the file ...');
$('#upload-progress-bar').css('width', '0%');
$('#upload-progress-box').show();
@@ -18,16 +18,16 @@ $(document).ready(function() {
return false;
}
- $(this).ajaxSubmit({
+ $(this).ajaxSubmit({
error: function(xhr) {
error('Error: ' + xhr.status);
},
-
- uploadProgress : function(event, position, total, percent) {
- $('#upload-progress-bar').css('width', percent+'%');
- },
-
+
+ uploadProgress : function(event, position, total, percent) {
+ $('#upload-progress-bar').css('width', percent+'%');
+ },
+
success: function(response) {
if(response.error) {
@@ -36,166 +36,166 @@ $(document).ready(function() {
}
var imageUrlOnServer = response.path;
-
- $('#user-current-picture').attr('src', imageUrlOnServer);
- $('#user-uploaded-picture').attr('src', imageUrlOnServer);
-
+
+ $('#user-current-picture').attr('src', imageUrlOnServer);
+ $('#user-uploaded-picture').attr('src', imageUrlOnServer);
+
uploadedPicture = imageUrlOnServer;
-
+
setTimeout(function() {
hideAlerts();
- $('#upload-picture-modal').modal('hide');
+ $('#upload-picture-modal').modal('hide');
}, 750);
-
+
socket.emit('api:updateHeader', { fields: ['username', 'picture'] });
success('File uploaded successfully!');
- }
+ }
});
return false;
- });
+ });
- function hideAlerts() {
- $('#alert-status').hide();
+ function hideAlerts() {
+ $('#alert-status').hide();
$('#alert-success').hide();
$('#alert-error').hide();
$('#upload-progress-box').hide();
- }
+ }
- function status(message) {
- hideAlerts();
+ function status(message) {
+ hideAlerts();
$('#alert-status').text(message).show();
- }
-
- function success(message) {
- hideAlerts();
+ }
+
+ function success(message) {
+ hideAlerts();
$('#alert-success').text(message).show();
- }
-
- function error(message) {
- hideAlerts();
+ }
+
+ function error(message) {
+ hideAlerts();
$('#alert-error').text(message).show();
- }
+ }
function changeUserPicture(type) {
var userData = {
- uid: $('#inputUID').val(),
+ uid: $('#inputUID').val(),
type: type,
_csrf:$('#csrf_token').val()
- };
-
+ };
+
$.post('/users/changepicture',
- userData,
- function(data) {
- socket.emit('api:updateHeader', { fields: ['username', 'picture'] });
- }
+ userData,
+ function(data) {
+ socket.emit('api:updateHeader', { fields: ['username', 'picture'] });
+ }
);
}
-
+
var selectedImageType = '';
-
- $('#submitBtn').on('click',function(){
-
- var userData = {
- uid:$('#inputUID').val(),
- email:$('#inputEmail').val(),
- fullname:$('#inputFullname').val(),
- website:$('#inputWebsite').val(),
- birthday:$('#inputBirthday').val(),
- location:$('#inputLocation').val(),
- signature:$('#inputSignature').val(),
- _csrf:$('#csrf_token').val()
- };
-
+
+ $('#submitBtn').on('click',function(){
+
+ var userData = {
+ uid:$('#inputUID').val(),
+ email:$('#inputEmail').val(),
+ fullname:$('#inputFullname').val(),
+ website:$('#inputWebsite').val(),
+ birthday:$('#inputBirthday').val(),
+ location:$('#inputLocation').val(),
+ signature:$('#inputSignature').val(),
+ _csrf:$('#csrf_token').val()
+ };
+
$.post('/users/doedit',
- userData,
- function(data) {
- if(data.error) {
- app.alert({
- 'alert_id': 'user_profile_updated',
- type: 'error',
- title: 'Profile Update Error',
- message: data.error,
- timeout: 2000
- });
- return;
- }
-
+ userData,
+ function(data) {
+ if(data.error) {
+ app.alert({
+ 'alert_id': 'user_profile_updated',
+ type: 'error',
+ title: 'Profile Update Error',
+ message: data.error,
+ timeout: 2000
+ });
+ return;
+ }
+
app.alert({
- 'alert_id': 'user_profile_updated',
- type: 'success',
- title: 'Profile Updated',
- message: 'Your profile has been updated successfully',
- timeout: 2000
- });
- }
+ 'alert_id': 'user_profile_updated',
+ type: 'success',
+ title: 'Profile Updated',
+ message: 'Your profile has been updated successfully',
+ timeout: 2000
+ });
+ }
);
return false;
- });
-
- function updateImages() {
+ });
+
+ function updateImages() {
var currentPicture = $('#user-current-picture').attr('src');
if(gravatarPicture) {
- $('#user-gravatar-picture').attr('src', gravatarPicture);
- $('#gravatar-box').show();
- }
- else
- $('#gravatar-box').hide();
+ $('#user-gravatar-picture').attr('src', gravatarPicture);
+ $('#gravatar-box').show();
+ }
+ else
+ $('#gravatar-box').hide();
- if(uploadedPicture) {
- $('#user-uploaded-picture').attr('src', uploadedPicture);
- $('#uploaded-box').show();
- }
- else
- $('#uploaded-box').hide();
-
-
- if(currentPicture == gravatarPicture)
- $('#gravatar-box .icon-ok').show();
+ if(uploadedPicture) {
+ $('#user-uploaded-picture').attr('src', uploadedPicture);
+ $('#uploaded-box').show();
+ }
+ else
+ $('#uploaded-box').hide();
+
+
+ if(currentPicture == gravatarPicture)
+ $('#gravatar-box .icon-ok').show();
else
- $('#gravatar-box .icon-ok').hide();
-
- if(currentPicture == uploadedPicture)
- $('#uploaded-box .icon-ok').show();
+ $('#gravatar-box .icon-ok').hide();
+
+ if(currentPicture == uploadedPicture)
+ $('#uploaded-box .icon-ok').show();
else
- $('#uploaded-box .icon-ok').hide();
- }
-
-
- $('#changePictureBtn').on('click', function() {
+ $('#uploaded-box .icon-ok').hide();
+ }
+
+
+ $('#changePictureBtn').on('click', function() {
selectedImageType = '';
updateImages();
-
- $('#change-picture-modal').modal('show');
-
- return false;
- });
-
- $('#gravatar-box').on('click', function(){
+
+ $('#change-picture-modal').modal('show');
+
+ return false;
+ });
+
+ $('#gravatar-box').on('click', function(){
$('#gravatar-box .icon-ok').show();
- $('#uploaded-box .icon-ok').hide();
- selectedImageType = 'gravatar';
+ $('#uploaded-box .icon-ok').hide();
+ selectedImageType = 'gravatar';
});
$('#uploaded-box').on('click', function(){
$('#gravatar-box .icon-ok').hide();
- $('#uploaded-box .icon-ok').show();
- selectedImageType = 'uploaded';
+ $('#uploaded-box .icon-ok').show();
+ selectedImageType = 'uploaded';
});
$('#savePictureChangesBtn').on('click', function() {
- $('#change-picture-modal').modal('hide');
+ $('#change-picture-modal').modal('hide');
- if(selectedImageType) {
- changeUserPicture(selectedImageType);
-
- if(selectedImageType == 'gravatar')
- $('#user-current-picture').attr('src', gravatarPicture);
+ if(selectedImageType) {
+ changeUserPicture(selectedImageType);
+
+ if(selectedImageType == 'gravatar')
+ $('#user-current-picture').attr('src', gravatarPicture);
else if(selectedImageType == 'uploaded')
- $('#user-current-picture').attr('src', uploadedPicture);
- }
-
+ $('#user-current-picture').attr('src', uploadedPicture);
+ }
+
});
$('#upload-picture-modal').on('hide', function() {
@@ -204,17 +204,17 @@ $(document).ready(function() {
$('#uploadPictureBtn').on('click', function(){
- $('#change-picture-modal').modal('hide');
- $('#upload-picture-modal').modal('show');
+ $('#change-picture-modal').modal('hide');
+ $('#upload-picture-modal').modal('show');
- hideAlerts();
-
- return false;
+ hideAlerts();
+
+ return false;
});
$('#pictureUploadSubmitBtn').on('click', function() {
$('#uploadForm').submit();
});
-
-
+
+
});
\ No newline at end of file
diff --git a/public/src/forum/followers.js b/public/src/forum/followers.js
index ee7e019562..d5457858cc 100644
--- a/public/src/forum/followers.js
+++ b/public/src/forum/followers.js
@@ -4,26 +4,26 @@
theirid = templates.get('theirid'),
followersCount = templates.get('followersCount');
- $(document).ready(function() {
-
- if(parseInt(followersCount, 10) === 0) {
- $('#no-followers-notice').show();
- }
- var editLink = $('#editLink');
+ $(document).ready(function() {
+
+ if(parseInt(followersCount, 10) === 0) {
+ $('#no-followers-notice').show();
+ }
+ var editLink = $('#editLink');
if(yourid !== theirid) {
editLink.hide();
}
- $('.reputation').each(function(index, element) {
- $(element).html(app.addCommas($(element).html()));
- });
-
- $('.postcount').each(function(index, element) {
- $(element).html(app.addCommas($(element).html()));
- });
-
- });
-
+ $('.reputation').each(function(index, element) {
+ $(element).html(app.addCommas($(element).html()));
+ });
+
+ $('.postcount').each(function(index, element) {
+ $(element).html(app.addCommas($(element).html()));
+ });
+
+ });
+
}());
\ No newline at end of file
diff --git a/public/src/forum/following.js b/public/src/forum/following.js
index 4727696c92..d4b30fada6 100644
--- a/public/src/forum/following.js
+++ b/public/src/forum/following.js
@@ -4,12 +4,12 @@
theirid = templates.get('theirid'),
followingCount = templates.get('followingCount');
- $(document).ready(function() {
-
- if(parseInt(followingCount, 10) === 0) {
- $('#no-following-notice').show();
- }
- var editLink = $('#editLink');
+ $(document).ready(function() {
+
+ if(parseInt(followingCount, 10) === 0) {
+ $('#no-following-notice').show();
+ }
+ var editLink = $('#editLink');
if(yourid !== theirid) {
editLink.hide();
@@ -22,23 +22,23 @@
var followingUid = $(this).attr('followingUid');
$.post('/users/unfollow', {uid: followingUid, _csrf:$('#csrf_token').val()},
- function(data) {
- removeBtn.parent().remove();
+ function(data) {
+ removeBtn.parent().remove();
}
);
return false;
});
}
- $('.reputation').each(function(index, element) {
- $(element).html(app.addCommas($(element).html()));
- });
-
- $('.postcount').each(function(index, element) {
- $(element).html(app.addCommas($(element).html()));
- });
-
- });
-
+ $('.reputation').each(function(index, element) {
+ $(element).html(app.addCommas($(element).html()));
+ });
+
+ $('.postcount').each(function(index, element) {
+ $(element).html(app.addCommas($(element).html()));
+ });
+
+ });
+
}());
\ No newline at end of file
diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js
index ee51215675..7dddd0aa03 100644
--- a/public/src/forum/topic.js
+++ b/public/src/forum/topic.js
@@ -12,8 +12,8 @@
function addCommasToNumbers() {
$('.formatted-number').each(function(index, element) {
- $(element).html(app.addCommas($(element).html()));
- });
+ $(element).html(app.addCommas($(element).html()));
+ });
}
jQuery('document').ready(function() {
diff --git a/public/src/forum/users.js b/public/src/forum/users.js
index 3b33869b02..36c34e58d7 100644
--- a/public/src/forum/users.js
+++ b/public/src/forum/users.js
@@ -1,15 +1,15 @@
(function() {
- $(document).ready(function() {
-
- $('.reputation').each(function(index, element) {
- $(element).html(app.addCommas($(element).html()));
- });
-
- $('.postcount').each(function(index, element) {
- $(element).html(app.addCommas($(element).html()));
- });
-
- });
+ $(document).ready(function() {
+
+ $('.reputation').each(function(index, element) {
+ $(element).html(app.addCommas($(element).html()));
+ });
+
+ $('.postcount').each(function(index, element) {
+ $(element).html(app.addCommas($(element).html()));
+ });
+
+ });
}());
\ No newline at end of file
diff --git a/public/src/modules/chat.js b/public/src/modules/chat.js
index 7a103d56aa..f633c55d82 100644
--- a/public/src/modules/chat.js
+++ b/public/src/modules/chat.js
@@ -8,7 +8,7 @@ define(['taskbar'], function(taskbar) {
$('.modal').each(function() {
var thisZ = parseInt($(this).css('zIndex'), 10);
if (thisZ > topZ) {
- topZ = thisZ;
+ topZ = thisZ;
}
});
chatModal.css('zIndex', topZ+1);
@@ -88,7 +88,7 @@ define(['taskbar'], function(taskbar) {
var chatContent = chatModal.find('#chat-content');
chatContent.append(message);
chatContent.scrollTop(
- chatContent[0].scrollHeight - chatContent.height()
+ chatContent[0].scrollHeight - chatContent.height()
);
}
diff --git a/public/src/utils.js b/public/src/utils.js
index 405a708b18..54988afe60 100644
--- a/public/src/utils.js
+++ b/public/src/utils.js
@@ -20,10 +20,10 @@
var main_dir = global.configuration.ROOT_DIRECTORY + '/public/templates/';
var results = [];
fs.readdir(dir, function(err, list) {
- if (err) return done(err);
- var pending = list.length;
- if (!pending) return done(null, results);
- list.forEach(function(file) {
+ if (err) return done(err);
+ var pending = list.length;
+ if (!pending) return done(null, results);
+ list.forEach(function(file) {
file = dir + '/' + file;
fs.stat(file, function(err, stat) {
if (stat && stat.isDirectory()) {
@@ -34,7 +34,7 @@
} else {
results.push(file.replace(main_dir, '').replace('.tpl', ''));
if (!--pending) done(null, results);
- }
+ }
});
});
});
diff --git a/public/templates/account.tpl b/public/templates/account.tpl
index f29a6b59de..7913a53a90 100644
--- a/public/templates/account.tpl
+++ b/public/templates/account.tpl
@@ -30,20 +30,20 @@
<br/>
<span class="account-bio-label">full name</span>
- <span>{fullname}</span>
- <br/>
-
- <span class="account-bio-label">website</span>
- <span><a href="{website}">{website}</a></span>
- <br/>
+ <span>{fullname}</span>
+ <br/>
+
+ <span class="account-bio-label">website</span>
+ <span><a href="{website}">{website}</a></span>
+ <br/>
<span class="account-bio-label">location</span>
- <span>{location}</span>
- <br/>
-
- <span class="account-bio-label">age</span>
- <span>{age}</span>
- <br/>
+ <span>{location}</span>
+ <br/>
+
+ <span class="account-bio-label">age</span>
+ <span>{age}</span>
+ <br/>
<hr/>
<span class="account-bio-label">member for</span>
<span>{joindate}</span>
diff --git a/public/templates/accountedit.tpl b/public/templates/accountedit.tpl
index 63efebca48..3dfe7850f9 100644
--- a/public/templates/accountedit.tpl
+++ b/public/templates/accountedit.tpl
@@ -1,66 +1,65 @@
<div class="well">
-
-
+
<!-- Change Picture Modal -->
<div id="change-picture-modal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h3 id="myModalLabel">Change Picture</h3>
- </div>
- <div class="modal-body">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h3 id="myModalLabel">Change Picture</h3>
+ </div>
+ <div class="modal-body">
+
+ <div id="gravatar-box">
+ <img id="user-gravatar-picture" src="" class="img-polaroid user-profile-picture">
+ <span class="user-picture-label">Gravatar</span>
+ <i class='icon-ok icon-2x'></i>
+ </div>
+ <br/>
+ <div id="uploaded-box">
+ <img id="user-uploaded-picture" src="" class="img-polaroid user-profile-picture">
+ <span class="user-picture-label">Uploaded picture</span>
+ <i class='icon-ok icon-2x'></i>
+ </div>
+
+ <a id="uploadPictureBtn" href="#">Upload new picture</a>
+
+ </div>
- <div id="gravatar-box">
- <img id="user-gravatar-picture" src="" class="img-polaroid user-profile-picture">
- <span class="user-picture-label">Gravatar</span>
- <i class='icon-ok icon-2x'></i>
- </div>
- <br/>
- <div id="uploaded-box">
- <img id="user-uploaded-picture" src="" class="img-polaroid user-profile-picture">
- <span class="user-picture-label">Uploaded picture</span>
- <i class='icon-ok icon-2x'></i>
- </div>
-
- <a id="uploadPictureBtn" href="#">Upload new picture</a>
-
- </div>
- <div class="modal-footer">
- <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
- <button id="savePictureChangesBtn" class="btn btn-primary">Save changes</button>
- </div>
+ <div class="modal-footer">
+ <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
+ <button id="savePictureChangesBtn" class="btn btn-primary">Save changes</button>
+ </div>
</div>
-
<!-- Upload picture modal-->
<div id="upload-picture-modal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h3 id="myModalLabel">Upload Picture</h3>
- </div>
- <div class="modal-body">
-
- <form id="uploadForm" action="/users/uploadpicture" method="post" enctype="multipart/form-data">
- <input id="userPhotoInput" type="file" name="userPhoto" >
- </form>
-
- <div id="upload-progress-box" class="progress progress-striped active hide">
- <div id="upload-progress-bar" class="bar" style="width: 0%;"></div>
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h3 id="myModalLabel">Upload Picture</h3>
+ </div>
+ <div class="modal-body">
+
+ <form id="uploadForm" action="/users/uploadpicture" method="post" enctype="multipart/form-data">
+ <input id="userPhotoInput" type="file" name="userPhoto" >
+ </form>
+
+ <div id="upload-progress-box" class="progress progress-striped active hide">
+ <div id="upload-progress-bar" class="bar" style="width: 0%;"></div>
+ </div>
+
+ <div id="alert-status" class="alert hide"></div>
+ <div id="alert-success" class="alert alert-success hide"></div>
+ <div id="alert-error" class="alert alert-error hide"></div>
+
+ </div>
+ <div class="modal-footer">
+ <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
+ <button id="pictureUploadSubmitBtn" class="btn btn-primary">Upload Picture</button>
</div>
-
- <div id="alert-status" class="alert hide"></div>
- <div id="alert-success" class="alert alert-success hide"></div>
- <div id="alert-error" class="alert alert-error hide"></div>
-
- </div>
- <div class="modal-footer">
- <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
- <button id="pictureUploadSubmitBtn" class="btn btn-primary">Upload Picture</button>
- </div>
</div>
-
- <div class="account-username-box">
+
+ <div class="account-username-box">
<span class="account-username">
<a href="/users/{username}">{username}</a> >
<a href="/users/{username}/edit">edit</a>
@@ -74,68 +73,68 @@
<div class="row-fluid">
<div class="span3" style="text-align: center; margin-bottom:20px;">
- <div class="account-picture-block text-center">
- <img id="user-current-picture" class="user-profile-picture" src="{picture}" /><br/>
- <a id="changePictureBtn" href="#" class="btn btn-primary">change picture</a>
- </div>
+ <div class="account-picture-block text-center">
+ <img id="user-current-picture" class="user-profile-picture" src="{picture}" /><br/>
+ <a id="changePictureBtn" href="#" class="btn btn-primary">change picture</a>
+ </div>
</div>
-
+
<div class="span9">
- <div class="inline-block">
+ <div class="inline-block">
<form class='form-horizontal'>
- <div class="control-group">
- <label class="control-label" for="inputEmail">Email</label>
- <div class="controls">
- <input type="text" id="inputEmail" placeholder="Email" value="{email}">
- </div>
- </div>
-
- <div class="control-group">
- <label class="control-label" for="inputFullname">Full Name</label>
- <div class="controls">
- <input type="text" id="inputFullname" placeholder="Full Name" value="{fullname}">
- </div>
- </div>
-
- <div class="control-group">
- <label class="control-label" for="inputWebsite">Website</label>
- <div class="controls">
- <input type="text" id="inputWebsite" placeholder="http://website.com" value="{website}">
- </div>
- </div>
+ <div class="control-group">
+ <label class="control-label" for="inputEmail">Email</label>
+ <div class="controls">
+ <input type="text" id="inputEmail" placeholder="Email" value="{email}">
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="inputFullname">Full Name</label>
+ <div class="controls">
+ <input type="text" id="inputFullname" placeholder="Full Name" value="{fullname}">
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="inputWebsite">Website</label>
+ <div class="controls">
+ <input type="text" id="inputWebsite" placeholder="http://website.com" value="{website}">
+ </div>
+ </div>
- <div class="control-group">
- <label class="control-label" for="inputLocation">Location</label>
- <div class="controls">
- <input type="text" id="inputLocation" placeholder="Location" value="{location}">
- </div>
- </div>
+ <div class="control-group">
+ <label class="control-label" for="inputLocation">Location</label>
+ <div class="controls">
+ <input type="text" id="inputLocation" placeholder="Location" value="{location}">
+ </div>
+ </div>
- <div class="control-group">
- <label class="control-label" for="inputBirthday">Birthday</label>
- <div class="controls">
- <input type="date" id="inputBirthday" placeholder="mm/dd/yyyy" value="{birthday}">
- </div>
- </div>
+ <div class="control-group">
+ <label class="control-label" for="inputBirthday">Birthday</label>
+ <div class="controls">
+ <input type="date" id="inputBirthday" placeholder="mm/dd/yyyy" value="{birthday}">
+ </div>
+ </div>
- <div class="control-group">
- <label class="control-label" for="inputSignature">Signature</label>
- <div class="controls">
- <textarea id="inputSignature" placeholder="max 150 chars" rows="5">{signature}</textarea>
- </div>
- </div>
+ <div class="control-group">
+ <label class="control-label" for="inputSignature">Signature</label>
+ <div class="controls">
+ <textarea id="inputSignature" placeholder="max 150 chars" rows="5">{signature}</textarea>
+ </div>
+ </div>
- <input type="hidden" id="inputUID" value="{uid}">
+ <input type="hidden" id="inputUID" value="{uid}">
- <div class="form-actions">
- <a id="submitBtn" href="#" class="btn btn-primary">Save changes</a>
- <a href="/users/{username}" class="btn">Cancel</a>
- </div>
+ <div class="form-actions">
+ <a id="submitBtn" href="#" class="btn btn-primary">Save changes</a>
+ <a href="/users/{username}" class="btn">Cancel</a>
+ </div>
</form>
- </div>
- </div>
- </div>
+ </div>
+ </div>
+ </div>
</div>
<input type="hidden" template-variable="gravatarpicture" value="{gravatarpicture}" />
diff --git a/public/templates/admin/categories.tpl b/public/templates/admin/categories.tpl
index d1f6dd8ed4..0caf3eec9d 100644
--- a/public/templates/admin/categories.tpl
+++ b/public/templates/admin/categories.tpl
@@ -8,7 +8,7 @@
</ul>
-
+
<div class="row-fluid admin-categories">
<ul class="span12" id="entry-container">
<!-- BEGIN categories -->
diff --git a/public/templates/admin/header.tpl b/public/templates/admin/header.tpl
index 35c8421491..7e1cad357b 100644
--- a/public/templates/admin/header.tpl
+++ b/public/templates/admin/header.tpl
@@ -39,11 +39,11 @@
<div class="nav-collapse collapse">
<ul class="nav">
<li>
- <a href="/admin/index"><i class="icon-home"></i> Home</a>
- </li>
- <li>
- <a href="/admin/settings"><i class="icon-cogs"></i> Settings</a>
- </li>
+ <a href="/admin/index"><i class="icon-home"></i> Home</a>
+ </li>
+ <li>
+ <a href="/admin/settings"><i class="icon-cogs"></i> Settings</a>
+ </li>
</ul>
<ul class="nav pull-right" id="right-menu">
<li><a href="/users" id="user_label"></a></li>
diff --git a/public/templates/following.tpl b/public/templates/following.tpl
index ac0c3ff4b5..66fc5c57e1 100644
--- a/public/templates/following.tpl
+++ b/public/templates/following.tpl
@@ -16,15 +16,15 @@
</div>
<div>
- <!-- BEGIN following -->
+ <!-- BEGIN following -->
- <div class="users-box well">
- <a href="/users/{following.username}">
- <img src="{following.picture}" class="user-8080-picture"/>
- </a>
- <br/>
+ <div class="users-box well">
+ <a href="/users/{following.username}">
+ <img src="{following.picture}" class="user-8080-picture"/>
+ </a>
+ <br/>
<a href="/users/{following.username}">{following.username}</a>
- <br/>
+ <br/>
<div title="reputation">
<span class='reputation'>{following.reputation}</span>
<i class='icon-star'></i>
diff --git a/public/templates/header.tpl b/public/templates/header.tpl
index 10dd6dab26..96f1c086bb 100644
--- a/public/templates/header.tpl
+++ b/public/templates/header.tpl
@@ -71,29 +71,29 @@
</div>
</div>
</div>
-
+
<div id="disconnect-modal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-header">
- <h3 id="myModalLabel">Socket Disconnect</h3>
- </div>
- <div class="modal-body">
- <span id="disconnect-text">Looks like you disconnected, try reloading the page.</span>
- </div>
- <div class="modal-footer">
- <a id="reload-button" href="/" class="btn btn-primary">Reload</a>
- </div>
+ <div class="modal-header">
+ <h3 id="myModalLabel">Socket Disconnect</h3>
+ </div>
+ <div class="modal-body">
+ <span id="disconnect-text">Looks like you disconnected, try reloading the page.</span>
+ </div>
+ <div class="modal-footer">
+ <a id="reload-button" href="/" class="btn btn-primary">Reload</a>
+ </div>
</div>
<div id="chat-modal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h3 id="myModalLabel">Chat with <span id="chat-with-name"></span></h3>
- </div>
- <div class="modal-body">
- <textarea id="chat-content" cols="40" rows="10" readonly></textarea><br/>
- <input id="chat-message-input" type="text" name="chat-message" placeholder="type chat message here press enter to send"/><br/>
- <button type="button" id="chat-message-send-btn" href="#" class="btn btn-primary">Send</button>
- </div>
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+ <h3 id="myModalLabel">Chat with <span id="chat-with-name"></span></h3>
+ </div>
+ <div class="modal-body">
+ <textarea id="chat-content" cols="40" rows="10" readonly></textarea><br/>
+ <input id="chat-message-input" type="text" name="chat-message" placeholder="type chat message here press enter to send"/><br/>
+ <button type="button" id="chat-message-send-btn" href="#" class="btn btn-primary">Send</button>
+ </div>
</div>
<div id="alert_window"></div>
diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl
index f6c4d34333..63f88a2e88 100644
--- a/public/templates/topic.tpl
+++ b/public/templates/topic.tpl
@@ -12,7 +12,7 @@
<!-- BEGIN main_posts -->
- <a name="{main_posts.pid}"></a>
+ <a name="{main_posts.pid}"></a>
<li class="row post-row main-post" data-pid="{main_posts.pid}" data-uid="{main_posts.uid}" data-deleted="{main_posts.deleted}">
<div class="span12">
<div class="post-block">
diff --git a/public/templates/users.tpl b/public/templates/users.tpl
index 65d64dad22..66e2120d01 100644
--- a/public/templates/users.tpl
+++ b/public/templates/users.tpl
@@ -1,13 +1,13 @@
<h1>Users</h1>
<div>
- <!-- BEGIN users -->
- <div class="users-box well">
- <a href="/users/{users.username}">
- <img src="{users.picture}" class="user-8080-picture"/>
- </a>
- <br/>
+ <!-- BEGIN users -->
+ <div class="users-box well">
+ <a href="/users/{users.username}">
+ <img src="{users.picture}" class="user-8080-picture"/>
+ </a>
+ <br/>
<a href="/users/{users.username}">{users.username}</a>
- <br/>
+ <br/>
<div title="reputation">
<span class='reputation'>{users.reputation}</span>
<i class='icon-star'></i>
diff --git a/src/webserver.js b/src/webserver.js
index 66eb93ae9a..aa56536f5d 100644
--- a/src/webserver.js
+++ b/src/webserver.js
@@ -3,7 +3,7 @@ var express = require('express'),
server = require('http').createServer(WebServer),
RedisStore = require('connect-redis')(express),
path = require('path'),
- redis = require('redis'),
+ redis = require('redis'),
redisServer = redis.createClient(global.config.redis.port, global.config.redis.host),
marked = require('marked'),
utils = require('../public/src/utils.js'),