Ignore:
Timestamp:
Jun 23, 2011, 3:33:26 PM (13 years ago)
Author:
cljosse
Message:

[extensions] set_plugins fix bugs with free

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/set_plugins/js/field_set.js

    r11497 r11499  
    7474        jQuery("input[name=list_visible]").val(liste_visible);
    7575      }
    76       if (typeof (liste_visible)=="string")
    7776      liste_visible = liste_visible.split(reg);
    7877      reg = new RegExp("['off']", "g");
     
    8079      h_min = 0;
    8180      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");
    8787        if (liste_visible[i] == "off") {
    8888          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(
    9192            '<img alt = "" title = ""' + 'src = "' + plus_path + '"' + '>&nbsp;'
    92             );
    93         } else {
     93        );
     94          } else {
    9495          liste_visible[i] = "on";
    95           jQuery(this).addClass("visible");
    96           jQuery("#" + this.id + ' legend').prepend(
    97               '<img alt = "" title = ""' +
    98               'src = "' + minus_path + '"' + '>&nbsp;'
    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 + '"' + '>&nbsp;'
     100        );
     101          }
     102
     103          jQuery("#" + this.id + ' legend').css('cursor', 'pointer');
    102104        id0 = jQuery(this).attr("id");
    103105
    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");
    106110          i = jQuery(jQuery(this).parent()).attr("rel");
    107111
    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            }
    112116          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");
    117121            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              });
    121126          } 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");
    124129            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            }
    129135          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");
    132138          jQuery("#set").click();
    133139
    134140
    135141        }); // click
    136       }); //each fieldset
     142        }); //each fieldset
    137143      //==========================================================
    138144
     
    145151      liste_des_plugins_activés.push(jQuery(this).attr('id'));
    146152    });
    147    
     153
    148154    //==============================================================
    149     jQuery("input.button").each(
     155    jQuery("input").each(
    150156        function (i) {
    151157          jQuery(this).click(function (event) {
     
    178184        send_val({
    179185          liste_des_plugins_activés: liste_des_plugins_activés,
    180           add_plugins: query.plugin,
    181           set: "true",
    182           action: query.action
     186            add_plugins: query.plugin,
     187            set: "true",
     188            action: query.action
    183189        });
     190
     191
    184192        /* */
     193
    185194      }
    186195
    187196    });
    188197  }); // load
    189 });                                                                                         //ready           
     198});                                                                                  //ready           
    190199           
Note: See TracChangeset for help on using the changeset viewer.