Fixed Issue 627 where multiple Purr boxes would show when using calendar widget.
authorMario Ferraro <fadinlight@gmail.com>
Sat, 09 May 2009 01:14:03 +0200
changeset 2300 b9fd1e20d413
parent 2299 b0e67a2eafff
child 2301 fd14daa4b45a
Fixed Issue 627 where multiple Purr boxes would show when using calendar widget.
app/soc/templates/soc/templatetags/_as_table_row.html
--- a/app/soc/templates/soc/templatetags/_as_table_row.html	Fri May 08 14:58:19 2009 +0200
+++ b/app/soc/templates/soc/templatetags/_as_table_row.html	Sat May 09 01:14:03 2009 +0200
@@ -57,11 +57,14 @@
     var tooltip = "<div class='tooltip'><div class='tooltip-body'><img src='/soc/content/images/purrInfo.png' alt='' /><h3>Info</h3><p>{{ help_text }}</p></div><div class='tooltip-bottom'></div></div>";
     var tooltip_object=null;
     $("#{{ field_id }}").focus(function() {
-      tooltip_object = $(tooltip).purr({usingTransparentPNG: true});
+      if (tooltip_object==null) {
+        tooltip_object = $(tooltip).purr({usingTransparentPNG: true});
+      }
     });
     $("#{{ field_id }}").blur(function() {
       if (tooltip_object!==null) {
         tooltip_object.remove();
+        tooltip_object=null;
       }
     });
   });