]> git.mxchange.org Git - friendica.git/commitdiff
qcomment enhancements
authorfriendica <info@friendica.com>
Tue, 27 Mar 2012 03:13:03 +0000 (20:13 -0700)
committerfriendica <info@friendica.com>
Tue, 27 Mar 2012 03:13:03 +0000 (20:13 -0700)
view/comment_item.tpl
view/head.tpl
view/theme/duepuntozero/style.css

index 3503c3843eea13e93a8d9b73b8fe6f7b5df45489..a1d4e1043a3ba18e7cec9616d6ee5f8550cbf1c3 100755 (executable)
                                <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>
index 722c79441465698acf0debaa8b38bcbb49a46281..cd6f5ca972e97564fc78148d02571650ab4d8c9e 100755 (executable)
                $("#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();
index b1c2fb77ebae7563e990c3f53f2d0386ac9681af..33be8b3590026d431736ec928ecb9ffa10e32b6b 100755 (executable)
@@ -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;