aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/jot-header.tpl
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-08-10 01:35:58 -0700
committerredmatrix <git@macgirvin.com>2016-08-10 01:35:58 -0700
commit7a557d31e026705fc3bd2d4f39c4c679449cef56 (patch)
tree499ab4cac571c35f6d0758f157ed85af46c8b57c /view/tpl/jot-header.tpl
parentde12503fadbead1722824311d0887ad65b0cb925 (diff)
downloadvolse-hubzilla-7a557d31e026705fc3bd2d4f39c4c679449cef56.tar.gz
volse-hubzilla-7a557d31e026705fc3bd2d4f39c4c679449cef56.tar.bz2
volse-hubzilla-7a557d31e026705fc3bd2d4f39c4c679449cef56.zip
open editor or comment window when linkdropping to a closed window. We probably also need this for filedropping.
Diffstat (limited to 'view/tpl/jot-header.tpl')
-rwxr-xr-xview/tpl/jot-header.tpl22
1 files changed, 18 insertions, 4 deletions
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index 9b00b25d3..9de049b58 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -270,16 +270,30 @@ function enableOnUser(){
var reply = event.dataTransfer.getData("text/uri-list");
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 );
- // addeditortext(data);
$('#profile-rotator').spin(false);
- });
+ }
+ else {
+ if (!editor) $("#profile-jot-text").val("");
+ initEditor(function(){
+ addeditortext(data);
+ $('#profile-rotator').spin(false);
+ });
+ }
});
}
}