1
0
Fork 0

preliminary qcomment support, [nosmile] tag to disable smiley processing

This commit is contained in:
friendica 2012-02-14 23:13:18 -08:00
commit 03171fd7de
7 changed files with 45 additions and 4 deletions

View file

@ -12,6 +12,12 @@
</div>
<div class="comment-edit-photo-end"></div>
<textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);" onBlur="commentClose(this,$id);" >$comment</textarea>
{{ if $qcomment }}
{{ for $qcomment as $qc }}
<span class="fakelink qcomment" onclick="commentInsert(this,$id); return false;" >$qc</span>
&nbsp;
{{ endfor }}
{{ endif }}
<div class="comment-edit-text-end"></div>
<div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-$id" style="display: none;" >

View file

@ -46,6 +46,18 @@
}
}
function commentInsert(obj,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == '$comment') {
tmpStr = '';
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
openMenu("comment-edit-submit-wrapper-" + id);
}
$("#comment-edit-text-" + id).val(tmpStr + $(obj).html());
}
function showHideComments(id) {
if( $('#collapsed-comments-' + id).is(':visible')) {
$('#collapsed-comments-' + id).hide();

View file

@ -2953,3 +2953,17 @@ div.jGrowl div.info {
color: #ffffff;
padding-left: 58px;
}
.qcomment {
border: 1px solid #EEE;
padding: 3px;
}
.qcomment {
opacity: 0;
filter:alpha(opacity=0);
}
.qcomment:hover {
opacity: 1.0;
filter:alpha(opacity=100);
}