From 50153170b56cdcbb8e22a848411150936c2941a1 Mon Sep 17 00:00:00 2001 From: Rico van Endern <Rico.Hotte@gmail.com> Date: Mon, 16 Nov 2015 16:31:49 +0100 Subject: [PATCH] ne bissle test shit --- config/layouts/default.json | 2 +- panels/mensaPlan/config.php | 58 ++++++++++++------------- panels/mensaPlan/setup/zusatzstoffe.sql | 0 panels/topListe/getTasks.php | 4 ++ panels/topListe/script.js | 44 ++++++++++++++----- panels/topListe/style.less | 4 +- panels/topListe/template.html | 33 +++++--------- 7 files changed, 81 insertions(+), 64 deletions(-) create mode 100644 panels/mensaPlan/setup/zusatzstoffe.sql create mode 100644 panels/topListe/getTasks.php diff --git a/config/layouts/default.json b/config/layouts/default.json index 4651d74..8be73ad 100755 --- a/config/layouts/default.json +++ b/config/layouts/default.json @@ -17,7 +17,7 @@ }, "down": { - "type":"panel","name":"mensaPlan" + "type":"panel","name":"topListe" } } } diff --git a/panels/mensaPlan/config.php b/panels/mensaPlan/config.php index f6162ed..59e1fdd 100644 --- a/panels/mensaPlan/config.php +++ b/panels/mensaPlan/config.php @@ -1,30 +1,30 @@ -<?php -// Universal -$MENSA_URL = "http://www.stwdo.de/gastronomie/speiseplaene/hauptmensa/wochenansicht-hauptmensa/"; -$PARSE_DAYLIST = array ( - "montag", - "dienstag", - "mittwoch", - "donnerstag", - "freitag" -); -$DO_SQL = true; -$DO_JSON = true; - -// SQL -$SQL_SERVER = "ovanier.de"; -$SQL_USER = "info_writer"; -$SQL_PW = "XAHQTZeGbqsnt8K6"; -$SQL_DB = "infoscreen"; - -// JSON -$JSON_NAME = "mensaPlan.json"; -$JSON_INC_NR = false; -$JSON_INC_ORIGINAL = false; -$JSON_INC_SHORT = true; -$JSON_INC_ART = true; -$JSON_INC_KIND = false; -$JSON_INC_COUNTER = true; -$JSON_INC_STOFFE = false; -$JSON_INC_DATE = true; +<?php +// Universal +$MENSA_URL = "http://www.stwdo.de/gastronomie/speiseplaene/hauptmensa/wochenansicht-hauptmensa/"; +$PARSE_DAYLIST = array ( + "montag", + "dienstag", + "mittwoch", + "donnerstag", + "freitag" +); +$DO_SQL = true; +$DO_JSON = true; + +// SQL +$SQL_SERVER = "ovanier.com"; +$SQL_USER = "info_writer"; +$SQL_PW = "XAHQTZeGbqsnt8K6"; +$SQL_DB = "infoscreen"; + +// JSON +$JSON_NAME = "mensaPlan.json"; +$JSON_INC_NR = false; +$JSON_INC_ORIGINAL = false; +$JSON_INC_SHORT = true; +$JSON_INC_ART = true; +$JSON_INC_KIND = false; +$JSON_INC_COUNTER = true; +$JSON_INC_STOFFE = false; +$JSON_INC_DATE = true; ?> \ No newline at end of file diff --git a/panels/mensaPlan/setup/zusatzstoffe.sql b/panels/mensaPlan/setup/zusatzstoffe.sql new file mode 100644 index 0000000..e69de29 diff --git a/panels/topListe/getTasks.php b/panels/topListe/getTasks.php new file mode 100644 index 0000000..8dce5a5 --- /dev/null +++ b/panels/topListe/getTasks.php @@ -0,0 +1,4 @@ +<?php + + +?> \ No newline at end of file diff --git a/panels/topListe/script.js b/panels/topListe/script.js index fef4259..db799dc 100644 --- a/panels/topListe/script.js +++ b/panels/topListe/script.js @@ -1,15 +1,39 @@ this.loaded = function(panel, config) { -<<<<<<< HEAD + addElement("A"); + addElement("B"); + addElement("C"); + addElement("D"); + addElement("E"); + //removeElement(3); + moveElement(3,1); +} -$(function() { - $( "#sortable" ).sortable(); - $( "#sortable" ).disableSelection(); - }); +var lastUpdates; +function pull(){ + } -======= - var $li = $("<li class='ui-state-default'/>").text("BLA"); - $("#sortable").append($li); - $("#sortable").sortable('refresh'); + +function addElement($text){ + var $li = $("<li class='ui-state-default'/>").text($text); + $("#topListSortable").append($li); + $("#topListSortable").sortable(); + $("#topListSortable").disableSelection(); + $("#topListSortable").sortable('refresh'); } ->>>>>>> remotes/origin/dev + +function moveElement($idO,$idN){ + if($idO != $idN) { + if($idO < $idN){ + $("#topListSortable li:eq("+$idO+")").insertAfter($("#topListSortable li:eq("+$idN+")")); + } else { + $("#topListSortable li:eq("+$idO+")").insertBefore($("#topListSortable li:eq("+$idN+")")); + } + $("#topListSortable").sortable('refresh'); + } +} + +function removeElement($id){ + $("#topListSortable li:eq(" + $id+")").remove(); + $("#topListSortable").sortable('refresh'); +} \ No newline at end of file diff --git a/panels/topListe/style.less b/panels/topListe/style.less index 2483010..8aa83bf 100644 --- a/panels/topListe/style.less +++ b/panels/topListe/style.less @@ -30,13 +30,13 @@ font-size: 200%; } -#topListSortable{ +#topListAnzeige{ float: left; width: 100%; height: 25%; } -#sortable { +#topListSortable { font-weight: bold; color: #ffffff; list-style-type: decimal; diff --git a/panels/topListe/template.html b/panels/topListe/template.html index f9387a2..f261b32 100644 --- a/panels/topListe/template.html +++ b/panels/topListe/template.html @@ -1,26 +1,15 @@ -<<<<<<< HEAD <div id="topListe"> -<div id="currentTop"> - <div id="topName"> - TEST1 + <div id="currentTop"> + <div id="topName"> + TEST1 + </div> + <div id="topDescription"> + TEST2 + </div> </div> - <div id="topDescription"> - TEST2 + <div id="topListAnzeige"> + <ol id="topListSortable"> + </ol> </div> </div> -<div id="topListSortable"> - <ol id="sortable"> - <li class="ui-state-default">Item 1</li> - <li class="ui-state-default">Item 2</li> - <li class="ui-state-default">Item 3</li> - <li class="ui-state-default">Item 4</li> - <li class="ui-state-default">Item 5</li> - <li class="ui-state-default">Item 6</li> - <li class="ui-state-default">Item 7</li> - </ol> -</div> -======= -<ul id="sortable"> - <li class="ui-state-default">Item 1</li> -</ul> ->>>>>>> remotes/origin/dev + -- GitLab