From 62e2f6b4c8fb833edb1bfd8e3ae874924ee56f10 Mon Sep 17 00:00:00 2001
From: Julian Rother <julianr@fsmpi.rwth-aachen.de>
Date: Thu, 16 Feb 2017 00:30:38 +0100
Subject: [PATCH] Auto-collapse "Zeitlos"-panel for xs, closes #222

---
 templates/base.html    | 2 +-
 templates/courses.html | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/templates/base.html b/templates/base.html
index 2a63033..725f42f 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -109,7 +109,7 @@
 				{% if page_border == 0 %}
 				<div class="col-xs-12">
 				{% else %}
-				<div class="col-xs-12 col-md-offset-{{ page_border }} col-md-{{ 12-(2*page_border) }}">
+				<div id="content-col" class="col-xs-12 col-md-offset-{{ page_border }} col-md-{{ 12-(2*page_border) }}">
 				{% endif %}
 					{% for msg in get_flashed_messages() %}
 					<div class="hidden-print alert alert-danger" role="alert">{{ msg|safe }}</div>
diff --git a/templates/courses.html b/templates/courses.html
index bab3781..71d1664 100644
--- a/templates/courses.html
+++ b/templates/courses.html
@@ -57,4 +57,9 @@
 	</div></div>
 </div>
 {% endfor %}
+<script>
+if ($("#content-col").css("margin-left") == "0px") {
+	$("#zeitlos").removeClass('in')
+}
+</script>
 {% endblock %}
-- 
GitLab