possible fix for empty commentbox colapsing on tool-button click
This commit is contained in:
		| @@ -13,18 +13,15 @@ | ||||
| 	} | ||||
|  | ||||
| 	function commentClose(obj,id) { | ||||
| 		//$(document).on('click', function() { | ||||
| 			if(obj.value == '') { | ||||
| 				obj.value = aStr['comment']; | ||||
| 				$("#comment-edit-text-" + id).removeClass("comment-edit-text-full"); | ||||
| 				$("#comment-edit-text-" + id).addClass("comment-edit-text-empty"); | ||||
| 				$("#mod-cmnt-wrap-" + id).hide(); | ||||
| 				closeMenu("comment-tools-" + id); | ||||
| 				return true; | ||||
| 			} | ||||
| 			return false; | ||||
| 		//}); | ||||
|  | ||||
| 		if(obj.value == '') { | ||||
| 			obj.value = aStr['comment']; | ||||
| 			$("#comment-edit-text-" + id).removeClass("comment-edit-text-full"); | ||||
| 			$("#comment-edit-text-" + id).addClass("comment-edit-text-empty"); | ||||
| 			$("#mod-cmnt-wrap-" + id).hide(); | ||||
| 			closeMenu("comment-tools-" + id); | ||||
| 			return true; | ||||
| 		} | ||||
| 		return false; | ||||
| 	} | ||||
|  | ||||
| 	function showHideCommentBox(id) { | ||||
|   | ||||
| @@ -1,3 +1,13 @@ | ||||
| function commentCloseRed(obj,id) { | ||||
| 	$(document).click(function() { | ||||
| 		if(obj.value == '') { | ||||
| 		obj.value = aStr['comment']; | ||||
| 			$("#comment-edit-text-" + id).removeClass("comment-edit-text-full").addClass("comment-edit-text-empty"); | ||||
| 			$("#comment-tools-" + id).hide(); | ||||
| 		} | ||||
| 	}); | ||||
| } | ||||
|  | ||||
| $(document).ready(function() { | ||||
|  | ||||
| $('#expand-aside').click(function() { | ||||
|   | ||||
| @@ -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="commentClose(this,{{$id}});" >{{$comment}}</textarea> | ||||
| 				<textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,{{$id}});" onBlur="commentCloseRed(this,{{$id}});" >{{$comment}}</textarea> | ||||
| 				{{if $qcomment}} | ||||
| 					<select id="qcomment-select-{{$id}}" name="qcomment-{{$id}}" class="qcomment" onchange="qCommentInsert(this,{{$id}});" > | ||||
| 					<option value=""></option> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user