1
0
Fork 0

qcomment enhancements

This commit is contained in:
friendica 2012-03-26 20:13:03 -07:00
parent 4c585f759f
commit 5275b5d049
3 changed files with 25 additions and 5 deletions

View file

@ -13,10 +13,12 @@
<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;
<select id="qcomment-select-$id" name="qcomment-$id" class="qcomment" onchange="qCommentInsert(this,$id);" >
<option value=""></option>
{{ for $qcomment as $qc }}
<option value="$qc">$qc</option>
{{ endfor }}
</select>
{{ endif }}
<div class="comment-edit-text-end"></div>

View file

@ -65,6 +65,22 @@
$("#comment-edit-text-" + id).val(tmpStr + ins);
}
function qCommentInsert(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);
}
var ins = $(obj).val();
ins = ins.replace('&lt;','<');
ins = ins.replace('&gt;','>');
ins = ins.replace('&amp;','&');
ins = ins.replace('&quot;','"');
$("#comment-edit-text-" + id).val(tmpStr + ins);
}
function showHideComments(id) {
if( $('#collapsed-comments-' + id).is(':visible')) {
$('#collapsed-comments-' + id).hide();

View file

@ -2978,11 +2978,13 @@ div.jGrowl div.info {
.qcomment {
border: 1px solid #EEE;
padding: 3px;
margin-top: 15px;
margin-left: 25px;
}
.qcomment {
opacity: 0;
filter:alpha(opacity=0);
opacity: 0.3;
filter:alpha(opacity=30);
}
.qcomment:hover {
opacity: 1.0;