summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYingtong Li <runassudo@yingtongli.me>2020-07-16 17:08:08 +1000
committerYingtong Li <runassudo@yingtongli.me>2020-07-16 17:08:08 +1000
commit5bf2f310d652ad85281302ea97756248c0cae059 (patch)
treef1090f3a1a90d35ff3f3186bf5a6a366e1fdd767
parenteb46c82ae1370d5fcc8f80e5dd799af5dc8312a4 (diff)
Hide jsGrid filter/insert rows in mobile view correctly on all pages
-rw-r--r--sstreasury/jinja2/sstreasury/budget_view.html2
-rw-r--r--sstreasury/static/sstreasury/budget.js4
-rw-r--r--sstreasury/static/sstreasury/claim.js4
3 files changed, 8 insertions, 2 deletions
diff --git a/sstreasury/jinja2/sstreasury/budget_view.html b/sstreasury/jinja2/sstreasury/budget_view.html
index 432a11c..2708a30 100644
--- a/sstreasury/jinja2/sstreasury/budget_view.html
+++ b/sstreasury/jinja2/sstreasury/budget_view.html
@@ -363,7 +363,5 @@
var expense_data = JSON.parse({{ import('json').dumps(import('json').dumps(revision.expense))|safe }});
var editing = false;
makeGrid();
-
- $('.jsgrid-filter-row, .jsgrid-insert-row').attr('style', 'display: none !important;'); /* Override Semantic UI */
</script>
{% endblock %}
diff --git a/sstreasury/static/sstreasury/budget.js b/sstreasury/static/sstreasury/budget.js
index 01924a0..bd2199d 100644
--- a/sstreasury/static/sstreasury/budget.js
+++ b/sstreasury/static/sstreasury/budget.js
@@ -141,4 +141,8 @@ function makeGrid() {
onItemUpdated: recalcExpTotal,
onRefreshed: recalcExpTotal,
});
+
+ if (!editing) {
+ $('.jsgrid-filter-row, .jsgrid-insert-row').attr('style', 'display: none !important;'); /* Override Semantic UI */
+ }
}
diff --git a/sstreasury/static/sstreasury/claim.js b/sstreasury/static/sstreasury/claim.js
index 9f2a299..422390d 100644
--- a/sstreasury/static/sstreasury/claim.js
+++ b/sstreasury/static/sstreasury/claim.js
@@ -85,4 +85,8 @@ function makeGrid() {
onItemUpdated: recalcTotal,
onRefreshed: recalcTotal,
});
+
+ if (!editing) {
+ $('.jsgrid-filter-row, .jsgrid-insert-row').attr('style', 'display: none !important;'); /* Override Semantic UI */
+ }
}
Contact (issues, pull requests, etc.) at git@yingtongli.me. Generated by cgit.