Hide jsGrid filter/insert rows in mobile view correctly on all pages

This commit is contained in:
Yingtong Li 2020-07-16 17:08:08 +10:00
parent eb46c82ae1
commit 5bf2f310d6
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
3 changed files with 8 additions and 2 deletions

View File

@ -363,7 +363,5 @@
var expense_data = JSON.parse({{ import('json').dumps(import('json').dumps(revision.expense))|safe }}); var expense_data = JSON.parse({{ import('json').dumps(import('json').dumps(revision.expense))|safe }});
var editing = false; var editing = false;
makeGrid(); makeGrid();
$('.jsgrid-filter-row, .jsgrid-insert-row').attr('style', 'display: none !important;'); /* Override Semantic UI */
</script> </script>
{% endblock %} {% endblock %}

View File

@ -141,4 +141,8 @@ function makeGrid() {
onItemUpdated: recalcExpTotal, onItemUpdated: recalcExpTotal,
onRefreshed: recalcExpTotal, onRefreshed: recalcExpTotal,
}); });
if (!editing) {
$('.jsgrid-filter-row, .jsgrid-insert-row').attr('style', 'display: none !important;'); /* Override Semantic UI */
}
} }

View File

@ -85,4 +85,8 @@ function makeGrid() {
onItemUpdated: recalcTotal, onItemUpdated: recalcTotal,
onRefreshed: recalcTotal, onRefreshed: recalcTotal,
}); });
if (!editing) {
$('.jsgrid-filter-row, .jsgrid-insert-row').attr('style', 'display: none !important;'); /* Override Semantic UI */
}
} }