aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/jot-header.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl/jot-header.tpl')
-rwxr-xr-xview/tpl/jot-header.tpl24
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