app/templates/projrev/proposal/submit.html
changeset 24 7257b66a6766
parent 23 91cf6872d853
child 38 3cb38edbe05f
--- a/app/templates/projrev/proposal/submit.html	Sun Aug 09 23:24:48 2009 +0530
+++ b/app/templates/projrev/proposal/submit.html	Mon Aug 10 00:06:31 2009 +0530
@@ -38,47 +38,48 @@
             var tooltip = [
             "<div class='tooltip'>",
             "  <div class='tooltip-body'>",
-            "    <img src='/site-content/images/purrInfo.png' alt='' />",
+            "    <img src='/site-content/images/info.png' alt='' />",
             "    <h3>Info</h3>",
             "    <p>",
             "      {% autoescape off %}",
-            "        {{ help_text|linebreaksbr|escapejs }}",
+            "        {{ field.help_text|linebreaksbr|escapejs }}",
             "      {% endautoescape %}",
             "    </p>",
             "  </div>",
             "  <div class='tooltip-bottom'></div>",
             "</div>"
-          ].join("");
-          var tooltip_object=null;
-          var documented = $("#{{ field_id }}");
-          var not_fieldset = documented.attr('tagName') !== 'FIELDSET';
-          if (not_fieldset) {
-            documented.focus(function() {
-              if (tooltip_object==null) {
-                tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000});
-              }
-            });
-            documented.blur(function() {
-              if (tooltip_object!==null) {
-                tooltip_object.remove();
-                tooltip_object=null;
-              }
-            });
-          }
-          else {
-            documented.find("input").hover(function() {
-              if (tooltip_object==null) {
-                tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000});
-              }
-            },
-            function() {
-              if (tooltip_object!==null) {
-                tooltip_object.remove();
-                tooltip_object=null;
-              }
-            });
-          }
-        });
+            ].join("");
+
+            var tooltip_object=null;
+            var documented = $("#id_{{ field.name }}");
+            var not_fieldset = documented.attr('tagName') !== 'FIELDSET';
+            if (not_fieldset) {
+              documented.focus(function() {
+                if (tooltip_object==null) {
+                  tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000});
+                }
+              });
+              documented.blur(function() {
+                if (tooltip_object!==null) {
+                  tooltip_object.remove();
+                  tooltip_object=null;
+                }
+              });
+            }
+            else {
+              documented.find("input").hover(function() {
+                if (tooltip_object==null) {
+                  tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000});
+                }
+              },
+              function() {
+                if (tooltip_object!==null) {
+                  tooltip_object.remove();
+                  tooltip_object=null;
+                }
+              });
+            }
+          });
         </script>
       {% endif %}
       {{ field.errors }}