X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=js%2Feuphorik.js;h=7af2708220e49117716b02e465d00529b633996e;hb=a2ee1419f013be953ee768b5b7e95eb423dcf080;hp=99a461f812c144011524bc6006400f688265faaf;hpb=044398d0ce631201bb0f724450446b90a35d79ce;p=euphorik.git diff --git a/js/euphorik.js b/js/euphorik.js index 99a461f..7af2708 100755 --- a/js/euphorik.js +++ b/js/euphorik.js @@ -106,8 +106,7 @@ var messageType = {informatif: 0, question: 1, erreur: 2} */ Util.prototype.jsonVersAction = function(json) { - // FIXME : ne plus encapsuler json dans de l'xml (problème avec yaws) - return {action: "" + JSON.stringify(json) + "" } + return {action : JSON.stringify(json) } } Util.prototype.md5 = function(chaine) @@ -735,6 +734,16 @@ Client.prototype.majMenu = function() /////////////////////////////////////////////////////////////////////////////////////////////////// +function initialiserListeStyles(client) +{ + jQuery("#menuCss").change( + function() + { + client.setCss("css/" + jQuery("option:selected", this).attr("value") + "/euphorik.css") + } + ) +} + jQuery.noConflict() // charge dynamiquement le script de debug @@ -758,13 +767,7 @@ jQuery(document).ready( // connexion vers le serveur (utilise un cookie qui traine) client.connexionCookie() - // les styles css - for (var i = 1; i <= 3; i++) - { - jQuery("#css"+i).click(function(){ - client.setCss("css/" + jQuery(this).attr("id").charAt(3) + "/euphorik.css") - }) - } + initialiserListeStyles(client) // TODO : pourquoi jQuery(document).unload ne fonctionne pas ? jQuery(window).unload(