diff --git a/webroot/config.php b/webroot/config.php index 4fc3198f218fc3393489d5b68dcc9088553f8637..ba2d461b6db8d4e13c5f2c975f1a6a8f59d0c5b7 100644 --- a/webroot/config.php +++ b/webroot/config.php @@ -12,9 +12,9 @@ array("RSSFeed", "widget_light", 0,1, 3,2), array("Wettervorhersage", "widget_light", 3,1, 1,2), array("TwitterWall", "widget_light", 4,1, 2,4), - array("Dummy", "widget_light", 0,3, 2,2), + array("Prepaid", "widget_light", 0,3, 2,3), array("Dummy", "widget_dark", 2,3, 2,2), - array("Dummy", "widget_light", 0,5, 4,1), + array("Dummy", "widget_light", 2,5, 2,1), array("Marvin", "widget_light", 4,5, 2,1) ); ?> diff --git a/webroot/css/marvin.css b/webroot/css/marvin.css index 427ed5b298928ba32188946c5bfffde5c4023ff6..225809c76c553ffca8696ca518095d3362684987 100644 --- a/webroot/css/marvin.css +++ b/webroot/css/marvin.css @@ -3,4 +3,5 @@ body background-color:#261C13; font-family:Lucida Grande, Lucida Sans Unicode, Calibri, Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; font-size:15pt; + cursor:default; } diff --git a/webroot/css/widget.css b/webroot/css/widget.css index 30d6cc11c2ba6a6dd7d27a8a6fca13562227807f..2314a0ac50550af584a8acd27bac24f110e7a185 100644 --- a/webroot/css/widget.css +++ b/webroot/css/widget.css @@ -1,4 +1,5 @@ .widget, .widget td, .widget div { font-family: inherit; color:#000000; + cursor:default; } diff --git a/webroot/css/widget_dark.css b/webroot/css/widget_dark.css index 032f046589863bfa4452f4e2e1295211965e14c3..a94e6604f9f863b03c8c57fd3ed99cd66ed5dbcc 100644 --- a/webroot/css/widget_dark.css +++ b/webroot/css/widget_dark.css @@ -3,10 +3,12 @@ background-color:#362C23; font-family: inherit; color:#ffffff; + cursor:default; } .widget_dark td, .widget_dark div { font-family: inherit; color:#ffffff; + cursor:default; } .widget_dark a, .widget_dark a:hover, .widget_dark a:visited, .widget_dark a:active { text-decoration:none; @@ -14,4 +16,5 @@ font-size: 1em; font-style: normal; color: #aaaaaa; + cursor:default; } diff --git a/webroot/css/widget_light.css b/webroot/css/widget_light.css index 6ff0091e5609ebf4ccf876c2a8c10ed23af815f3..22ce0d63a3366d4870136a05de9e7d9ace4b127d 100644 --- a/webroot/css/widget_light.css +++ b/webroot/css/widget_light.css @@ -4,12 +4,30 @@ font-family: inherit; color:#000000; overflow:hidden; + cursor:default; } .widget_light td, .widget_light div { font-family: inherit; margin: 0; position:relative; + cursor:default; +} + +.widget_light .invisiblebox { + font-family: inherit; + margin: 10; + padding: 0; + cursor:default; +} + +.widget_light .table { + border: 1px dashed #F2EFE5; + background-color:#95897E; + font-family: inherit; + margin: 0; + padding: 2; + cursor:default; } .widget_light .box { @@ -19,6 +37,7 @@ color:#000000; margin: 10; position:relative; + cursor:default; } .widget_light h1 { @@ -28,6 +47,7 @@ padding: 0; font-family: inherit; font-size: 1.0em; + cursor:default; } .widget_light h2 { margin: 0; @@ -35,6 +55,7 @@ font-family: inherit; font-size: 0.8em; color: #111111; + cursor:default; } .widget_light h3 { margin: 0; @@ -42,6 +63,7 @@ font-family: inherit; font-size: 0.6em; color: #222222; + cursor:default; } .widget_light ul { @@ -52,6 +74,7 @@ overflow:hidden; position:relative; height:auto; + cursor:default; } .widget_light li { background-color:#95897E; @@ -59,9 +82,11 @@ border-bottom: 1px dashed #F2EFE5; width: 100%; color: #333333; + cursor:default; } .widget_light li img { padding: 4; + cursor:default; } .widget_light a, .widget_light a:hover, .widget_light a:visited, .widget_light a:active { @@ -70,9 +95,11 @@ font-size: 1em; font-style: normal; color: #333333; + cursor:default; } .widget_light img { float:left; + cursor:default; } diff --git a/webroot/widgets/Prepaid/Prepaid.js b/webroot/widgets/Prepaid/Prepaid.js new file mode 100644 index 0000000000000000000000000000000000000000..bfd84ea5301a7ec73e8adda8937d2d132df38f98 --- /dev/null +++ b/webroot/widgets/Prepaid/Prepaid.js @@ -0,0 +1,42 @@ +function fillPrepaid(response) { + var content = '<h1>Warpzone Prepaid</h1>'; + jQuery.each(response, function(k,v) { + content += '<table class="invisiblebox" style="margin-top:0;margin-bottom:0;">'; + content += '<tr><td colspan="7"><h2>'+k+':</h2></td><td colspan="3" align="right"><h2 onclick="setPrepaid(\''+k+'\',0)">Neue Karte</h2></td></tr>'; + content += '<tr>'; + for(var i=0; i<v; i++) { + content += '<td class="table" style="background-image:url(widgets/Prepaid/img/cross.png);background-position:center center;">50c</td>'; + } + for(var i=v; i<10; i++) { + var value = i; + value++; + content += '<td class="table" onclick="setPrepaid(\''+k+'\','+value+')">50c</td>'; + } + content += '</tr>'; + content += '</table>'; + }); + $("#Prepaid").html(content); +} + +function setPrepaid(k,v) { + $.getJSON("widgets/Prepaid/ajax.php?name="+k+"&value="+v, function (response) + { + fillPrepaid(response); + }); +} + +function updatePrepaid() { + $.getJSON("widgets/Prepaid/ajax.php", function (response) + { + fillPrepaid(response); + }); +} + +$(document).ready(function() + { + addFunctionToMinuteTimer(updatePrepaid); + updatePrepaid(); + } +); + + diff --git a/webroot/widgets/Prepaid/Prepaid.php b/webroot/widgets/Prepaid/Prepaid.php new file mode 100644 index 0000000000000000000000000000000000000000..10e3f075e5a4796a3edf57af9187a371ebfe15a4 --- /dev/null +++ b/webroot/widgets/Prepaid/Prepaid.php @@ -0,0 +1,20 @@ +<?php + +require_once 'widgets/iWidget.php'; + +class Prepaid implements iWidget +{ + public function __construct($width, $height) + { + + } + + public function giveOutput() + { + $widgetOutput = '<script src="widgets/Prepaid/Prepaid.js" type="text/javascript"></script>'."\n"; + $widgetOutput .= '<span id="Prepaid"></span>'."\n"; + return $widgetOutput; + } +} + +?> diff --git a/webroot/widgets/Prepaid/ajax.php b/webroot/widgets/Prepaid/ajax.php new file mode 100644 index 0000000000000000000000000000000000000000..9fb81d08dde6781cc45085727e5f2164d456a9d5 --- /dev/null +++ b/webroot/widgets/Prepaid/ajax.php @@ -0,0 +1,29 @@ +<?php + $infile = fopen("karten.txt","r"); + if($infile) + { + while(!feof($infile)) + { + $name = trim(fgets($infile, 256)); + $value = trim(fgets($infile, 256)); + if($name && isset($value)) + $antwortArray[$name] = $value; + } + fclose($infile); + } + + if(isset($_GET["name"],$_GET["value"])) + { + $antwortArray[$_GET["name"]] = $_GET["value"]; + + $file = fopen("karten.txt","w"); + foreach($antwortArray as $name => $value) + { + fputs($file, $name."\n"); + fputs($file, $value."\n"); + } + fclose($file); + } + + print(json_encode($antwortArray)); +?> diff --git a/webroot/widgets/Prepaid/img/cross.png b/webroot/widgets/Prepaid/img/cross.png new file mode 100644 index 0000000000000000000000000000000000000000..4621e50e9cba51c2451d62bd86009542f43a3d3d Binary files /dev/null and b/webroot/widgets/Prepaid/img/cross.png differ diff --git a/webroot/widgets/Prepaid/karten.txt b/webroot/widgets/Prepaid/karten.txt new file mode 100644 index 0000000000000000000000000000000000000000..627eb3a5e4f4eb9054fff6892ea4289df89293b0 --- /dev/null +++ b/webroot/widgets/Prepaid/karten.txt @@ -0,0 +1,2 @@ +ands +0 diff --git a/webroot/widgets/TwitterWall/TwitterWall.php b/webroot/widgets/TwitterWall/TwitterWall.php index b4172cd0edb700c181b5621db0649987d64b0e46..ef25b4d10cdf5359379747bea0befb185a0f2d7f 100644 --- a/webroot/widgets/TwitterWall/TwitterWall.php +++ b/webroot/widgets/TwitterWall/TwitterWall.php @@ -20,7 +20,7 @@ class TwitterWall implements iWidget <script type="text/javascript"> $(document).ready(function(){ $(".tweet").tweet({ - avatar_size: 55, + avatar_size: 53, count: '.$this->lines.', loading_text: "loading tweets...", query: "#warpzone",