allow dropping links on comments as well as posts
This commit is contained in:
parent
5238a27ab3
commit
de12503fad
@ -10,7 +10,7 @@
|
|||||||
<input type="hidden" name="return" value="{{$return_path}}" />
|
<input type="hidden" name="return" value="{{$return_path}}" />
|
||||||
<input type="hidden" name="jsreload" value="{{$jsreload}}" />
|
<input type="hidden" name="jsreload" value="{{$jsreload}}" />
|
||||||
<input type="hidden" name="preview" id="comment-preview-inp-{{$id}}" value="0" />
|
<input type="hidden" name="preview" id="comment-preview-inp-{{$id}}" value="0" />
|
||||||
<textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" onFocus="commentOpenUI(this,{{$id}});" onBlur="commentCloseUI(this,{{$id}});" >{{$comment}}</textarea>
|
<textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" onFocus="commentOpenUI(this,{{$id}});" onBlur="commentCloseUI(this,{{$id}});" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" >{{$comment}}</textarea>
|
||||||
{{if $qcomment}}
|
{{if $qcomment}}
|
||||||
<select id="qcomment-select-{{$id}}" name="qcomment-{{$id}}" class="qcomment" onchange="qCommentInsert(this,{{$id}});" >
|
<select id="qcomment-select-{{$id}}" name="qcomment-{{$id}}" class="qcomment" onchange="qCommentInsert(this,{{$id}});" >
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
|
@ -269,13 +269,15 @@ function enableOnUser(){
|
|||||||
function linkdrop(event) {
|
function linkdrop(event) {
|
||||||
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;
|
||||||
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 (!editor) $("#profile-jot-text").val("");
|
||||||
initEditor(function(){
|
initEditor(function(){
|
||||||
addeditortext(data);
|
$(editwin).val( $(editwin).val() + data );
|
||||||
|
// addeditortext(data);
|
||||||
$('#profile-rotator').spin(false);
|
$('#profile-rotator').spin(false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user