summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics_reporting
diff options
context:
space:
mode:
authorSimon Rettberg2017-02-01 12:02:09 +0100
committerSimon Rettberg2017-02-01 12:02:09 +0100
commitac4dba11670f93289ca6318c3c06b49bf4ec0811 (patch)
treec9932434bbe226b45a638b80b07753060dab2fb5 /modules-available/statistics_reporting
parent[statistics_reporting] Make code match specification (diff)
downloadslx-admin-ac4dba11670f93289ca6318c3c06b49bf4ec0811.tar.gz
slx-admin-ac4dba11670f93289ca6318c3c06b49bf4ec0811.tar.xz
slx-admin-ac4dba11670f93289ca6318c3c06b49bf4ec0811.zip
[statistics_reporting] Fix loadForm() and further js interaction if sessionStorage is still empty
Diffstat (limited to 'modules-available/statistics_reporting')
-rw-r--r--modules-available/statistics_reporting/templates/columnChooser.html9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules-available/statistics_reporting/templates/columnChooser.html b/modules-available/statistics_reporting/templates/columnChooser.html
index 513bc36b..cfaf086c 100644
--- a/modules-available/statistics_reporting/templates/columnChooser.html
+++ b/modules-available/statistics_reporting/templates/columnChooser.html
@@ -159,9 +159,12 @@
var cutoff = getQueryVariable("cutoff");
$('#select-cutoff').val(cutoff ? cutoff : 7);
- sessionStorage.getItem("buttons").split(" ").forEach(function(button) {
- toggleButton(button.substr(7));
- });
+ var buttons = sessionStorage.getItem("buttons");
+ if (buttons) {
+ buttons.split(" ").forEach(function (button) {
+ toggleButton(button.substr(7));
+ });
+ }
}
function getQueryVariable(variable)