Skip to content
Snippets Groups Projects
Commit ac5b4caa authored by Rico's avatar Rico
Browse files

+tabbedPlan is noch minimal und unsortiert

parent 8bbe0c4b
No related branches found
No related tags found
No related merge requests found
Showing
with 53 additions and 18 deletions
css/design.css 100644 → 100755
File mode changed from 100644 to 100755
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<link rel="stylesheet" href="css/design.css"> <link rel="stylesheet" href="css/design.css">
<link rel="stylesheet" href="css/marquee.css"> <link rel="stylesheet" href="css/marquee.css">
<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script> <script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/jquery.jcookie.min.js"></script> <script type="text/javascript" src="js/jquery.jcookie.min.js"></script>
<script type="text/javascript" src="js/marquee.js"></script> <script type="text/javascript" src="js/marquee.js"></script>
<script type="text/javascript" src="js/panelAPI.js"></script> <script type="text/javascript" src="js/panelAPI.js"></script>
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
File mode changed from 100644 to 100755
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -13,7 +13,6 @@ this.loaded = function(panel, config) { ...@@ -13,7 +13,6 @@ this.loaded = function(panel, config) {
} }
function fillTable( json ) { function fillTable( json ) {
var tableBody = document.getElementById("mensaPlanTableBody");
var day = new Date(); var day = new Date();
switch(day.getDay()){ switch(day.getDay()){
case 0: case 0:
...@@ -26,7 +25,6 @@ this.loaded = function(panel, config) { ...@@ -26,7 +25,6 @@ this.loaded = function(panel, config) {
var gerichte = json.dienstag.gerichte; var gerichte = json.dienstag.gerichte;
break; break;
case 3: case 3:
console.log("BLA");
var gerichte = json.mittwoch.gerichte; var gerichte = json.mittwoch.gerichte;
break; break;
case 4: case 4:
...@@ -39,18 +37,35 @@ this.loaded = function(panel, config) { ...@@ -39,18 +37,35 @@ this.loaded = function(panel, config) {
var gerichte = json.samstag.gerichte; var gerichte = json.samstag.gerichte;
break; break;
} }
var tableBody = document.getElementById("mensaPlanTable1Body");
tableBody.innerHtml = ""; tableBody.innerHtml = "";
var counter = 0;
var j = 0;
for(var i=0;i<gerichte.length;i++){ for(var i=0;i<gerichte.length;i++){
if(counter >= gerichte.length/2){
tableBody = document.getElementById("mensaPlanTable2Body");
tableBody.innerHtml = "";
j=0;
} else {
counter++;
}
var gericht = gerichte [i]; var gericht = gerichte [i];
var row = tableBody.insertRow(i); var row = tableBody.insertRow(j);
var cell1 = row.insertCell(0); var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1); var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2); var cell3 = row.insertCell(2);
cell1.innerHTML = gericht.gericht; cell1.innerHTML = gericht.gericht;
cell2.innerHTML = gericht.art; cell2.innerHTML = gericht.art;
cell3.innerHTML = '<img src="'+gericht.kategorie+'" />'; cell3.innerHTML = '<img src="../panels/mensaPlan/img/'+gericht.kategorie+'" />';
j++;
} }
} }
getMensaPlan(); getMensaPlan();
$(function() {
$( "#tabs" ).tabs();
});
setInterval(function(){var currentTab = $("#tabs").tabs('option', 'active');if(currentTab==0){currentTab=1;}else{currentTab=0;};$( "#tabs" ).tabs({ active: currentTab });}, 120000);
} }
<table id="mensaPlanTable" style="width:100%;height:100%"> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<thead id="mensaPlanTableHead">
<tr> <div id="tabs">
<th colspan="3">Hauptmensa</th> <ul>
</tr> <li><a href="#tabs-1">Normale Counter</a></li>
<tr> <li><a href="#tabs-2">Grill etc. Counter</a></li>
<th>Gericht</th> </ul>
<th>Art</th> <div id="tabs-1">
<th>Kategorie</th> <table id="mensaPlanTable1" style="width:100%;height:100%">
</tr> <tbody id="mensaPlanTable1Body">
</thead> </tbody>
<tbody id="mensaPlanTableBody"> </table>
</tbody> </div>
</table> <div id="tabs-2">
\ No newline at end of file <table id="mensaPlanTable2" style="width:100%;height:100%">
<tbody id="mensaPlanTable2Body">
</tbody>
</table>
</div>
</div>
File mode changed from 100644 to 100755
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment