diff options
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 10 | ||||
-rwxr-xr-x | view/tpl/comment_item.tpl | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index ec848dd3b..58acc1b95 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -1,3 +1,13 @@ +function commentOpenRedbasic(obj,id) { + $(document).click(function() { + if(obj.value == aStr['comment']) { + obj.value = ''; + $("#comment-edit-text-" + id).addClass("comment-edit-text-full").removeClass("comment-edit-text-empty"); + $("#comment-tools-" + id).show(); + } + }); +} + function commentCloseRedbasic(obj,id) { $(document).click(function() { if(obj.value == '') { diff --git a/view/tpl/comment_item.tpl b/view/tpl/comment_item.tpl index 2689e17ef..0b89bb16a 100755 --- a/view/tpl/comment_item.tpl +++ b/view/tpl/comment_item.tpl @@ -10,7 +10,7 @@ <input type="hidden" name="return" value="{{$return_path}}" /> <input type="hidden" name="jsreload" value="{{$jsreload}}" /> <input type="hidden" name="preview" id="comment-preview-inp-{{$id}}" value="0" /> - <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,{{$id}});" onBlur="commentCloseRedbasic(this,{{$id}});" >{{$comment}}</textarea> + <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" onFocus="commentOpenRedbasic(this,{{$id}});" onBlur="commentCloseRedbasic(this,{{$id}});" >{{$comment}}</textarea> {{if $qcomment}} <select id="qcomment-select-{{$id}}" name="qcomment-{{$id}}" class="qcomment" onchange="qCommentInsert(this,{{$id}});" > <option value=""></option> |