www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 55fc4e4488ca067b4a724bd62f8586604d91abb2
parent 4bd8fb082324e363b823dbf0b37e858d5800651c
Author: Georges Dupéron <jahvascriptmaniac+github@free.fr>
Date:   Sun,  8 May 2011 17:22:53 +0200

Utilisation de boutons radio puisqu'android n'est pas capable de gérer les select.

Diffstat:
Mcode/serveur/php/jeu.html | 10+++++-----
Mcode/serveur/php/ressources/pticlic.js | 12+++++-------
2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/code/serveur/php/jeu.html b/code/serveur/php/jeu.html @@ -97,11 +97,11 @@ </div> <div class="screen" id="prefs"> <form id="prefs-form" action="#" method="GET"> - <label id="theme-label" for="theme">Thème : </label> - <select name="theme" id="theme"> - <option value="green">Colline verdoyante</option> - <option value="black">Bas-fond de cachot</option> - </select> + <fieldset id="theme"> + <legend>Thème</legend> + <input type="radio" id="theme-green" name="theme" value="green" checked="checked" /><label for="theme-green">Colline verdoyante</label><br/> + <input type="radio" id="theme-black" name="theme" value="black" /><label for="theme-black">Bas-fond de cachot</label> + </fieldset> <input type="submit" name="prefs-apply" id="prefs-apply" value="Appliquer" /> <input type="reset" name="prefs-cancel" id="prefs-cancel" value="Annuler" /> </form> diff --git a/code/serveur/php/ressources/pticlic.js b/code/serveur/php/ressources/pticlic.js @@ -663,8 +663,6 @@ connection.jss = function(w, h, iconSize) { }; $c("input, label") - .css("white-space", "nowrap") - .css('position', 'absolute') .fitFont(w*0.45, h*0.06, null, null, true, true); $c("#user-label").east({left:w*0.475,top:h*0.25}); $c("#user").west({left:w*0.525,top:h*0.25}); @@ -720,11 +718,11 @@ prefs.jss = function(w,h,iconSize) { } catch(e) {alert("Error anonymous 1 in prefs.jss");alert(e);} }; - $("input, label, select") - .css('position', 'absolute') + $p("input, label") .fitFont(w*0.45, h*0.06, null, null, true, true); - $p("#theme-label").east({left:w*0.475,top:h*0.25}); - $p("#theme").west({left:w*0.525,top:h*0.25}); + $p("legend") + .fitFont(w*0.3, h*0.05, null, null, true, true); + $p("#theme").center({left:w*0.5,top:h*0.25}); $p("#prefs-cancel").east({left:w*0.475,top:h*0.5}); $p("#prefs-apply").west({left:w*0.525,top:h*0.5}); } catch(e) {alert("Error prefs.jss");alert(e);} @@ -741,7 +739,7 @@ prefs.enter = function() { prefs.apply = function(){ try { - var newtheme = $("#theme").val(); + var newtheme = $("input:radio[name=theme]:checked").val(); ajaj.request("server.php?callback=?", { action: 8, key: 'theme',