aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/redbasic/js/redbasic.js
diff options
context:
space:
mode:
authormarijus <mario@mariovavti.com>2014-06-05 11:02:27 +0200
committermarijus <mario@mariovavti.com>2014-06-05 11:02:27 +0200
commit4c9d8fd79d806391f68423f004d087035ba60e0a (patch)
tree696579130ea579ad41fb2faf75ef81f9738d6669 /view/theme/redbasic/js/redbasic.js
parentd51d04cbdb5844da316099cf25f3c832e46ffacd (diff)
downloadvolse-hubzilla-4c9d8fd79d806391f68423f004d087035ba60e0a.tar.gz
volse-hubzilla-4c9d8fd79d806391f68423f004d087035ba60e0a.tar.bz2
volse-hubzilla-4c9d8fd79d806391f68423f004d087035ba60e0a.zip
possible fix for 2nd comment collapsing
Diffstat (limited to 'view/theme/redbasic/js/redbasic.js')
-rw-r--r--view/theme/redbasic/js/redbasic.js20
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() {