|
|
|
@ -245,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('');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|