Skip to content
Snippets Groups Projects
Commit b354edbb authored by ands's avatar ands
Browse files

Merge branch 'master' of /media/TBmyBook/marvin

Conflicts:
	webroot/index.php
parents 4cc75a2b 4d9bf750
No related branches found
No related tags found
No related merge requests found
<head> <head>
<link rel="stylesheet" type="text/css" href="css/widget.css" /> <link rel="stylesheet" type="text/css" href="css/widget.css" />
<script src="/js/jquery-1.4.4.js" type="text/javascript"></script>
<title>Warpzone's Marvin</title> <title>Warpzone's Marvin</title>
<script src="js/jquery-1.4.4.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<img src="img/warpzone.png"> <img src="img/warpzone.png">
......
function fillContent(response) {
if (response["TuerOffen"] == false){
$("#ZoneOffen_open").html(" <font color='red'>geschlossen!</font>");
} else {
$("#ZoneOffen_open").html(" <font color='green'>geöffnet!</font>");
}
$("#ZoneOffen_templounge").html(response["tempLounge"]);
$("#ZoneOffen_tempwerkstatt").html(response["tempWerkstatt"]);
}
function updateZoneOffen () {
$.getJson("widgets/ZoneOffen/ajax.php", function (response)
{
fillContent(response);
}, "json");
}
$(document).ready(function()
{
//Zuerst einmal nur einmal laden
updateZoneOffen();
}
);
...@@ -12,8 +12,10 @@ class ZoneOffen implements iWidget ...@@ -12,8 +12,10 @@ class ZoneOffen implements iWidget
public function giveOutput() public function giveOutput()
{ {
$widgetOutput = "Test\n"; $widgetOutput = '<script src="widgets/ZoneOffen/ZoneOffen.js" type="text/javascript"></script>'."\n";
$widgetOutput .= '<script src="/widgets/ZoneOffen/ZoneOffen.js" type="text/javascript"></script>'."\n"; $widgetOutput .= '<div>Die Zone ist <span id="ZoneOffen_open"></span></div>'."\n";
$widgetOutput .= '<div>Lounge <span id="ZoneOffen_templounge"></span></div>'."\n";
$widgetOutput .= '<div>Werkstatt <span id="ZoneOffen_tempwerkstatt"></span></div>'."\n";
return $widgetOutput; return $widgetOutput;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment