diff options
author | redmatrix <mike@macgirvin.com> | 2016-09-05 17:08:48 -0700 |
---|---|---|
committer | redmatrix <mike@macgirvin.com> | 2016-09-05 17:08:48 -0700 |
commit | 1639f5b83d39be33ccbf07ac29b7a86cc11a4d14 (patch) | |
tree | d5d036de0bc9ae3c978bd972c702ea84e06d7a5c /view/tpl/jot-header.tpl | |
parent | aaa7d6a0ecb5b4b86acfe03155affc538f450fb5 (diff) | |
download | volse-hubzilla-1639f5b83d39be33ccbf07ac29b7a86cc11a4d14.tar.gz volse-hubzilla-1639f5b83d39be33ccbf07ac29b7a86cc11a4d14.tar.bz2 volse-hubzilla-1639f5b83d39be33ccbf07ac29b7a86cc11a4d14.zip |
add links to zcards #500 ; also provide drag/drop highlighting of comment regions when a link is being dragged over them
Diffstat (limited to 'view/tpl/jot-header.tpl')
-rwxr-xr-x | view/tpl/jot-header.tpl | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index c63aa053e..ac657e63f 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -262,8 +262,30 @@ function enableOnUser(){ function linkdropper(event) { var linkFound = event.dataTransfer.types.contains("text/uri-list"); - if(linkFound) + if(linkFound) { 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); + $('#comment-edit-text-' + commentid).addClass('hover'); + } + } + } + } + + function linkdropexit(event) { + 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); + $('#comment-edit-text-' + commentid).removeClass('hover'); + } + } } function linkdrop(event) { @@ -276,6 +298,7 @@ function enableOnUser(){ if(commentwin) { var commentid = editwin.substring(editwin.lastIndexOf('-') + 1); commentOpen(document.getElementById(event.target.id),commentid); + } } |