dialog.html 964 B

1234567891011121314151617181920212223242526272829303132
  1. {% macro dlg_prep(l_ids) -%}
  2. <script type="text/javascript" src="{{ url_for("static", filename="cv_db/js/jquery-ui.js") }}"></script>
  3. <link rel="stylesheet" type="text/css" href="{{ url_for("static", filename="cv_db/js/jquery-ui.css") }}" />
  4. <script type="text/javascript">
  5. $(document).ready( function() {
  6. $.fn.redraw =function(){
  7. $(this).each(function(){var redraw =this.offsetHeight;});
  8. };//end of $.fn.redraw function
  9. {% for s_dlg in l_ids %}
  10. var s_{{ s_dlg }} = "";
  11. $("#{{ s_dlg }}").dialog({autoOpen: false,
  12. width: "auto",
  13. height: "auto",
  14. modal: true,
  15. buttons: {Cancel: function() {
  16. $("#{{ s_dlg }}").dialog("close");
  17. }},
  18. close: function(event, ui) {
  19. $("#{{ s_dlg }}").html(s_{{ s_dlg }});
  20. $("#{{ s_dlg }}").redraw();
  21. }//end of close event
  22. });//end of {{ s_dlg }} init
  23. s_{{ s_dlg }} = $("#{{ s_dlg }}").html();
  24. {% endfor %}
  25. });//end of document ready
  26. </script>
  27. {%- endmacro %}
  28. {# comment - the - characters above remove leading and trailing whitespace #}