mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
can edit and add an image to a post, still cant remove previously added images #issue #233
This commit is contained in:
@@ -383,6 +383,18 @@
|
||||
this.innerHTML = data.content;
|
||||
$(this).fadeIn(250);
|
||||
});
|
||||
|
||||
if(data.uploadedImages && data.uploadedImages.length) {
|
||||
$('#images_'+data.pid).html('');
|
||||
for(var i=0; i< data.uploadedImages.length; ++i) {
|
||||
var img = $('<i class="icon-picture icon-1"></i><a href="' + data.uploadedImages[i].url +'"> '+data.uploadedImages[i].name+'</a><br/>');
|
||||
$('#images_' + data.pid).append(img);
|
||||
}
|
||||
} else {
|
||||
$('#images_'+data.pid).html('');
|
||||
}
|
||||
|
||||
console.log('time to recreate images', data);
|
||||
});
|
||||
|
||||
socket.on('api:posts.favourite', function(data) {
|
||||
|
||||
Reference in New Issue
Block a user