From 8925e0c6c90e4c6cf75b346978d3f6d963b5c7d7 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Thu, 28 Jul 2016 19:21:33 -0400 Subject: Fixed bug where multiple post attachements by drag-and-drop were not being added to the post content. --- view/tpl/jot-header.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'view') diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index ee00e25e6..c0d524764 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -511,10 +511,10 @@ function enableOnUser(){ xhr.addEventListener('load', function (e) { //console.log('xhr upload complete', e); window.fileUploadsCompleted = window.fileUploadsCompleted + 1; + addeditortext(xhr.responseText); + $('#jot-media').val($('#jot-media').val() + xhr.responseText); // When all the uploads have completed, refresh the page - if (window.filesToUpload > 0 && window.fileUploadsCompleted === window.filesToUpload) { - addeditortext(xhr.responseText); - $('#jot-media').val($('#jot-media').val() + xhr.responseText); + if (window.filesToUpload > 0 && window.fileUploadsCompleted === window.filesToUpload) { $('#profile-rotator').spin(false); window.fileUploadsCompleted = window.filesToUpload = 0; } -- cgit v1.2.3