summaryrefslogtreecommitdiff
path: root/public/static/js/collapse.js
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-10-10 09:55:22 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-10-10 09:55:22 +0200
commita7c3539c6f0cb0497a24f579a98578203eea18a7 (patch)
treee9d81d5b0e7d23e3804c00429bc4a548675fca59 /public/static/js/collapse.js
parentbcc02b1935c367db49d57856eccf5152a91b6c45 (diff)
Do not break departure refresh when detail view is open3.4.1
Diffstat (limited to 'public/static/js/collapse.js')
-rw-r--r--public/static/js/collapse.js21
1 files changed, 14 insertions, 7 deletions
diff --git a/public/static/js/collapse.js b/public/static/js/collapse.js
index 817d120..9fa2e89 100644
--- a/public/static/js/collapse.js
+++ b/public/static/js/collapse.js
@@ -1,11 +1,18 @@
function reload_app() {
- $.get(window.location.href, {ajax: 1}, function(data) {
- $('div.app > ul').html(data);
- dbf_reg_handlers();
- setTimeout(reload_app, 60000);
- }).fail(function() {
- setTimeout(reload_app, 10000);
- });
+ // TODO use a variable instead of window.location.href, as
+ // window.locatin.href may be /z/...
+ // Until then, we guard it by only reloading whin moreinfo is not expanded.
+ if ($('.expanded-moreinfo').length == 0) {
+ $.get(window.location.href, {ajax: 1}, function(data) {
+ $('div.app > ul').html(data);
+ dbf_reg_handlers();
+ setTimeout(reload_app, 60000);
+ }).fail(function() {
+ setTimeout(reload_app, 10000);
+ });
+ } else {
+ setTimeout(reload_app, 30000);
+ }
}
function dbf_reg_handlers() {