app/soc/templates/soc/templatetags/_as_table_row.html
changeset 2419 82ce842da661
parent 2300 b9fd1e20d413
child 2561 2751a2462bb3
equal deleted inserted replaced
2418:32cb30846cfd 2419:82ce842da661
    54   {% if help_text %}
    54   {% if help_text %}
    55   <script type="text/javascript">
    55   <script type="text/javascript">
    56   $(document).ready( function() {
    56   $(document).ready( function() {
    57     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>";
    57     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>";
    58     var tooltip_object=null;
    58     var tooltip_object=null;
    59     $("#{{ field_id }}").focus(function() {
    59     var documented = $("#{{ field_id }}");
    60       if (tooltip_object==null) {
    60     var not_fieldset = documented.attr('tagName') !== 'FIELDSET';
    61         tooltip_object = $(tooltip).purr({usingTransparentPNG: true});
    61     if (not_fieldset) {
    62       }
    62       documented.focus(function() {
    63     });
    63         if (tooltip_object==null) {
    64     $("#{{ field_id }}").blur(function() {
    64           tooltip_object = $(tooltip).purr({usingTransparentPNG: true});
    65       if (tooltip_object!==null) {
    65         }
    66         tooltip_object.remove();
    66       });
    67         tooltip_object=null;
    67       documented.blur(function() {
    68       }
    68         if (tooltip_object!==null) {
    69     });
    69           tooltip_object.remove();
       
    70           tooltip_object=null;
       
    71         }
       
    72       });
       
    73     }
       
    74     else {
       
    75       documented.find("input").hover(function() {
       
    76         if (tooltip_object==null) {
       
    77           tooltip_object = $(tooltip).purr({usingTransparentPNG: true});
       
    78         }
       
    79       },
       
    80       function() {
       
    81         if (tooltip_object!==null) {
       
    82           tooltip_object.remove();
       
    83           tooltip_object=null;
       
    84         }
       
    85       });
       
    86     }
    70   });
    87   });
    71   </script>
    88   </script>
    72   {% endif %}
    89   {% endif %}
    73     {{ field|safe }}
    90     {{ field|safe }}
    74   </td>
    91   </td>