From 1ebccc733848b8a6c16352c5977ad93faf6b0653 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Wed, 10 Aug 2022 22:40:54 +0100 Subject: [PATCH] Fix modals not closing on Android --- app/local_settings.example.py | 2 +- core/static/modal.js | 5 +++-- core/templates/modals/drilldown.html | 3 ++- core/views/ui/tables.py | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/local_settings.example.py b/app/local_settings.example.py index cc32498..141bac4 100644 --- a/app/local_settings.example.py +++ b/app/local_settings.example.py @@ -59,4 +59,4 @@ META_MAX_CHUNK_SIZE = 500 META_QUERY_SIZE = 10000 DEBUG = True -PROFILER = False \ No newline at end of file +PROFILER = False diff --git a/core/static/modal.js b/core/static/modal.js index 138c87c..210a2cc 100644 --- a/core/static/modal.js +++ b/core/static/modal.js @@ -1,4 +1,5 @@ -var modal = document.querySelector('.modal'); // assuming you have only 1 +// var modal = document.querySelector('.modal'); // assuming you have only 1 +var modal = document.getElementById("drilldown-modal"); var html = document.querySelector('html'); var elements = document.querySelectorAll('.modal-background'); @@ -34,4 +35,4 @@ activateButtons(); // e.preventDefault(); // modal.classList.remove('is-active'); // html.classList.remove('is-clipped'); -// }); \ No newline at end of file +// }); diff --git a/core/templates/modals/drilldown.html b/core/templates/modals/drilldown.html index b8d3d62..9466a8c 100644 --- a/core/templates/modals/drilldown.html +++ b/core/templates/modals/drilldown.html @@ -4,7 +4,7 @@ - diff --git a/core/views/ui/tables.py b/core/views/ui/tables.py index 6db96a8..c1fbcff 100644 --- a/core/views/ui/tables.py +++ b/core/views/ui/tables.py @@ -1,5 +1,6 @@ -from django_tables2 import Column, Table from django.conf import settings +from django_tables2 import Column, Table + class DrilldownTable(Table): id = Column()