Index: extensions/set_plugins/js/field_set.js
===================================================================
--- extensions/set_plugins/js/field_set.js	(revision 11276)
+++ extensions/set_plugins/js/field_set.js	(revision 11385)
@@ -1,2 +1,9 @@
+function raffraichir() {
+  n = 1;
+ // jQuery("#form_set_plugins").submit();
+}
+
+
+
 jQuery("fieldset").hide();
 jQuery(document).ready(function () {
@@ -10,14 +17,20 @@
   }
   var h_min = 0;
+  var liste_des_plugins = {};
+  jQuery(window).load(function () {
+    if (jQuery(".titrePage").length >= 1) {
+      if (jQuery("span.sort").length >= 1)
+        jQuery("#titrePage").before(jQuery("span.sort"));
+      jQuery(".titrePage ").hide();
+    }
 
-  jQuery(window).load(function () {
     if (jQuery("fieldset").length >= 1) {
-
-      jQuery("div.titrePage h2").parent().hide();
-
       var reg = new RegExp("[,]", "g");
       liste_visible = jQuery("input[name=list_visible]").val();
-      n1 = liste_visible;
-      liste = n1.split(reg);
+      if (typeof liste_visible == "undefined") {
+        liste_visible = "on,on,on,on";
+        jQuery("input[name=list_visible]").val(liste_visible);
+      }
+      liste = liste_visible.split(reg);
       reg = new RegExp("['off']", "g");
       jQuery("fieldset").each(
@@ -35,6 +48,6 @@
             liste[i] = "off";
 
-           h_min = jQuery("#" + this.id + ' legend').height();
-            jQuery(this).height(h_min + 5);
+            h_min = jQuery("#" + this.id + ' legend').height();
+            jQuery(this).height(h_min + 0);
 
             jQuery("#" + this.id + ' legend').prepend(
@@ -58,13 +71,21 @@
 
             n = jQuery(this).parent().hasClass("visible");
-            jQuery(this).css("color", "red");
+            //   jQuery(this).css("color", "red");
 
             i = jQuery(jQuery(this).parent()).attr("rel");
             liste_visible = jQuery("input[name=list_visible]").val();
-            liste = liste_visible.split(",");
+            if (typeof liste_visible == "undefined") {
+              liste_visible = "on,on,on,on";
+              jQuery("input[name=list_visible]").val(liste_visible);
+            }
+            // src = jQuery(this).find("img").attr("src");
             if (n) {
-              jQuery(this).parent().height(h_min + 5);
+              jQuery(this).parent().height(h_min + 0);
               jQuery(this).parent().removeClass("visible");
               liste[i] = "off";
+              jQuery(this).find("img").attr({
+                src: plus_path
+
+              });
             }
             else {
@@ -72,16 +93,19 @@
               jQuery(this).parent().addClass("visible");
               liste[i] = "on";
+              jQuery(this).find("img").attr({
+                src: minus_path
+
+              });
             }
-
-
             val = liste.join(",");
             jQuery("input[name=list_visible]").val(val);
+            jQuery('#set').val("true");
 
             jQuery.ajax({
               type: "POST",
               async: true,
-              data: "list_visible=" + val,
+              data: { list_visible: val, set: "true" },
               success: function (msg) {
-                jQuery("#form_set_plugins").submit();
+                // jQuery("#form_set_plugins").submit();
               }
             });
@@ -97,47 +121,40 @@
           jQuery(this).click(function (event) {
             jQuery(this).css("color", "red");
-            action = jQuery(this).attr('rel');
-            if (action == "Deactivate")
-              liste_plugins = jQuery(this).parent().parent().text();
-            else if (action == "Activate")
-              liste_plugins = jQuery(this).parent().parent().text();
-
+            jQuery('#set').val("true");
           }); // click
 
         }); //each
-
       jQuery("input[name=list_visible]").val(liste.join(","));
       jQuery("fieldset").show();
     } // fielset
     //====================================================================
-    jQuery("td a").click(function (event) {
-      l1 = jQuery('#liste').text();
-      l = l1.split(new RegExp("\n", "g"));
+    jQuery(".pluginBox a").click(function (event) {
+      var link = event.target.href;
+      if (link.indexOf("?") != -1) {
+        var query = link.split("?")[1];
+        eval("query = {" + query.replace(/&/ig, "\",").replace(/=/ig, ":\"") + "\"};");
+        jQuery('#add_plugins').val(query.plugin);
+        jQuery('#set').val("true");
+        val = liste.join(",");
 
-      list = jQuery('liste_plugins');
+        jQuery.ajax({
+          type: "POST",
+          async: true,
+          data: { add_plugins: query.plugin,
+           set: "true",
+           list_visible: val
+            }
+           ,
+          success: function (data) {
+          //  jQuery("#form_set_plugins").submit();
 
-      var reg = new RegExp("[?]", "g");
-      ret_args = new Array;
-      var args = event.target.href.split(reg)[1];
-      reg = new RegExp("[&]", "g");
-      var tableau = args.split(reg);
-      for (i = 0; i < tableau.length; i++) {
-        vals = tableau[i].split("=");
-        ret_args[vals[0]] = vals[1];
+          }
+        });
+
       }
-      if (ret_args['action'] == "deactivate") {
-
-        list = jQuery('list');
-        n = 1;
-      } else if (ret_args['action'] == "activate") {
-
-        list = jQuery('liste_plugins');
-        n = 0;
-      }
-
 
     })
 
   }); // load
-});                     //ready           
+});                                                               //ready           
            
