diff --git a/webroot/config.php b/webroot/config.php index 1743ab0b6e2121d6363ea313bdcf376b206dbe1a..a567787b8dbda0f46b0c5521cfd19681084e8c61 100644 --- a/webroot/config.php +++ b/webroot/config.php @@ -1,9 +1,9 @@ <?php - $widget_unit_width = 200; - $widget_unit_height = 200; + $widget_unit_width = 185; + $widget_unit_height = 170; - $widget_spacing_x = 40; - $widget_spacing_y = 40; + $widget_spacing_x = 10; + $widget_spacing_y = 10; $widgets = array( //array("widget_name", "style_name", position_x, position_y, size_x, size_y); @@ -11,7 +11,7 @@ array("ZoneOffen", "widget_dark", 4,0, 2,1), array("Dummy", "widget_light", 0,1, 4,2), array("Marvin", "widget_light", 4,1, 2,1), - array("Dummy", "widget_light", 4,2, 2,4), + array("TwitterWall","widget_light", 4,2, 2,4), array("Dummy", "widget_light", 0,3, 1,2), array("Dummy", "widget_dark", 1,3, 2,2), array("Dummy", "widget_light", 3,3, 1,2), diff --git a/webroot/widgets/TwitterWall/TwitterWall.js b/webroot/widgets/TwitterWall/TwitterWall.js deleted file mode 100644 index 422bec4b336707ceec32d87904394a9f368e8203..0000000000000000000000000000000000000000 --- a/webroot/widgets/TwitterWall/TwitterWall.js +++ /dev/null @@ -1,28 +0,0 @@ -function fillContent(response) { - var content = ""; - if (response["tuerOffen"] == false){ - content = "<p><font color='cc0000'>Geschlossen</font></p>"; - } else { - content = "<p><font color='00cc00'>Offen</font></p>"; - } - content += "<p>" + response["tempLounge"] + "°C</p>"; - content += "<p>" + response["tempWerkstatt"] + "°C</p>"; - $("#ZoneOffen_values").html(content); -} - -function updateZoneOffen () { - $.getJSON("widgets/ZoneOffen/ajax.php", function (response) - { - fillContent(response); - }); -} - - -$(document).ready(function() - { - addFunctionToMinuteTimer(updateZoneOffen); - updateZoneOffen(); - } -); - - diff --git a/webroot/widgets/TwitterWall/TwitterWall.php b/webroot/widgets/TwitterWall/TwitterWall.php index 26b6b07039ec70a73a28443762dbc9b55423b168..2c93bbeb11cd0b8b770d0b1a7f2f5030780da630 100644 --- a/webroot/widgets/TwitterWall/TwitterWall.php +++ b/webroot/widgets/TwitterWall/TwitterWall.php @@ -12,7 +12,19 @@ class TwitterWall implements iWidget public function giveOutput() { - $widgetOutput = '<script src="widgets/TwitterWall/TwitterWall.js" type="text/javascript"></script>'."\n"; + $widgetOutput = ' + <script src="widgets/TwitterWall/jquery.tweet.js" type="text/javascript"></script> + <script type="text/javascript"> + $(document).ready(function(){ + $(".tweet").tweet({ + username: "warpzone_ms", + avatar_size: 64, + count: 5, + loading_text: "loading tweets..." + }); + }); + </script>'."\n"; + $widgetOutput .= '<div class="tweet"></div>'."\n"; return $widgetOutput; }