Changeset 11499 for extensions/set_plugins/js
- Timestamp:
- Jun 23, 2011, 3:33:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/set_plugins/js/field_set.js
r11497 r11499 74 74 jQuery("input[name=list_visible]").val(liste_visible); 75 75 } 76 if (typeof (liste_visible)=="string")77 76 liste_visible = liste_visible.split(reg); 78 77 reg = new RegExp("['off']", "g"); … … 80 79 h_min = 0; 81 80 jQuery("fieldset").each(function (i) { 82 id0 = jQuery(this).attr("id"); 83 if (id0 == "") jQuery(this).attr("id", "fieldset_" + i); 84 jQuery(this).attr("rel", i); 85 if (!jQuery(this).hasClass("field_set")) 86 jQuery(this).addClass("field_set"); 81 id0 = jQuery(this).attr("id"); 82 if (id0 == "") jQuery(this).attr("id", "fieldset_" + i); 83 jQuery(this).attr("rel", i); 84 85 if (!jQuery(this).hasClass("field_set")) 86 jQuery(this).addClass("field_set"); 87 87 if (liste_visible[i] == "off") { 88 88 liste_visible[i] = "off"; 89 jQuery(this).height(h_min + 0); 90 jQuery("#" + this.id + ' legend').prepend( 89 jQuery(this).height(h_min + 0); 90 91 jQuery("#" + this.id + ' legend').prepend( 91 92 '<img alt = "" title = ""' + 'src = "' + plus_path + '"' + '> ' 92 93 } else {93 ); 94 } else { 94 95 liste_visible[i] = "on"; 95 jQuery(this).addClass("visible"); 96 jQuery("#" + this.id + ' legend').prepend( 97 '<img alt = "" title = ""' + 98 'src = "' + minus_path + '"' + '> ' 99 ); 100 } 101 jQuery("#" + this.id + ' legend').css('cursor', 'pointer'); 96 jQuery(this).addClass("visible"); 97 jQuery("#" + this.id + ' legend').prepend( 98 '<img alt = "" title = ""' + 99 'src = "' + minus_path + '"' + '> ' 100 ); 101 } 102 103 jQuery("#" + this.id + ' legend').css('cursor', 'pointer'); 102 104 id0 = jQuery(this).attr("id"); 103 105 104 jQuery("#" + id0 + ' legend').click(function (event) { 105 n = jQuery(this).parent().hasClass("visible"); 106 107 jQuery("#" + id0 + ' legend').click(function (event) { 108 109 n = jQuery(this).parent().hasClass("visible"); 106 110 i = jQuery(jQuery(this).parent()).attr("rel"); 107 111 108 if (typeof liste_visible == "undefined") {109 liste_visible = "on,on,on,on";110 jQuery("input[name=list_visible]").val(liste_visible);111 }112 if (typeof liste_visible == "undefined") { 113 liste_visible = "on,on,on,on"; 114 jQuery("input[name=list_visible]").val(liste_visible); 115 } 112 116 liste_visible = jQuery("input[name=list_visible]").val().split(","); 113 // src = jQuery(this).find("img").attr("src");114 if (n) {115 jQuery(this).parent().height(h_min + 0);116 jQuery(this).parent().removeClass("visible");117 // src = jQuery(this).find("img").attr("src"); 118 if (n) { 119 jQuery(this).parent().height(h_min + 0); 120 jQuery(this).parent().removeClass("visible"); 117 121 liste_visible[i] = "off"; 118 jQuery(this).find("img").attr({ 119 src: plus_path 120 }); 122 jQuery(this).find("img").attr({ 123 src: plus_path 124 125 }); 121 126 } else { 122 jQuery(this).parent().css("height", "auto");123 jQuery(this).parent().addClass("visible");127 jQuery(this).parent().css("height", "auto"); 128 jQuery(this).parent().addClass("visible"); 124 129 liste_visible[i] = "on"; 125 jQuery(this).find("img").attr({ 126 src: minus_path 127 }); 128 } 130 jQuery(this).find("img").attr({ 131 src: minus_path 132 133 }); 134 } 129 135 val = liste_visible.join(","); 130 jQuery("input[name=list_visible]").val(val);131 136 jQuery("input[name=list_visible]").val(val); 137 jQuery('#set').val("true"); 132 138 jQuery("#set").click(); 133 139 134 140 135 141 }); // click 136 }); //each fieldset142 }); //each fieldset 137 143 //========================================================== 138 144 … … 145 151 liste_des_plugins_activés.push(jQuery(this).attr('id')); 146 152 }); 147 153 148 154 //============================================================== 149 jQuery("input .button").each(155 jQuery("input").each( 150 156 function (i) { 151 157 jQuery(this).click(function (event) { … … 178 184 send_val({ 179 185 liste_des_plugins_activés: liste_des_plugins_activés, 180 add_plugins: query.plugin,181 set: "true",182 action: query.action186 add_plugins: query.plugin, 187 set: "true", 188 action: query.action 183 189 }); 190 191 184 192 /* */ 193 185 194 } 186 195 187 196 }); 188 197 }); // load 189 }); 198 }); //ready 190 199
Note: See TracChangeset
for help on using the changeset viewer.