MOD présentation des css sous la forme d'une liste box.
[euphorik.git] / js / euphorik.js
index 45b3cbd..7af2708 100755 (executable)
@@ -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)\r
       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(