From 3fcf12655cef30f722adab57086e205b16a5f5ba Mon Sep 17 00:00:00 2001
From: Andreas <andreasv@fsmpi.rwth-aachen.de>
Date: Sat, 20 May 2017 10:33:08 +0200
Subject: [PATCH] no longer showing "loading" as viewcount if there is no data

---
 templates/course.html | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/templates/course.html b/templates/course.html
index d06c17a..aade34a 100644
--- a/templates/course.html
+++ b/templates/course.html
@@ -99,6 +99,12 @@ $.ajax({
 		for (var i=0; i<counter.length; i++) {
 			$(counter[i]).text(dates[$(counter[i]).data("lecturedate")]);
 		}
+		var counter = $(".viewcounter");
+		for (var i=0; i<counter.length; i++) {
+			if ($(counter[i]).text() == "loading...") {
+				$(counter[i]).text("0");
+			}
+		}
 	}
 });
 </script>
-- 
GitLab