X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2Feuphorik.js;h=7af2708220e49117716b02e465d00529b633996e;hp=45b3cbdbe96b767a230a6f17c1123427c3beac1b;hb=a2ee1419f013be953ee768b5b7e95eb423dcf080;hpb=0b34258466c58a805a2cbfe7ef134385b26fed94 diff --git a/js/euphorik.js b/js/euphorik.js index 45b3cbd..7af2708 100755 --- a/js/euphorik.js +++ b/js/euphorik.js @@ -734,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 @@ -757,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(