Changeset 12081
- Timestamp:
- Sep 7, 2011, 11:07:03 AM (13 years ago)
- Location:
- extensions/set_plugins
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/set_plugins/include/affiche.php
r11500 r12081 34 34 switch($_POST['submit']){ 35 35 case l10n('save_file'): 36 set_plugins::save_to_file($liste_des_plugins_acti vés);36 set_plugins::save_to_file($liste_des_plugins_actifs); 37 37 break; 38 38 case l10n('restore'): … … 68 68 $liste_mem=$liste; 69 69 70 if (isset($liste_des_plugins_acti vés))71 foreach($liste_des_plugins_acti vés as $plugin_id) {70 if (isset($liste_des_plugins_actifs)) 71 foreach($liste_des_plugins_actifs as $plugin_id) { 72 72 if(!array_search($plugin_id, $liste)){ 73 73 array_push($liste, $plugin_id ); … … 79 79 } 80 80 81 //$infos_message .= "liste_des_plugins_acti vés".set_plugins::memo_var($liste_des_plugins_activés);81 //$infos_message .= "liste_des_plugins_actifs".set_plugins::memo_var($liste_des_plugins_actifs); 82 82 //$infos_message .= "liste".set_plugins::memo_var($liste_mem); 83 83 -
extensions/set_plugins/js/field_set.js
r12077 r12081 24 24 25 25 if (data['liste_plugins'] != undefined) 26 liste_des_plugins_acti vés = data['liste_plugins'];26 liste_des_plugins_actifs = data['liste_plugins']; 27 27 if (data['config']['liste_visible']) 28 28 jQuery("#liste_visible").val(data['config']['liste_visible']); … … 47 47 } 48 48 var h_min = 0; 49 var liste_des_plugins_acti vés = new Array();49 var liste_des_plugins_actifs = new Array(); 50 50 51 51 jQuery(window).load(function (event) { … … 79 79 h_min = 0; 80 80 jQuery("fieldset").each(function (i) { 81 id0 = jQuery(this).attr("id"); 82 if (id0 == "" || typeof id0 == "undefined") 83 jQuery(this).attr("id", "fieldset_" + i); 84 jQuery(this).attr("rel", i); 85 86 if (!jQuery(this).hasClass("field_set")) 87 jQuery(this).addClass("field_set"); 81 id0 = jQuery(this).attr("id"); 82 if (id0 == "" || typeof id0 == "undefined") 83 jQuery(this).attr("id", "fieldset_" + i); 84 id0 = jQuery(this).attr("id"); 85 jQuery(this).attr("rel", i); 86 jQuery("#"+id0+' div').wrapAll('<div id="'+ "div"+ id0 +'" class="new" />'); 87 88 if (!jQuery(this).hasClass("field_set")) 89 jQuery(this).addClass("field_set"); 88 90 if (liste_visible[i] == "off") { 89 91 liste_visible[i] = "off"; 90 jQuery(this).height(h_min + 0); 91 92 jQuery("#" + this.id + ' legend').prepend( 92 jQuery(this).height(h_min + 0); 93 if(i==0) jQuery("#form_set_plugins").css({ display: "none" }); 94 jQuery("#div" + id0).css({ display: "none" }); 95 96 jQuery("#" + this.id + ' legend').prepend( 93 97 '<img alt = "" title = ""' + 'src = "' + plus_path + '"' + '> ' 94 98 ); 95 99 } else { 96 100 liste_visible[i] = "on"; 97 98 101 jQuery(this).addClass("visible"); 102 jQuery("#" + this.id + ' legend').prepend( 99 103 '<img alt = "" title = ""' + 100 104 'src = "' + minus_path + '"' + '> ' 101 105 ); 106 } 107 108 jQuery("#" + this.id + ' legend').css('cursor', 'pointer'); 109 id0 = jQuery(this).attr("id"); 110 jQuery("#" + id0 + ' legend').click(function (event) { 111 112 n = jQuery(this).parent().hasClass("visible"); 113 i = jQuery(jQuery(this).parent()).attr("rel"); 114 115 if (typeof liste_visible == "undefined") { 116 liste_visible = "on,on,on,on"; 117 jQuery("input[name=list_visible]").val(liste_visible); 102 118 } 103 104 jQuery("#" + this.id + ' legend').css('cursor', 'pointer');105 id0 = jQuery(this).attr("id");106 107 108 jQuery("#" + id0 + ' legend').click(function (event) {109 110 n = jQuery(this).parent().hasClass("visible");111 i = jQuery(jQuery(this).parent()).attr("rel");112 113 if (typeof liste_visible == "undefined") {114 liste_visible = "on,on,on,on";115 jQuery("input[name=list_visible]").val(liste_visible);116 }117 119 liste_visible = jQuery("input[name=list_visible]").val().split(","); 118 // src = jQuery(this).find("img").attr("src"); 119 if (n) { 120 jQuery(this).parent().height(h_min + 0); 121 jQuery(this).parent().removeClass("visible"); 120 // src = jQuery(this).find("img").attr("src"); 121 if (n) { 122 123 124 jQuery(this).parent().removeClass("visible"); 122 125 liste_visible[i] = "off"; 123 124 125 126 126 jQuery(this).find("img").attr({ 127 src: plus_path 128 129 }); 127 130 } else { 128 jQuery(this).parent().css("height", "auto"); 129 jQuery(this).parent().addClass("visible"); 131 jQuery(this).parent().css({ height: "auto" }); 132 133 jQuery(this).parent().addClass("visible"); 130 134 liste_visible[i] = "on"; 131 132 133 134 135 135 jQuery(this).find("img").attr({ 136 src: minus_path 137 138 }); 139 } 136 140 val = liste_visible.join(","); 137 138 141 jQuery("input[name=list_visible]").val(val); 142 jQuery('#set').val("true"); 139 143 jQuery("#set").click(); 140 144 141 145 142 146 }); // click 143 147 }); //each fieldset 144 148 //========================================================== 145 149 … … 150 154 //==================================================================== 151 155 jQuery(".plugin_list").each(function (i) { 152 liste_des_plugins_acti vés.push(jQuery(this).attr('id'));156 liste_des_plugins_actifs.push(jQuery(this).attr('id')); 153 157 }); 154 158 … … 163 167 'src = "./plugins/set_plugins/js/icon/ajax-loader-bar.gif"' + '>' 164 168 ); 165 send_val({ liste_visible:liste_visible,169 send_val({ liste_visible: liste_visible, 166 170 set: "true" 167 171 … … 182 186 action = query.action; 183 187 val = liste_visible.join(","); 184 val2 = liste_des_plugins_acti vés.join(",");185 send_val({ 186 liste_des_plugins_acti vés: liste_des_plugins_activés,187 188 189 188 val2 = liste_des_plugins_actifs.join(","); 189 send_val({ 190 liste_des_plugins_actifs: liste_des_plugins_actifs, 191 add_plugins: query.plugin, 192 set: "true", 193 action: query.action 190 194 }); 191 195 … … 197 201 }); 198 202 }); // load 199 }); //ready203 }); //ready -
extensions/set_plugins/set_plugins_class.php
r11499 r12081 15 15 //============================================================================ 16 16 function begin_admin() { 17 global $erreur_message,$liste_des_plugins_acti vés,$liste_active_plugins,$page;17 global $erreur_message,$liste_des_plugins_actifs,$liste_active_plugins,$page; 18 18 //========= Liste des plugins actifs ================= 19 19 if (!isset($page['body_id'])) return; … … 22 22 $plugins = new plugins(); 23 23 $plugins->sort_fs_plugins('name'); 24 $liste_des_plugins_acti vés = array();24 $liste_des_plugins_actifs = array(); 25 25 foreach ($plugins->fs_plugins as $plugin_id => $fs_plugin){ 26 26 if(isset( $plugins->db_plugins_by_id[$plugin_id])){ 27 27 $State_id=$plugins->db_plugins_by_id[$plugin_id]['state'] ; 28 28 if($State_id=="active" && $plugin_id!="set_plugins") 29 array_push($liste_des_plugins_acti vés,$plugin_id);29 array_push($liste_des_plugins_actifs,$plugin_id); 30 30 } 31 31 } //foreach 32 32 if (isset($_GET['set'])){ 33 33 $ret['config']=$_GET; 34 $ret['liste_plugins']=$liste_des_plugins_acti vés;35 // array_push($ret,$liste_des_plugins_acti vés);34 $ret['liste_plugins']=$liste_des_plugins_actifs; 35 // array_push($ret,$liste_des_plugins_actifs); 36 36 if($_GET['config']['liste_visible']) 37 37 set_plugins::save_config(); … … 40 40 exit; 41 41 } 42 $liste_active_plugins=$liste_des_plugins_acti vés;42 $liste_active_plugins=$liste_des_plugins_actifs; 43 43 } 44 44 } … … 46 46 function set_plugins_add() { 47 47 global $user, $template, $val,$page,$conf,$erreur_message,$infos_message; 48 global $liste_des_plugins_acti vés,$liste_active_plugins;48 global $liste_des_plugins_actifs,$liste_active_plugins; 49 49 if (!isset($page['body_id'])) return; 50 50 … … 138 138 //=================================================================== 139 139 function Affiche_set_plugins(){ 140 global $infos_message,$liste_des_plugins_acti vés,$erreur_message ;140 global $infos_message,$liste_des_plugins_actifs,$erreur_message ; 141 141 142 142 include_once(SET_PLUGINS_PATH."include/constants.php");
Note: See TracChangeset
for help on using the changeset viewer.