From 9465c23dab934e11e2b05f57d63988f5d94a88ab Mon Sep 17 00:00:00 2001
From: Tilman Vatteroth <tilman.vatteroth@udo.edu>
Date: Sat, 24 Feb 2018 22:23:59 +0100
Subject: [PATCH] =?UTF-8?q?-=20htaccess=20less=20redirect=20entfernt=20+?=
 =?UTF-8?q?=20CZI=20default=20config=20hinzugef=C3=BCgt=20*=20versucht=20u?=
 =?UTF-8?q?fc=20script=20zu=20fixen..?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 config/layouts/default.json | 83 +++++++++++++++++++++++++++++++++++++
 index.html                  |  4 +-
 js/layoutloader.js          |  2 +-
 panels/ufc/script.js        |  2 +-
 4 files changed, 87 insertions(+), 4 deletions(-)
 create mode 100755 config/layouts/default.json

diff --git a/config/layouts/default.json b/config/layouts/default.json
new file mode 100755
index 0000000..6ff8430
--- /dev/null
+++ b/config/layouts/default.json
@@ -0,0 +1,83 @@
+{
+	"type": "xsplit",
+	"cut": 35,
+	"left": {
+		"type": "panel",
+		"name": "departure",
+		"config": "oh14"
+	},
+	"right": {
+		"type": "ysplit",
+		"cut": 30,
+		"up": {
+			"type": "panel",
+			"name": "clock"
+		},
+		"down": {
+			"type": "cycler",
+			"duration": 5,
+			"panels": [
+				{
+					"type": "panel",
+					"name": "werbung",
+					"config": {
+						"files": [
+							{
+								"filename": "OpenSourceInfoscreen.jpg",
+								"startdate": "NEVER",
+								"enddate": "NEVER"
+							},
+							{
+								"filename": "Folie1.png",
+								"startdate": "NEVER",
+								"enddate": "11.11.2017"
+							},
+							{
+								"filename": "Folie2.png",
+								"startdate": "NEVER",
+								"enddate": "11.11.2017"
+							},
+							{
+								"filename": "Folie3.png",
+								"startdate": "NEVER",
+								"enddate": "11.11.2017"
+							},
+							{
+								"filename": "Folie4.png",
+								"startdate": "NEVER",
+								"enddate": "11.11.2017"
+							},
+							{
+								"filename": "MK_DD_Poster_quer.png",
+								"startdate": "NEVER",
+								"enddate": "16.12.2017"
+							},
+							{
+								"filename": "Hackathon2017.png",
+								"startdate": "NEVER",
+								"enddate": "9.12.2017"
+							},
+							{
+								"filename": "xmas17small.png",
+								"startdate": "NEVER",
+								"enddate": "15.12.2017"
+							}
+						]
+					}
+				},
+				{
+					"type": "panel",
+					"name": "ufc"
+				},
+				{
+					"type": "panel",
+					"name": "mensaPlan"
+				},
+				{
+					"type": "panel",
+					"name": "lsfView"
+				}
+			]
+		}
+	}
+}
diff --git a/index.html b/index.html
index 64b48a1..030ef89 100755
--- a/index.html
+++ b/index.html
@@ -6,8 +6,8 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <link href="favicon.png" type="image/x-icon" rel="icon"/>
     <link rel="stylesheet" href="css/font.css"/>
-    <link rel="stylesheet" href="css/design.less"/>
-    <link rel="stylesheet" href="css/marquee.less"/>
+    <link rel="stylesheet" href="less/style.php?name=css/design.less"/>
+    <link rel="stylesheet" href="less/style.php?name=css/marquee.less"/>
     <link rel="stylesheet" href="css/jquery.ui.css"/>
     <script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
     <script type="text/javascript" src="js/jquery-ui.min.js"></script>
diff --git a/js/layoutloader.js b/js/layoutloader.js
index 730b126..4191c0c 100755
--- a/js/layoutloader.js
+++ b/js/layoutloader.js
@@ -347,7 +347,7 @@ layout.insertTemplate = function (wrap) {
                 });
 
 
-            t.css = $("<link>").attr("rel", "stylesheet").attr("href", "panels/" + n + "/style.less").attr("data-template", t.name);
+            t.css = $("<link>").attr("rel", "stylesheet").attr("href", "less/style.php?name=panels/" + n + "/style.less").attr("data-template", t.name);
 
 
             t.css.on("load", function () {
diff --git a/panels/ufc/script.js b/panels/ufc/script.js
index 193d566..217c705 100755
--- a/panels/ufc/script.js
+++ b/panels/ufc/script.js
@@ -13,7 +13,7 @@ this.loaded=function(panel,config) {
 	} else {
 		semesterString = "winter"+new Date().getFullYear();
 	}
-    $.ajax("https://ufc.tu-dortmund.de/semesters/"+semesterString+".json",{
+    $.ajax("https://ufc.tu-dortmund.de/semesters/current.json",{
         async:false
     })
         .done(function(e) {
-- 
GitLab