diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-27 11:55:34 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-27 11:55:34 +0100 |
| commit | d409bc5da81eff3cd1f8459263b99d4f61a07272 (patch) | |
| tree | 1e5c122563a17902ab37229ce471408e09467bfd /ishtar_common/templates/blocks/DataTables.html | |
| parent | 2f36126163498299174d5dc0162a008b57fe5ea7 (diff) | |
| download | Ishtar-d409bc5da81eff3cd1f8459263b99d4f61a07272.tar.bz2 Ishtar-d409bc5da81eff3cd1f8459263b99d4f61a07272.zip | |
Syndication - table: add export button et "Expand table"
Diffstat (limited to 'ishtar_common/templates/blocks/DataTables.html')
| -rw-r--r-- | ishtar_common/templates/blocks/DataTables.html | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/ishtar_common/templates/blocks/DataTables.html b/ishtar_common/templates/blocks/DataTables.html index 95ebbbc6b..8ef1a5403 100644 --- a/ishtar_common/templates/blocks/DataTables.html +++ b/ishtar_common/templates/blocks/DataTables.html @@ -25,6 +25,25 @@ </div> </div> +{% for source_id, source_label, source_url in external_sources %} +<div class="modal fade table-modal-lg" tabindex="-1" role="dialog" + aria-hidden="true" id="modal_grid_{{name}}_{{source_id}}"> + <div class="modal-dialog full modal-lg"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + </div> + <div class="modal-body"> + <div class="current-sheets"></div> + <div class="current-grid"></div> + </div> + </div> + </div> +</div> +{% endfor %} + {% if external_sources %} {% include "blocks/DataTables-external-sources.html" %} {% endif %} @@ -36,21 +55,22 @@ <script type="text/javascript" language='javascript'> $('#modal_grid_{{name}}').on('show.bs.modal', function (e) { - $('#grid_{{name}}_wrapper').appendTo( - '#modal_grid_{{name}} .modal-body .current-grid'); - $('#window').appendTo( - '#modal_grid_{{name}} .modal-body .current-sheets'); - $('#grid_{{name}}').DataTable().clear().draw(); - current_modal = $("#modal_grid_{{name}}"); + bs_expand_table("{{name}}"); }); $('#modal_grid_{{name}}').on('hide.bs.modal', function (e) { - $('#grid_{{name}}_wrapper').appendTo( - '#grid_{{name}}_meta_wrapper'); - $('#window').appendTo('#window_wrapper'); - $('#grid_{{name}}').DataTable().clear().draw(); - current_modal = null; + bs_hide_table("{{name}}"); +}); + +{% for source_id, source_label, source_url in external_sources %} +$('#modal_grid_{{name}}_{{source_id}}').on('show.bs.modal', function (e) { + bs_expand_table("{{name}}_{{source_id}}"); +}); + +$('#modal_grid_{{name}}_{{source_id}}').on('hide.bs.modal', function (e) { + bs_hide_table("{{name}}_{{source_id}}"); }); +{% endfor %} {% if gallery or use_map %} $("#tab-grid-{{name}}").click(function(){ |
