Merge branch 'master' of github.com:psychobunny/node-forum

v1.18.x
Julian Lam 12 years ago
commit 1b63207920

@ -691,4 +691,12 @@ a:hover {
text-overflow:ellipsis;
overflow: hidden;
}
}
body .navbar .nodebb-inline-block {
display:inline-block;
}
#right-menu{
float:right;
}

@ -33,11 +33,13 @@ var socket,
});
socket.on('disconnect', function(data){
$('#disconnect-modal').modal('show');
$('#reload-button').on('click',function(){
$('#disconnect-modal').modal('hide');
window.location.reload();
});
setTimeout(function() {
$('#disconnect-modal').modal('show');
$('#reload-button').on('click',function(){
$('#disconnect-modal').modal('hide');
window.location.reload();
});
}, 500);
});
},
async: false
@ -243,12 +245,24 @@ var socket,
};
app.edit_post = function(pid) {
var content = document.getElementById('post_content');
socket.emit('api:posts.edit', { pid: pid, content: content.value });
var content = $('#post_content');
if (content.val().length < 5) {
app.alert({
title: 'Topic Post Failure',
message: 'You need to write more dude.',
type: 'error',
timeout: 2000
});
return;
}
socket.emit('api:posts.edit', { pid: pid, content: content.val() });
jQuery(post_window).slideUp(250);
$(document.body).removeClass('composing');
content.value = '';
content.val('');
}

@ -28,7 +28,7 @@
<span class="icon-bar"></span>
</button>
<div class="nav-collapse collapse">
<ul class="nav">
<ul class="nav nodebb-inline-block">
<li>
<a href="/latest">Recent <span class="badge badge-inverse">3</span></a>
</li>
@ -42,7 +42,7 @@
<a href="/users">Users</a>
</li>
</ul>
<ul class="nav pull-right" id="right-menu">
<ul class="nav pull-right nodebb-inline-block nodebb-pull-right" id="right-menu">
<!--<li><i class="icon-plus icon-2x" style="color:#999;"></i></li> fail. add this back later -->
<!--<li><a href="/users" id="user_label"></a></li>-->
</ul>
@ -79,7 +79,7 @@
</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>

@ -57,7 +57,7 @@
<a href="/users/{posts.username}">
<img src="{posts.gravatar}?s=80" align="left" />
</a>
<i class="icon-star"></i><span class="user_rep_{posts.uid} user_reputation_text">{posts.user_rep}</span>
<i class="icon-star"></i><span class="user_rep_{posts.uid} formatted-number">{posts.user_rep}</span>
</div>
<div class="span11">
<div class="post-block">
@ -124,12 +124,16 @@
pinned: '{pinned}'
};
jQuery('document').ready(function() {
$('.user_reputation_text').each(function(index, element) {
function addCommasToNumbers() {
$('.formatted-number').each(function(index, element) {
$(element).html(app.addCommas($(element).html()));
});
}
jQuery('document').ready(function() {
addCommasToNumbers();
var room = 'topic_' + '{topic_id}',
adminTools = document.getElementById('thread-tools');

@ -90,6 +90,7 @@ var config = require('../config.js'),
if(key === 'email') {
User.setUserField(uid, 'gravatarpicture', User.createGravatarURLFromEmail(data[key]));
RDB.set('email:' + email +':uid', uid);
}
}
}
@ -276,7 +277,7 @@ var config = require('../config.js'),
});
RDB.set('username:' + username + ':uid', uid);
RDB.set('email:' + email +':uid', uid);
RDB.set('email:' + email +':uid', uid);
if(email)
User.sendConfirmationEmail(email);

Loading…
Cancel
Save