From 81bf7cb7858d37f316d76bb4469a1ada72766680 Mon Sep 17 00:00:00 2001 From: Chouchen Date: Tue, 21 Sep 2010 16:07:23 +0000 Subject: [PATCH] Ajout du module OUI FM Radio --- class/Clock.php | 6 +++++- class/Ouifm.php | 33 +++++++++++++++++++++++++++++++++ css/main.css | 3 ++- images/interface/music.png | Bin 0 -> 385 bytes js/jquery.ouifm.js | 12 ++++++++++++ 5 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 class/Ouifm.php create mode 100644 images/interface/music.png create mode 100644 js/jquery.ouifm.js diff --git a/class/Clock.php b/class/Clock.php index 61b8e34..5c0ed2f 100644 --- a/class/Clock.php +++ b/class/Clock.php @@ -24,6 +24,10 @@ class clock extends Module { } public static function updateConfig($updated){ - + foreach ($updated as $what=>$withWhat){ + if(in_array($what, self::$paramsList)){ + call_user_func(array(get_class(), "set".ucfirst($what)), $withWhat); + } + } } } \ No newline at end of file diff --git a/class/Ouifm.php b/class/Ouifm.php new file mode 100644 index 0000000..a98d322 --- /dev/null +++ b/class/Ouifm.php @@ -0,0 +1,33 @@ +setParams($params); + echo ''; + echo '
'; + } + + private function setParams($params){ + $this->params = $params; + } + + public static function start($params){ + $ouifm = new ouifm($params); + } + + public static function updateConfig($updated){ + foreach ($updated as $what=>$withWhat){ + if(in_array($what, self::$paramsList)){ + call_user_func(array(get_class(), "set".ucfirst($what)), $withWhat); + } + } + } +} \ No newline at end of file diff --git a/css/main.css b/css/main.css index 19f68c4..9b2adf9 100644 --- a/css/main.css +++ b/css/main.css @@ -234,7 +234,8 @@ #recherche{margin-top:70px;} #config {width:300px;} - #config-menu, #blog-links-manager, #city-menu , #jclockAdvanced-menu, #links-menu{float:right; margin:12px 10px 0 0;} + #config-menu, #blog-links-manager, #city-menu , #jclockAdvanced-menu, #links-menu, #ouifm-menu{float:right; margin:12px 10px 0 0;} + #ouifm{position:absolute;width:144px;height:28px;} /* Green button class: */ a.green-button,a.green-button:visited, span.green-button{ diff --git a/images/interface/music.png b/images/interface/music.png new file mode 100644 index 0000000000000000000000000000000000000000..a8b3ede3df956f8d505543b190bc8d1b5b4dce75 GIT binary patch literal 385 zcmV-{0e=38P)klCE>?a@fNhGaV ftv%qM$TQzJ6;XjO8erVL00000NkvXXu0mjfw}q7O literal 0 HcmV?d00001 diff --git a/js/jquery.ouifm.js b/js/jquery.ouifm.js new file mode 100644 index 0000000..ea6bae7 --- /dev/null +++ b/js/jquery.ouifm.js @@ -0,0 +1,12 @@ +$(document).ready(function(){ +$('body').append(''); + $('#menu-bar').prepend($('#ouifm-menu')); + + $('#ouifm-menu').click(function(){ + var radioUrl_adswizz="http://ouifm.ice.infomaniak.ch/ouifm-high.mp3"; + // radioUrl_adswizz=com_adswizz_synchro_decorateUrl(radioUrl_adswizz); + + var player_object_adswizz=''; + $('#ouifm').html(player_object_adswizz); + }); +}); \ No newline at end of file