summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/blocks/DataTables.html
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates/blocks/DataTables.html')
-rw-r--r--ishtar_common/templates/blocks/DataTables.html42
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">&times;</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(){