Index: /extensions/set_plugins/include/affiche.php
===================================================================
--- /extensions/set_plugins/include/affiche.php	(revision 11496)
+++ /extensions/set_plugins/include/affiche.php	(revision 11497)
@@ -7,8 +7,5 @@
 global $list_visible, $state,$liste_plugins;
 global $set_plugins_parametres;
-global $nb,$liste,$state,$list_visible,$add_plugins;
-if (isset($conf['set_plugins'])) $set_plugins_parametres =  unserialize($conf['set_plugins']);
-  $nb=set_plugins::set_var('nb','10');
-  
+global $nb,$liste,$state,$list_visible,$add_plugins,$edited_file,$set;
   $plugins = new plugins();
   $plugins->sort_fs_plugins('name');
@@ -18,61 +15,72 @@
   $action_url = $base_url.'&amp;plugin='.'%s'.'&amp;pwg_token='.get_pwg_token();
 
+if (isset($conf['set_plugins'])) $set_plugins_parametres =  unserialize($conf['set_plugins']);
+ 
+ $nb=set_plugins::set_var('nb','10');
+
   $liste = set_plugins::set_var('liste',array()); 
-   if (isset($liste[0]) && is_array($liste[0]))
-            $liste = array();
-   $liste= array_unique($liste);
-
+  $liste= array_unique($liste);
   $state=set_plugins::set_var('state',"active"); 
   $list_visible=set_plugins::set_var('list_visible',"on,on,on,on"); 
   $add_plugins=set_plugins::set_var('add_plugins',""); 
-  
-global $set;
+  $set=set_plugins::set_var('set',false); 
+  $edited_file=set_plugins::get_file_name();
+//================================================================  
 
-if ( isset($_POST)) {
-      $set="true";
-}else{
-     $set="false";
+
+if (isset($_POST) && count($_POST)>0){   
+if (isset($_POST['submit']))
+  switch($_POST['submit']){
+           case l10n('save_file'):
+              set_plugins::save_to_file($liste_des_plugins_activés);
+              break;
+            case l10n('restore'):
+               $liste_r = set_plugins::restore_from_file();
+                if(count($liste_r)>0)
+                $liste=$liste_r;
+                  $infos_message .= set_plugins::memo_var($liste); 
+              break;
+              case l10n('Deactivate'):
+               //   $infos_message .= set_plugins::memo_var("DEACTIVER"); 
+              break;
+              case l10n('Activate'):
+               //   $infos_message .= set_plugins::memo_var("ACTIVER"); 
+              break;
+              case l10n('store'):
+              //    $infos_message .= set_plugins::memo_var("STORE"); 
+              break;
+
+            }
+          
 }
-global  $edited_file;
- if (isset($_POST['submit']) && $_POST['submit']==l10n('save_file')){
-  set_plugins::save_to_file($liste);
+if($add_plugins!=""  ){  
+$infos_message .=$add_plugins;
+ if(!array_search($add_plugins, $liste)){ 
+  array_push($liste,  $add_plugins );
+   $set=="true";
  }
-
-///================================================================  
-if (isset($_POST['restore']) ){ 
-$liste=set_plugins::restore_from_file();
 }
 
 
-if($add_plugins!=""  ){ 
- 
-$infos_message .=$add_plugins;
- if(!array_search($add_plugins, $liste)){ 
-  array_push($liste,  $add_plugins );
- }
- // $add_plugins="";
- // unset( $_POST['add_plugins']);
-}
-if (isset($liste_des_plugins))
-foreach($liste_des_plugins as $plugin_id) {  
+$liste_mem=$liste;
+
+if (isset($liste_des_plugins_activés))
+foreach($liste_des_plugins_activés as $plugin_id) {  
 if(!array_search($plugin_id, $liste)){ 
   array_push($liste,  $plugin_id );
  }
 }
-if(count($liste)>0) $liste= array_unique($liste);
-
-if(count($liste )>0)   
-   $liste_plugins=isset($_POST['liste_plugins'])?$_POST['liste_plugins']:$liste;
+if(count($liste)>0) {
+  $liste= array_unique($liste); 
+}
+//$infos_message .= "liste_des_plugins_activés".set_plugins::memo_var($liste_des_plugins_activés); 
+//$infos_message .= "liste".set_plugins::memo_var($liste_mem);
 
 if ( $set=="true"){    
     set_plugins::save_config();
-    unset($_POST['list_visible']);
-    unset($_POST['nb']);
+
  }  
-
-
-
  //=======================================================
- if($liste)  $liste_plugins = array_combine($liste,$liste);
+ if(isset($liste) && count($liste)>0)  $liste_plugins =$liste;
  else $liste_plugins =array();
 //==========================================================
@@ -80,26 +88,35 @@
   array_keys($liste_plugins)  
   );
+
 $liste_tpl=array();
 foreach($plugins->fs_plugins as $plugin_id => $fs_plugin) {   
 //==== test si $plugin_id fait partie de $liste_plugins ==============  
     $key = array_search($plugin_id, $liste_plugins,false); 
+    
     if ($key!== false){
+ 
     if(isset( $plugins->db_plugins_by_id[$plugin_id])){
+   $key =  array_search($plugin_id, $liste_mem,false); 
+
     $State_id=$plugins->db_plugins_by_id[$plugin_id]['state'] ;
+   if( $key !==false) {
+   $couleur="black";
+   
+    }
+    else
+     $couleur="red";
+
       $tpl_plugin = array(
         'NAME' => $fs_plugin['name'],
         'U_ACTION' => sprintf($action_url, $plugin_id),        
-        'STATE' =>$State_id
-      );
+        'STATE' =>$State_id,
+        'COLOR' => $couleur
+        );
       $liste_tpl[$plugin_id]=  $tpl_plugin ;   
-      } 
-      
-  }
-  
+      }       
+  }  
 }           
-$template->assign( array(  'liste_plugins' => $liste_tpl));	  
 $edited_file=set_plugins::get_file_name();
-
- $template->assign( array(   
+ $template->assign( array(                       
                     'PHPWG_VERSION' =>  PHPWG_VERSION ,
                     'cl_plugins' => $cl_set_plugins_plugin ,
@@ -109,4 +126,5 @@
                     'SET_PLUGINS_PATH' => SET_PLUGINS_PATH,
                     'SET_PLUGINS_PATH_ABS' => SET_PLUGINS_PATH_ABS,
+                    'liste_plugins' => $liste_tpl,
                     'set' => $set ,
                     'nb' => ($nb>0)?$nb:1,
Index: /extensions/set_plugins/js/field_set.js
===================================================================
--- /extensions/set_plugins/js/field_set.js	(revision 11496)
+++ /extensions/set_plugins/js/field_set.js	(revision 11497)
@@ -3,4 +3,34 @@
  // jQuery("#form_set_plugins").submit();
 }
+
+//===============================================================================
+function send_val(datas) {
+  jQuery.ajax({
+    method: 'GET',
+    // url: get_post,
+    data: datas,
+    async: true,
+    dataType: 'json',
+    success: function (data) {
+      if (jQuery("#progressbar").length > 0) {
+
+      } else
+        jQuery("#titrePage").before(
+                '<img id="progressbar" alt = "" width="300px" title = ""' +
+                'src = "./plugins/set_plugins/js/icon/ajax-loader-bar.gif"' + '>'
+              );
+      //    location.reload();
+      if (!data) return;
+
+      if (data['liste_plugins'] != undefined)
+        liste_des_plugins_activés = data['liste_plugins'];
+      if (data['config']['liste_visible'])
+        jQuery("#liste_visible").val(data['config']['liste_visible']);
+
+    }
+  });
+} //send val
+//===================================================================================
+
 jQuery().ready(function () {
   jQuery('.cluetip').tipTip({  maxWidth:'600px' ,'delay': 0, 'fadeIn': 200, 'fadeOut': 200 });  
@@ -10,5 +40,5 @@
 jQuery(document).ready(function () {
   jQuery(window).unload(function () {
-    // jQuery("#form_set_plugins").submit();
+
   });
   if (typeof plus_path == "undefined") {
@@ -17,5 +47,5 @@
   }
   var h_min = 0;
-  var liste_des_plugins = new Array();
+  var liste_des_plugins_activés = new Array();
 
   jQuery(window).load(function (event) {
@@ -44,103 +74,91 @@
         jQuery("input[name=list_visible]").val(liste_visible);
       }
-      liste = liste_visible.split(reg);
+      if (typeof (liste_visible)=="string")
+      liste_visible = liste_visible.split(reg);
       reg = new RegExp("['off']", "g");
       h_min = jQuery("fieldset legend").height();
       h_min = 0;
-      jQuery("fieldset").each(
-        function (i) {
+      jQuery("fieldset").each(function (i) {
+        id0 = jQuery(this).attr("id");
+        if (id0 == "") jQuery(this).attr("id", "fieldset_" + i);
+        jQuery(this).attr("rel", i);
+        if (!jQuery(this).hasClass("field_set"))
+          jQuery(this).addClass("field_set");
+        if (liste_visible[i] == "off") {
+          liste_visible[i] = "off";
+          jQuery(this).height(h_min + 0);
+          jQuery("#" + this.id + ' legend').prepend(
+            '<img alt = "" title = ""' + 'src = "' + plus_path + '"' + '>&nbsp;'
+            );
+        } else {
+          liste_visible[i] = "on";
+          jQuery(this).addClass("visible");
+          jQuery("#" + this.id + ' legend').prepend(
+              '<img alt = "" title = ""' +
+              'src = "' + minus_path + '"' + '>&nbsp;'
+            );
+        }
+        jQuery("#" + this.id + ' legend').css('cursor', 'pointer');
+        id0 = jQuery(this).attr("id");
 
-          id0 = jQuery(this).attr("id");
-          if (id0 == "") jQuery(this).attr("id", "fieldset_" + i);
-          jQuery(this).attr("rel", i);
+        jQuery("#" + id0 + ' legend').click(function (event) {
+          n = jQuery(this).parent().hasClass("visible");
+          i = jQuery(jQuery(this).parent()).attr("rel");
 
-          if (!jQuery(this).hasClass("field_set"))
-            jQuery(this).addClass("field_set");
+          if (typeof liste_visible == "undefined") {
+            liste_visible = "on,on,on,on";
+            jQuery("input[name=list_visible]").val(liste_visible);
+          }
+          liste_visible = jQuery("input[name=list_visible]").val().split(",");
+          // src = jQuery(this).find("img").attr("src");
+          if (n) {
+            jQuery(this).parent().height(h_min + 0);
+            jQuery(this).parent().removeClass("visible");
+            liste_visible[i] = "off";
+            jQuery(this).find("img").attr({
+              src: plus_path
+            });
+          } else {
+            jQuery(this).parent().css("height", "auto");
+            jQuery(this).parent().addClass("visible");
+            liste_visible[i] = "on";
+            jQuery(this).find("img").attr({
+              src: minus_path
+            });
+          }
+          val = liste_visible.join(",");
+          jQuery("input[name=list_visible]").val(val);
+          
+          jQuery("#set").click();
 
 
-          if (liste[i] == "off") {
-            liste[i] = "off";
-
-
-            jQuery(this).height(h_min + 0);
-
-            jQuery("#" + this.id + ' legend').prepend(
-          '<img alt = "" title = ""' +
-          'src = "' + plus_path + '"' + '>&nbsp;'
-        );
-          } else {
-            liste[i] = "on";
-            jQuery(this).addClass("visible");
-            jQuery("#" + this.id + ' legend').prepend(
-          '<img alt = "" title = ""' +
-          'src = "' + minus_path + '"' + '>&nbsp;'
-        );
-          }
-
-          jQuery("#" + this.id + ' legend').css('cursor', 'pointer');
-
-
-          id0 = jQuery(this).attr("id");
-          jQuery("#" + id0 + ' legend').click(function (event) {
-
-            n = jQuery(this).parent().hasClass("visible");
-            //   jQuery(this).css("color", "red");
-
-            i = jQuery(jQuery(this).parent()).attr("rel");
-            liste_visible = jQuery("input[name=list_visible]").val();
-            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 + 0);
-              jQuery(this).parent().removeClass("visible");
-              liste[i] = "off";
-              jQuery(this).find("img").attr({
-                src: plus_path
-
-              });
-            }
-            else {
-              jQuery(this).parent().css("height", "auto");
-              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");
-          }); // click
-
-
-        }); //each fieldset 
+        }); // click
+      }); //each fieldset 
       //==========================================================
 
-
-
-
-      //=========================================================
-
       var liste_action = { active: "", deactive: "" };
-      jQuery("input[name=list_visible]").val(liste.join(","));
+      jQuery("input[name=list_visible]").val(liste_visible.join(","));
       jQuery("fieldset").show();
     } // fielset
     //====================================================================
     jQuery(".plugin_list").each(function (i) {
-      liste_des_plugins.push(jQuery(this).attr('id'));
-    }
-
-    )
-
+      liste_des_plugins_activés.push(jQuery(this).attr('id'));
+    });
+    
     //==============================================================
-    jQuery("input").each(
+    jQuery("input.button").each(
         function (i) {
           jQuery(this).click(function (event) {
             jQuery(this).css("color", "red");
             jQuery('#set').val("true");
+            jQuery("#titrePage").before(
+                '<img id="progressbar" alt = "" width="300px" title = ""' +
+                'src = "./plugins/set_plugins/js/icon/ajax-loader-bar.gif"' + '>'
+              );
+            send_val({liste_visible:liste_visible,
+              set: "true"
+
+            });
+
           }); // click
 
@@ -156,39 +174,17 @@
         n = query.pwg_token;
         action = query.action;
-        val = liste.join(",");
-        val2 = liste_des_plugins.join(",");
-        jQuery.ajax({
-          method: 'GET',
-          // url: get_post,
-          data: { get_post: get_post,
-            liste_des_plugins: true,
-            liste: val,
-            add_plugins: query.plugin,
-            set: "true",
-            action: query.action
-          },
-           async: false,
-          dataType: 'json',
-          success: function (data) {
-            n = eval(data);
-            jQuery("#titrePage").after(
-          '<img alt = "" width="50px" title = ""' +
-          'src = "themes/default/images/colorbox-loading.gif"' + '>&nbsp;'
-        );
-
-
-            liste_des_plugins = data;
-            n = data;
-          }
+        val = liste_visible.join(",");
+        val2 = liste_des_plugins_activés.join(",");
+        send_val({ 
+          liste_des_plugins_activés: liste_des_plugins_activés,
+          add_plugins: query.plugin,
+          set: "true",
+          action: query.action
         });
-
-
         /* */
-
       }
 
-    })
-
+    });
   }); // load
-});                                                                                  //ready           
+});                                                                                         //ready           
            
Index: /extensions/set_plugins/set_plugins_class.php
===================================================================
--- /extensions/set_plugins/set_plugins_class.php	(revision 11496)
+++ /extensions/set_plugins/set_plugins_class.php	(revision 11497)
@@ -15,37 +15,38 @@
   //============================================================================
   function begin_admin() {
-  global $erreur_message,$liste_des_plugins,$liste_active_plugins,$page;  
-      //========= Liste des plugins actifs =================
-     
-
-if (!isset($page['body_id'])) return;
-if($page['body_id']!='theAdminPage' ) return ;
-if($page['page']=='plugins_list' || $page['page']=='plugins'){
-          
-         
-
+    global $erreur_message,$liste_des_plugins_activés,$liste_active_plugins,$page;  
+    //========= Liste des plugins actifs =================    
+    if (!isset($page['body_id'])) return;
+    if($page['body_id']!='theAdminPage' ) return ;
+    if($page['page']=='plugins_list' || $page['page']=='plugins'){
       $plugins = new plugins();
       $plugins->sort_fs_plugins('name');
-      $liste_des_plugins = array();
-  foreach ($plugins->fs_plugins as $plugin_id => $fs_plugin){
-      if(isset( $plugins->db_plugins_by_id[$plugin_id])){
-        $State_id=$plugins->db_plugins_by_id[$plugin_id]['state'] ;
-        if($State_id=="active" && $plugin_id!="set_plugins")
-          array_push($liste_des_plugins,$plugin_id);
-     }      
-  }
-
-if (isset($_GET['liste_des_plugins'])){  
- array_push($liste_des_plugins,$_GET);
-    echo json_encode($liste_des_plugins);
-   exit;
-}
-$liste_active_plugins=$liste_des_plugins;
-   }
+      $liste_des_plugins_activés = array();
+      foreach ($plugins->fs_plugins as $plugin_id => $fs_plugin){
+        if(isset( $plugins->db_plugins_by_id[$plugin_id])){
+          $State_id=$plugins->db_plugins_by_id[$plugin_id]['state'] ;
+          if($State_id=="active" && $plugin_id!="set_plugins")
+            array_push($liste_des_plugins_activés,$plugin_id);
+        }      
+      }   //foreach
+      if (isset($_GET['set'])){        
+  //pwg_set_session_var('plugins_new_order', $_GET['plugins_new_order']);
+  //exit;
+        $ret['config']=$_GET;
+        $ret['liste_plugins']=$liste_des_plugins_activés;
+        //  array_push($ret,$liste_des_plugins_activés);
+        if($_GET['config']['liste_visible'])
+             set_plugins::save_config();
+        echo json_encode($ret);   
+  
+        exit;
+      }
+      $liste_active_plugins=$liste_des_plugins_activés;
+    }
   }
   //============================================================================
   function set_plugins_add() {
     global $user, $template, $val,$page,$conf,$erreur_message,$infos_message;
-    global $liste_des_plugins,$liste_active_plugins;
+    global $liste_des_plugins_activés,$liste_active_plugins;
     if (!isset($page['body_id'])) return;
 
@@ -139,16 +140,14 @@
   //===================================================================
 function Affiche_set_plugins(){
-global $infos_message,$liste_des_plugins,$erreur_message ;
+global $infos_message,$liste_des_plugins_activés,$erreur_message ;
 
   include_once(SET_PLUGINS_PATH."include/constants.php");
    include(SET_PLUGINS_PATH.'include/affiche.php');
-   $all_tpl_vars = $template->get_template_vars('plugins');
-  if(!$all_tpl_vars)  return;
-
-  if( $set=="true" ){     
+
+  if(  isset($_POST['submit'])){     
     $state="";
-    if(isset($_POST['unset_plugins'])  )
+    if($_POST['submit']==l10n("Deactivate")  )
         $state='inactive';
-    elseif(isset($_POST['set_plugins'])  )
+    elseif($_POST['submit']==l10n("Activate")  )
       $state='active';
     if($state!=""){
@@ -157,5 +156,5 @@
       else
           $sens="ASC";
-            $infos_message .="-----> $state $sens<br />";
+     
       //============================
       $query = 'SELECT *
@@ -166,5 +165,5 @@
       ';
       $result = pwg_query($query);
-      //======= mise à jour =========
+      //======= mise Ã  jour =========
       if($result){
         $query = '
@@ -187,7 +186,5 @@
         }
       }
-
-
-    }else if  (isset($_POST['init_plugins'])){
+    }else if  ($_POST['submit']==l10n('store') ){
       $liste = array();
       $state="active";
@@ -220,5 +217,5 @@
   $template->set_filenames(
     array(    'cl_plugin' => SET_PLUGINS_PATH_ABS.'template/admin.tpl'  )
-  );
+    );
 
   //===========================================================
@@ -226,10 +223,8 @@
   <h2>'.l10n("set_plugins").l10n("Version").": ".$cl_set_plugins_plugin['version'] .'</h2>
   </div>';
-  $bpplus=$header_1.$template->parse('cl_plugin', true);
-    
-  $template-> assign('ADMIN_CONTENT',$bpplus);
-  $bpplus=$template->parse('plugins', true);
-  $template-> concat('ADMIN_CONTENT',$bpplus);
-
+    $bpplus=$header_1.$template->parse('cl_plugin', true);  
+    $all_tpl_vars = $template->get_template_vars('ADMIN_CONTENT');
+    $template-> assign('ADMIN_CONTENT',$bpplus);
+    $template-> concat('ADMIN_CONTENT',$all_tpl_vars);
 }
 
@@ -251,16 +246,21 @@
 //==============================================
 function restore_from_file(){
-  global $infos_message;
-  $edited_file=set_plugins::get_file_name();
+  global $infos_message,$edited_file;
   $content_file = file_get_contents($edited_file);
-  $file =array();
-  $liste= array_unique(unserialize($content_file));
-  unset($_POST['restore']);
+  return unserialize($content_file) ;
 }
 //===============================================
 function get_file_name(){
-global  $edited_file;
-  $dir=realpath('./local/plugins/set_plugins');
-  if (!is_dir($dir)){    
+global  $edited_file,$infos_message;
+ 
+  $dir = realpath("./local/plugins");    
+  if (!is_dir($dir)){  
+  $dir = realpath("./local")."\\plugins";    
+   $umask = umask(0);
+    $mkd = @mkdir($dir, 0755, true );
+    umask($umask);
+    }
+   $dir = realpath("./local/plugins/set_plugins");    
+  if (!is_dir($dir)){   
     $dir= realpath('./local/plugins'). "\\set_plugins";
     $umask = umask(0);
@@ -270,6 +270,6 @@
       fatal_error( "$dir ".l10n('no write access'));       
     } 
-    $file = $dir.'\\.htaccess';
-    @file_put_contents( $file, 'allow from all' );
+  //  $file = $dir.'\\.htaccess';
+   // @file_put_contents( $file, 'allow from all' );
   }   
   $dir=realpath('./local/plugins/set_plugins');
@@ -280,5 +280,4 @@
 }
 
-
 }// fin classe
 ?>
Index: /extensions/set_plugins/template/admin.tpl
===================================================================
--- /extensions/set_plugins/template/admin.tpl	(revision 11496)
+++ /extensions/set_plugins/template/admin.tpl	(revision 11497)
@@ -1,12 +1,11 @@
 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
 <meta http-equiv="X-UA-Compatible" content="IE=IE9" />
-{html_head}
+
 {if $PHPWG_VERSION < 2.2 } 
-
 {include file= $SET_PLUGINS_PATH_ABS|@cat:'template/header_2_1.tpl'}
 {else} 
 {include file= $SET_PLUGINS_PATH_ABS|@cat:'template/header_2_2.tpl'} 
 {/if}
-{/html_head}
+
 
 <fieldset >
@@ -24,19 +23,6 @@
       {$nb_plugins}</label>/
       <label class="cluetip" title="{'s_pl_action3'|@translate}">
-      {$smarty.foreach.plugins_loop.total}</label>] </legend>
-<form action="{$action}" method="post" name="form_set_plugins" id="form_set_plugins"> 
-  <input   name="unset_plugins" type="submit" value="{'Deactivate'|@translate}" class="cluetip button" title="{'s_pl_action4'|@translate}" />
-  <input   name="set_plugins" type="submit" value="{'Activate'|@translate}" class="cluetip" title="{'s_pl_action5'|@translate}" />   
-  <label class="cluetip" title="{'s_pl_action6'|@translate}"> {'nb'|@translate}:</label>
-  <input name="nb" type="text" value="{$nb}" size="5" />
-  <input name="list_visible" id="list_visible" type="hidden" value="{$list_visible}" />    
-  <input name="add_plugins" type="hidden" id="add_plugins" value="{$add_plugins}" />
-  <input type="submit" name="init_plugins" class="cluetip"  title="{'s_pl_action7'|@translate}" value="{'store'|@translate}" />
-  <input type="hidden" id="set" name="set" value="{$set}" />
-  <input class="cluetip" title="{'s_pl_action8'|@translate}  {$edited_file}" type="submit"       value="{'save_file'|@translate}" name="submit" />
-  {if $restore}
-  <input class="cluetip" title="{'s_pl_action9'|@translate}  {$edited_file}" type="submit"
-  value="{'restore'|@translate}" name="restore" onclick="return confirm('{'restore_confirm'|@translate|escape:'javascript'}');" />
-  {/if}
+      {$smarty.foreach.plugins_loop.total}</label>] 
+      {include file=$SET_PLUGINS_PATH_ABS|@cat:'template/menu.tpl'}
  <p>
 {/if}
@@ -45,7 +31,8 @@
 <td width="50%" align="left" name="plugins_name" rel="actif" class="pluginBoxNameCell" >
     {if $plugin.STATE == 'active'}
-{$plugin.NAME}
-{else} 
-{/if}
+    <span style="color: {$plugin.COLOR}" > {$plugin.NAME}
+    </span>
+       
+    {/if}
 </td>        
 
@@ -79,21 +66,5 @@
  {if $smarty.foreach.plugins_name.total==0}
   [{$smarty.foreach.plugins_name.total}/{$nb_plugins}]
-   </legend>
-   <form action="{$action}" method="post" name="form_set_plugins" id="form1">
-   <input name="unset_plugins" type="submit" value="{'Deactivate'|@translate}" class="cluetip button"
-     title="{'s_pl_action4'|@translate}" />
-   <input name="set_plugins" type="submit" value="{'Activate'|@translate}" class="cluetip"
-     title="{'s_pl_action5'|@translate}" />
-   <label class="cluetip" title="{'s_pl_action6'|@translate}">
-     {'nb'|@translate}:</label>
-   <input name="nb" type="text" value="{$nb}" size="5" />
-   <input name="list_visible" id="Hidden1" type="hidden" value="{$list_visible}" />
-   <input name="add_plugins" type="hidden" id="add_plugins" value="{$add_plugins}" />
-   <input type="submit" name="init_plugins" class="cluetip" title="{'s_pl_action7'|@translate}" value="{'store'|@translate}" />
-   <input type="hidden" id="Hidden3" name="set" value="{$set}" />
-   <input class="cluetip" title="{'s_pl_action8'|@translate}  {$edited_file}" type="submit" value="{'save_file'|@translate}" name="submit" />
-   {if $restore}
-   <input class="cluetip" title="{'s_pl_action9'|@translate}  {$edited_file}" type="submit" value="{'restore'|@translate}" name="restore" onclick="return confirm('{'restore_confirm'|@translate|escape:'javascript'}');" />
-   {/if}
+  {include file=$SET_PLUGINS_PATH_ABS|@cat:'template/menu.tpl'}
    <p>
      {/if}
@@ -101,29 +72,2 @@
       </form>
   </fieldset>
-{*/if*} 
-
-{footer_script} 
-var root = '{$SET_PLUGINS_PATH}';
- var get_post = "{$SET_PLUGINS_PATH}include/set_post.php";
-var list_visible = '{$list_visible}';
- var nb = '{$nb}'; 
- {if $liste_plugins} 
- liste_plugins=new Array(); 
- {foreach from=$liste_plugins item=plugin name=plugins_name} 
- 
-  liste_plugins.push('{$plugin.NAME}') ;
- {/foreach}
-  {else} 
-  var liste_plugins = new Array(); 
-  {/if} 
-  {literal} 
-  jQuery(document).ready(function() { 
-  jQuery.ajax({ method: 'POST',
-url: get_post,
- data: { root:root,list_visible:list_visible,nb:nb },
-  dataType: 'json',
-success: function(data) {
- n=data; 
- } });
-  });
-   {/literal}{/footer_script}
Index: /extensions/set_plugins/template/header_2_1.tpl
===================================================================
--- /extensions/set_plugins/template/header_2_1.tpl	(revision 11496)
+++ /extensions/set_plugins/template/header_2_1.tpl	(revision 11497)
@@ -1,2 +1,22 @@
- {known_script id="jquery" src = $ROOT_URL|@cat:"themes/default/js/jquery.packed.js"  }
+ {html_head}
+  {known_script id="jquery" src = $ROOT_URL|@cat:"themes/default/js/jquery.packed.js"  }
  {known_script id="field_set" src= $SET_PLUGINS_PATH|@cat:"js/field_set.js" }
+ {/html_head}
+ 
+<script type="text/javascript">
+ 
+var root = '{$SET_PLUGINS_PATH}';
+ var get_post = "{$SET_PLUGINS_PATH}include/set_post.php";
+var list_visible = '{$list_visible}';
+ var nb = '{$nb}'; 
+ {if $liste_plugins} 
+ liste_plugins=new Array(); 
+ {foreach from=$liste_plugins item=plugin name=plugins_name} 
+ 
+  liste_plugins.push('{$plugin.NAME}') ;
+ {/foreach}
+  {else} 
+  var liste_plugins = new Array(); 
+  {/if} 
+   </script>
+ 
Index: /extensions/set_plugins/template/header_2_2.tpl
===================================================================
--- /extensions/set_plugins/template/header_2_2.tpl	(revision 11496)
+++ /extensions/set_plugins/template/header_2_2.tpl	(revision 11497)
@@ -2,3 +2,18 @@
  {footer_script }
  {combine_script id="field_set" load="footer" path=$SET_PLUGINS_PATH|@cat:"js/field_set.js" require="jquery"}
-  {/footer_script}
+ 
+var root = '{$SET_PLUGINS_PATH}';
+ var get_post = "{$SET_PLUGINS_PATH}include/set_post.php";
+var list_visible = '{$list_visible}';
+ var nb = '{$nb}'; 
+ {if $liste_plugins} 
+ liste_plugins=new Array(); 
+ {foreach from=$liste_plugins item=plugin name=plugins_name} 
+ 
+  liste_plugins.push('{$plugin.NAME}') ;
+ {/foreach}
+  {else} 
+  var liste_plugins = new Array(); 
+  {/if} 
+
+ {/footer_script}
Index: /extensions/set_plugins/template/menu.tpl
===================================================================
--- /extensions/set_plugins/template/menu.tpl	(revision 11497)
+++ /extensions/set_plugins/template/menu.tpl	(revision 11497)
@@ -0,0 +1,24 @@
+</legend>
+<form action="{$action}" method="POST" name="form_set_plugins" id="form_set_plugins">
+<input name="add_plugins" type="hidden" id="add_plugins" value="{$add_plugins}" />
+<input type="submit" class="button" style="display:none" id="set" name="set" value="{$set}" />
+<input name="list_visible" style="display:none" id="list_visible" type="text" class="button"
+  value="{$list_visible}" /> 
+<input name="submit" type="submit" value="{'Deactivate'|@translate}" class="button cluetip"
+  title="{'s_pl_action4'|@translate}" />
+<input name="submit" type="submit" value="{'Activate'|@translate}" class="button cluetip"
+  title="{'s_pl_action5'|@translate}" />
+
+<label class="cluetip" title="{'s_pl_action6'|@translate}">
+  {'nb'|@translate}:</label>
+<input name="nb" type="text" value="{$nb}" size="5" />
+
+
+<input type="submit" name="submit" class="cluetip button" title="{'s_pl_action7'|@translate}"
+  value="{'store'|@translate}" />
+<input class="cluetip button" title="{'s_pl_action8'|@translate}  {$edited_file}"
+  type="submit" value="{'save_file'|@translate}" name="submit" />
+{if $restore}
+<input class="cluetip button " title="{'s_pl_action9'|@translate}  {$edited_file}"
+  type="submit" value="{'restore'|@translate}" name="submit" onclick="return confirm('{'restore_confirm'|@translate|escape:'javascript'}');" />
+{/if}
