add links to zcards #500 ; also provide drag/drop highlighting of comment regions when a link is being dragged over them
This commit is contained in:
parent
aaa7d6a0ec
commit
1639f5b83d
@ -22,7 +22,7 @@ class Oembed extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
|
||||
else {
|
||||
echo "<html><body>";
|
||||
echo "<html><head><base target=\"_blank\" /></head><body>";
|
||||
$src = base64url_decode(argv(1));
|
||||
$j = oembed_fetch_url($src);
|
||||
echo $j->html;
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
Reference in New Issue
Block a user