qcomment enhancements
This commit is contained in:
parent
4c585f759f
commit
5275b5d049
|
@ -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>
|
||||
|
||||
<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>
|
||||
|
|
|
@ -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('<','<');
|
||||
ins = ins.replace('>','>');
|
||||
ins = ins.replace('&','&');
|
||||
ins = ins.replace('"','"');
|
||||
$("#comment-edit-text-" + id).val(tmpStr + ins);
|
||||
}
|
||||
|
||||
function showHideComments(id) {
|
||||
if( $('#collapsed-comments-' + id).is(':visible')) {
|
||||
$('#collapsed-comments-' + id).hide();
|
||||
|
|
|
@ -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…
Reference in a new issue