This commit is contained in:
Baris Soner Usakli
2014-01-18 21:57:06 -05:00
parent 1dddd77ae1
commit 8c1c844007
2 changed files with 18 additions and 12 deletions

View File

@@ -686,22 +686,21 @@ define(['composer'], function(composer) {
});
socket.on('event:post_edited', function(data) {
var editedPostEl = document.getElementById('content_' + data.pid);
var editedPostEl = $('#content_' + data.pid),
editedPostTitle = $('#topic_title_' + data.pid);
var editedPostTitle = $('#topic_title_' + data.pid);
if (editedPostTitle.length > 0) {
if (editedPostTitle.length) {
editedPostTitle.fadeOut(250, function() {
editedPostTitle.html(data.title);
editedPostTitle.fadeIn(250);
});
}
$(editedPostEl).fadeOut(250, function() {
this.innerHTML = data.content;
$(this).fadeIn(250);
editedPostEl.fadeOut(250, function() {
editedPostEl.html(data.content);
editedPostEl.find('img').addClass('img-responsive');
editedPostEl.fadeIn(250);
});
});
socket.on('posts.favourite', function(data) {