aboutsummaryrefslogtreecommitdiffstats
path: root/view
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
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')
-rw-r--r--view/css/conversation.css7
-rwxr-xr-xview/tpl/comment_item.tpl2
-rwxr-xr-xview/tpl/jot-header.tpl25
-rw-r--r--view/tpl/zcard_embed.tpl4
4 files changed, 34 insertions, 4 deletions
diff --git a/view/css/conversation.css b/view/css/conversation.css
index 4f2eee17d..e8b2f926b 100644
--- a/view/css/conversation.css
+++ b/view/css/conversation.css
@@ -46,6 +46,13 @@
box-shadow: inset 0 0px 7px #5cb85c;
}
+.comment-edit-text-empty.hover, .comment-edit-text-full.hover {
+ background-color: aliceblue;
+ opacity: 0.5;
+ box-shadow: inset 0 0px 7px #5cb85c;
+}
+
+
.jot-attachment {
border: 0px;
padding: 10px;
diff --git a/view/tpl/comment_item.tpl b/view/tpl/comment_item.tpl
index 5920efafa..a98b9e5eb 100755
--- a/view/tpl/comment_item.tpl
+++ b/view/tpl/comment_item.tpl
@@ -10,7 +10,7 @@
<input type="hidden" name="return" value="{{$return_path}}" />
<input type="hidden" name="jsreload" value="{{$jsreload}}" />
<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}});" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" >{{$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);" ondragleave="linkdropexit(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" >{{$comment}}</textarea>
{{if $qcomment}}
<select id="qcomment-select-{{$id}}" name="qcomment-{{$id}}" class="qcomment" onchange="qCommentInsert(this,{{$id}});" >
<option value=""></option>
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);
+
}
}
diff --git a/view/tpl/zcard_embed.tpl b/view/tpl/zcard_embed.tpl
index 7981e3b0b..5c7a925e3 100644
--- a/view/tpl/zcard_embed.tpl
+++ b/view/tpl/zcard_embed.tpl
@@ -1,8 +1,8 @@
<div class="hz_card {{$size}}">
- <div class="hz_cover_photo" style="max-width: 100;"><img src="{{$cover.href}}" alt="{{$zcard.chan.xchan_name}}" />
+ <div class="hz_cover_photo" style="max-width: 100;"><a href="{{$zcard.chan.xchan_url}}"><img src="{{$cover.href}}" alt="{{$zcard.chan.xchan_name}}" /></a>
<div style="position: relative;top: -40px;left: 120px;color: #fff;font-size: 18px;text-rendering: optimizelegibility;text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);" >{{$zcard.chan.xchan_name}}</div>
<div style="position: relative;top: -40px;left: 120px;color: #fff;font-size: 10px;text-rendering: optimizelegibility;text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);" >{{$zcard.chan.channel_addr}}</div>
</div>
- <div style="position:relative;top: -75px;left: 20px;background-color: white;border: 1px solid #ddd;padding: 3px;width: 80px;height: 80px;"><img src="{{$pphoto.href}}" alt="{{$zcard.chan.xchan_name}}" /></div>
+ <div style="position:relative;top: -75px;left: 20px;background-color: white;border: 1px solid #ddd;padding: 3px;width: 80px;height: 80px;"><a href="{{$zcard.chan.xchan_url}}"><img src="{{$pphoto.href}}" alt="{{$zcard.chan.xchan_name}}" /></a></div>
</div>