diff options
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 58acc1b95..f7f4d3dc2 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -1,21 +1,33 @@ function commentOpenRedbasic(obj,id) { - $(document).click(function() { + + $(document).unbind( "click", handler ); + + var handler = 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(); } - }); + }; + + $(document).bind( "click", handler ); + } function commentCloseRedbasic(obj,id) { - $(document).click(function() { + + $(document).unbind( "click", handler ); + + var handler = 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).bind( "click", handler ); + } $(document).ready(function() { |