app/templates/projrev/proposal/submit.html
changeset 24 7257b66a6766
parent 23 91cf6872d853
child 38 3cb38edbe05f
equal deleted inserted replaced
23:91cf6872d853 24:7257b66a6766
    36         <script type="text/javascript">
    36         <script type="text/javascript">
    37           $(document).ready( function() {
    37           $(document).ready( function() {
    38             var tooltip = [
    38             var tooltip = [
    39             "<div class='tooltip'>",
    39             "<div class='tooltip'>",
    40             "  <div class='tooltip-body'>",
    40             "  <div class='tooltip-body'>",
    41             "    <img src='/site-content/images/purrInfo.png' alt='' />",
    41             "    <img src='/site-content/images/info.png' alt='' />",
    42             "    <h3>Info</h3>",
    42             "    <h3>Info</h3>",
    43             "    <p>",
    43             "    <p>",
    44             "      {% autoescape off %}",
    44             "      {% autoescape off %}",
    45             "        {{ help_text|linebreaksbr|escapejs }}",
    45             "        {{ field.help_text|linebreaksbr|escapejs }}",
    46             "      {% endautoescape %}",
    46             "      {% endautoescape %}",
    47             "    </p>",
    47             "    </p>",
    48             "  </div>",
    48             "  </div>",
    49             "  <div class='tooltip-bottom'></div>",
    49             "  <div class='tooltip-bottom'></div>",
    50             "</div>"
    50             "</div>"
    51           ].join("");
    51             ].join("");
    52           var tooltip_object=null;
    52 
    53           var documented = $("#{{ field_id }}");
    53             var tooltip_object=null;
    54           var not_fieldset = documented.attr('tagName') !== 'FIELDSET';
    54             var documented = $("#id_{{ field.name }}");
    55           if (not_fieldset) {
    55             var not_fieldset = documented.attr('tagName') !== 'FIELDSET';
    56             documented.focus(function() {
    56             if (not_fieldset) {
    57               if (tooltip_object==null) {
    57               documented.focus(function() {
    58                 tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000});
    58                 if (tooltip_object==null) {
    59               }
    59                   tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000});
    60             });
    60                 }
    61             documented.blur(function() {
    61               });
    62               if (tooltip_object!==null) {
    62               documented.blur(function() {
    63                 tooltip_object.remove();
    63                 if (tooltip_object!==null) {
    64                 tooltip_object=null;
    64                   tooltip_object.remove();
    65               }
    65                   tooltip_object=null;
    66             });
    66                 }
    67           }
    67               });
    68           else {
    68             }
    69             documented.find("input").hover(function() {
    69             else {
    70               if (tooltip_object==null) {
    70               documented.find("input").hover(function() {
    71                 tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000});
    71                 if (tooltip_object==null) {
    72               }
    72                   tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000});
    73             },
    73                 }
    74             function() {
    74               },
    75               if (tooltip_object!==null) {
    75               function() {
    76                 tooltip_object.remove();
    76                 if (tooltip_object!==null) {
    77                 tooltip_object=null;
    77                   tooltip_object.remove();
    78               }
    78                   tooltip_object=null;
    79             });
    79                 }
    80           }
    80               });
    81         });
    81             }
       
    82           });
    82         </script>
    83         </script>
    83       {% endif %}
    84       {% endif %}
    84       {{ field.errors }}
    85       {{ field.errors }}
    85       {{ field.label_tag }}:{{ field }}{% if field.field.required %}<span class="special_class">&nbsp;&nbsp;(required)</span>{% endif %}
    86       {{ field.label_tag }}:{{ field }}{% if field.field.required %}<span class="special_class">&nbsp;&nbsp;(required)</span>{% endif %}
    86       </p>
    87       </p>