aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/jot-header.tpl
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-09-05 17:08:48 -0700
committerredmatrix <mike@macgirvin.com>2016-09-05 17:08:48 -0700
commit1639f5b83d39be33ccbf07ac29b7a86cc11a4d14 (patch)
treed5d036de0bc9ae3c978bd972c702ea84e06d7a5c /view/tpl/jot-header.tpl
parentaaa7d6a0ecb5b4b86acfe03155affc538f450fb5 (diff)
downloadvolse-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-xview/tpl/jot-header.tpl25
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);
+
}
}