summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-09-30 11:17:15 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:20 +0100
commit596414d4c90355de00a2f45293c12653e40b7718 (patch)
tree9d1d955a873575bf5fc15bbc62a0ec96525f5783 /ishtar_common
parent2c792763a65da1f096be9108c0562661734e4022 (diff)
downloadIshtar-596414d4c90355de00a2f45293c12653e40b7718.tar.bz2
Ishtar-596414d4c90355de00a2f45293c12653e40b7718.zip
JS: fix table header refresh for datatable behind tab or modal
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html6
-rw-r--r--ishtar_common/templates/ishtar/sheet.html3
2 files changed, 8 insertions, 1 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html b/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html
index a9e58f3e8..ff92b8af9 100644
--- a/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html
+++ b/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html
@@ -80,7 +80,11 @@ setTimeout(
$('#modal_grid_{{name}}').on('show.bs.modal', function (e) {
$('#grid_{{name}}_wrapper').appendTo(
'#modal_grid_{{name}} .modal-body .current-grid');
- $('#grid_{{name}}').DataTable().clear().draw()
+ $('#grid_{{name}}').DataTable().clear().draw();
+ setTimeout(function(){
+ $('#modal_grid_{{name}} .modal-body').resize();
+ }, 500); // fix table header refresh for datatable
+
});
$('#modal_grid_{{name}}').on('hide.bs.modal', function (e) {
diff --git a/ishtar_common/templates/ishtar/sheet.html b/ishtar_common/templates/ishtar/sheet.html
index 1c3ae37a0..b0f82941f 100644
--- a/ishtar_common/templates/ishtar/sheet.html
+++ b/ishtar_common/templates/ishtar/sheet.html
@@ -114,6 +114,9 @@
$('#{{window_id}}-tabs a[href="#{{window_id}}-' + hash + '"]').tab('show');
}
+ $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
+ $(e.target).resize(); // fix table header refresh for datatable
+ })
});
</script>
{% endblock %}