Ignore:
Timestamp:
Feb 18, 2013, 9:58:46 PM (11 years ago)
Author:
rvelices
Message:

make batch manager ready for jquery 1.9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/batch_manager_global.tpl

    r19121 r20823  
    3232          for (var i=first; i<=last;i++) {
    3333            input = $(inputs[i]);
    34             $(input).attr('checked', last_clickedstatus);
     34            $(input).prop('checked', last_clickedstatus);
    3535            if (last_clickedstatus)
    3636            {
     
    247247  $("select[name=selectAction]").change(function () {
    248248    $("[id^=action_]").hide();
    249     $("#action_"+$(this).attr("value")).show();
     249    $("#action_"+$(this).prop("value")).show();
    250250
    251251    /* make sure the #albumSelect is on the right select box so that the */
    252252    /* "add new album" popup fills the right select box                  */
    253     if ("associate" == $(this).attr("value") || "move" == $(this).attr("value")) {
     253    if ("associate" == $(this).prop("value") || "move" == $(this).prop("value")) {
    254254      jQuery("#albumSelect").removeAttr("id");
    255       jQuery("#action_"+$(this).attr("value")+" select").attr("id", "albumSelect");
     255      jQuery("#action_"+$(this).prop("value")+" select").attr("id", "albumSelect");
    256256    }
    257257
     
    265265
    266266  $(".wrap1 label").click(function (event) {
    267     $("input[name=setSelected]").attr('checked', false);
     267    $("input[name=setSelected]").prop('checked', false);
    268268
    269269    var wrap2 = $(this).children(".wrap2");
     
    283283
    284284  $("#selectAll").click(function () {
    285     $("input[name=setSelected]").attr('checked', false);
     285    $("input[name=setSelected]").prop('checked', false);
    286286    selectPageThumbnails();
    287287    checkPermitAction();
     
    294294      var checkbox = $(this).children("input[type=checkbox]");
    295295
    296       $(checkbox).attr('checked', true);
     296      $(checkbox).prop('checked', true);
    297297      $(wrap2).addClass("thumbSelected");
    298298    });
     
    300300
    301301  $("#selectNone").click(function () {
    302     $("input[name=setSelected]").attr('checked', false);
     302    $("input[name=setSelected]").prop('checked', false);
    303303
    304304    $(".thumbnails label").each(function() {
     
    306306      var checkbox = $(this).children("input[type=checkbox]");
    307307
    308       $(checkbox).attr('checked', false);
     308      $(checkbox).prop('checked', false);
    309309      $(wrap2).removeClass("thumbSelected");
    310310    });
     
    314314
    315315  $("#selectInvert").click(function () {
    316     $("input[name=setSelected]").attr('checked', false);
     316    $("input[name=setSelected]").prop('checked', false);
    317317
    318318    $(".thumbnails label").each(function() {
     
    320320      var checkbox = $(this).children("input[type=checkbox]");
    321321
    322       $(checkbox).attr('checked', !$(checkbox).is(':checked'));
     322      $(checkbox).prop('checked', !$(checkbox).is(':checked'));
    323323
    324324      if ($(checkbox).is(':checked')) {
     
    335335  $("#selectSet").click(function () {
    336336    selectPageThumbnails();
    337     $("input[name=setSelected]").attr('checked', true);
     337    $("input[name=setSelected]").prop('checked', true);
    338338    checkPermitAction();
    339339    return false;
     
    379379
    380380    /* check the checkbox to declare we use this filter */
    381     $("input[type=checkbox][name="+filter+"_use]").attr("checked", true);
     381    $("input[type=checkbox][name="+filter+"_use]").prop("checked", true);
    382382
    383383    /* forbid to select this filter in the addFilter list */
     
    386386
    387387  $("#addFilter").change(function () {
    388     var filter = $(this).attr("value");
     388    var filter = $(this).prop("value");
    389389    filter_enable(filter);
    390     $(this).attr("value", -1);
     390    $(this).prop("value", -1);
    391391  });
    392392
     
    396396
    397397    /* uncheck the checkbox to declare we do not use this filter */
    398     $("input[name="+filter+"_use]").removeAttr("checked");
     398    $("input[name="+filter+"_use]").prop("checked", false);
    399399
    400400    /* give the possibility to show it again */
     
    434434
    435435                derivatives.elements = [];
    436                 if (jQuery('input[name="setSelected"]').attr('checked'))
     436                if (jQuery('input[name="setSelected"]').is(':checked'))
    437437                        derivatives.elements = all_elements;
    438438                else
    439439                        jQuery('.thumbnails input[type=checkbox]').each(function() {
    440                                 if (jQuery(this).attr('checked')) {
     440                                if (jQuery(this).is(':checked')) {
    441441                                        derivatives.elements.push(jQuery(this).val());
    442442                                }
     
    456456                var params = {max_urls: 100000, ids: ids, types: []};
    457457                jQuery("#action_generate_derivatives input").each( function(i, t) {
    458                         if ($(t).attr("checked"))
     458                        if ($(t).is(":checked"))
    459459                                params.types.push( t.value );
    460460                } );
     
    939939                        {footer_script}
    940940                        function selectGenerateDerivAll() {ldelim}
    941                                 $("#action_generate_derivatives input[type=checkbox]").attr("checked", true);
     941                                $("#action_generate_derivatives input[type=checkbox]").prop("checked", true);
    942942                        }
    943943                        function selectGenerateDerivNone() {ldelim}
    944                                 $("#action_generate_derivatives input[type=checkbox]").attr("checked", false);
     944                                $("#action_generate_derivatives input[type=checkbox]").prop("checked", false);
    945945                        }
    946946                        {/footer_script}
     
    957957                        {footer_script}
    958958                        function selectDelDerivAll() {ldelim}
    959                                 $("#action_delete_derivatives input[type=checkbox]").attr("checked", true);
     959                                $("#action_delete_derivatives input[type=checkbox]").prop("checked", true);
    960960                        }
    961961                        function selectDelDerivNone() {ldelim}
    962                                 $("#action_delete_derivatives input[type=checkbox]").attr("checked", false);
     962                                $("#action_delete_derivatives input[type=checkbox]").prop("checked", false);
    963963                        }
    964964                        {/footer_script}
Note: See TracChangeset for help on using the changeset viewer.