Browse Source

qcomment enhancements

pull/175/merge
friendica 10 years ago
parent
commit
5275b5d049
  1. 8
      view/comment_item.tpl
  2. 16
      view/head.tpl
  3. 6
      view/theme/duepuntozero/style.css

8
view/comment_item.tpl

@ -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>

16
view/head.tpl

@ -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();

6
view/theme/duepuntozero/style.css

@ -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;

Loading…
Cancel
Save