open editor or comment window when linkdropping to a closed window. We probably also need this for filedropping.
This commit is contained in:
parent
de12503fad
commit
7a557d31e0
@ -270,16 +270,30 @@ function enableOnUser(){
|
|||||||
var reply = event.dataTransfer.getData("text/uri-list");
|
var reply = event.dataTransfer.getData("text/uri-list");
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var editwin = '#' + event.target.id;
|
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) {
|
if(reply && reply.length) {
|
||||||
reply = bin2hex(reply);
|
reply = bin2hex(reply);
|
||||||
$('#profile-rotator').spin('tiny');
|
$('#profile-rotator').spin('tiny');
|
||||||
$.get('{{$baseurl}}/linkinfo?f=&binurl=' + reply, function(data) {
|
$.get('{{$baseurl}}/linkinfo?f=&binurl=' + reply, function(data) {
|
||||||
if (!editor) $("#profile-jot-text").val("");
|
if(commentwin) {
|
||||||
initEditor(function(){
|
|
||||||
$(editwin).val( $(editwin).val() + data );
|
$(editwin).val( $(editwin).val() + data );
|
||||||
// addeditortext(data);
|
|
||||||
$('#profile-rotator').spin(false);
|
$('#profile-rotator').spin(false);
|
||||||
});
|
}
|
||||||
|
else {
|
||||||
|
if (!editor) $("#profile-jot-text").val("");
|
||||||
|
initEditor(function(){
|
||||||
|
addeditortext(data);
|
||||||
|
$('#profile-rotator').spin(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user