aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-08-10 19:38:20 -0700
committerredmatrix <git@macgirvin.com>2016-08-10 19:38:20 -0700
commit6c672d2575764b48c8570e8d10d3434abec1ab5e (patch)
tree29b3842a6503abd023c4e4a2d2f6194711e0e558
parent99c5aca78b42fd471b4c02e886e49ccb19d33ff0 (diff)
downloadvolse-hubzilla-6c672d2575764b48c8570e8d10d3434abec1ab5e.tar.gz
volse-hubzilla-6c672d2575764b48c8570e8d10d3434abec1ab5e.tar.bz2
volse-hubzilla-6c672d2575764b48c8570e8d10d3434abec1ab5e.zip
initialise jot editor if it is used as a file drop target and isn't yet opened.
-rwxr-xr-xview/tpl/jot-header.tpl7
1 files changed, 6 insertions, 1 deletions
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index 9de049b58..fc87c14d7 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -503,6 +503,7 @@ function enableOnUser(){
// cancel event and hover styling
DragDropUploadFileHover(e);
+ if (!editor) $("#profile-jot-text").val("");
// fetch FileList object
@@ -527,7 +528,11 @@ function enableOnUser(){
xhr.addEventListener('load', function (e) {
//console.log('xhr upload complete', e);
window.fileUploadsCompleted = window.fileUploadsCompleted + 1;
- addeditortext(xhr.responseText);
+
+ initEditor(function() {
+ 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) {