diff options
author | zottel <github@zottel.net> | 2016-08-10 13:49:48 +0200 |
---|---|---|
committer | zottel <github@zottel.net> | 2016-08-10 13:49:48 +0200 |
commit | 8706cbe1c413ed8fcfb7dcb35c7b319d2d1116bb (patch) | |
tree | 499ab4cac571c35f6d0758f157ed85af46c8b57c /view/tpl/jot-header.tpl | |
parent | 6ba142fd33a74a7bdb4f3dfc8c0c0f507c293a2e (diff) | |
parent | 7a557d31e026705fc3bd2d4f39c4c679449cef56 (diff) | |
download | volse-hubzilla-8706cbe1c413ed8fcfb7dcb35c7b319d2d1116bb.tar.gz volse-hubzilla-8706cbe1c413ed8fcfb7dcb35c7b319d2d1116bb.tar.bz2 volse-hubzilla-8706cbe1c413ed8fcfb7dcb35c7b319d2d1116bb.zip |
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'view/tpl/jot-header.tpl')
-rwxr-xr-x | view/tpl/jot-header.tpl | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index c0d524764..9de049b58 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -268,17 +268,32 @@ function enableOnUser(){ function linkdrop(event) { var reply = event.dataTransfer.getData("text/uri-list"); - event.target.textContent = reply; event.preventDefault(); + var editwin = '#' + event.target.id; + var commentwin = false; + if(editwin) { + commentwin = ((editwin.indexOf('comment') >= 0) ? true : false); + if(commentwin) { + var commentid = editwin.substring(editwin.lastIndexOf('-') + 1); + commentOpen(document.getElementById(event.target.id),commentid); + } + } + if(reply && reply.length) { reply = bin2hex(reply); $('#profile-rotator').spin('tiny'); $.get('{{$baseurl}}/linkinfo?f=&binurl=' + reply, function(data) { - if (!editor) $("#profile-jot-text").val(""); - initEditor(function(){ + if(commentwin) { + $(editwin).val( $(editwin).val() + data ); + $('#profile-rotator').spin(false); + } + else { + if (!editor) $("#profile-jot-text").val(""); + initEditor(function(){ addeditortext(data); $('#profile-rotator').spin(false); - }); + }); + } }); } } @@ -489,6 +504,7 @@ function enableOnUser(){ // cancel event and hover styling DragDropUploadFileHover(e); + // fetch FileList object var files = e.target.files || e.originalEvent.dataTransfer.files; // process all File objects |