Skip to:
Content

BuddyPress.org

Changeset 4450


Ignore:
Timestamp:
06/04/2011 06:21:39 PM (15 years ago)
Author:
djpaul
Message:

Update for jQuery 1.6.1. Fixes #3251

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/_inc/global.js

    r4349 r4450  
    3838                form.children().each( function() {
    3939                        if ( jq.nodeName(this, "textarea") || jq.nodeName(this, "input") )
    40                                 jq(this).attr( 'disabled', 'disabled' );
     40                                jq(this).prop( 'disabled', true );
    4141                });
    4242
    … …  
    4545                /* Remove any errors */
    4646                jq('div.error').remove();
    47                 button.attr('disabled','disabled');
     47                button.prop('disabled', true);
    4848
    4949                /* Default POST values */
    … …  
    7171                        form.children().each( function() {
    7272                                if ( jq.nodeName(this, "textarea") || jq.nodeName(this, "input") )
    73                                         jq(this).attr( 'disabled', '' );
     73                                        jq(this).prop( 'disabled', false );
    7474                        });
    7575
    … …  
    7878                                form.prepend( response.substr( 2, response.length ) );
    7979                                jq( 'form#' + form.attr('id') + ' div.error').hide().fadeIn( 200 );
    80                                 button.attr("disabled", '');
     80                                button.prop("disabled", false);
    8181                        } else {
    8282                                if ( 0 == jq("ul.activity-list").length ) {
    … …  
    8888                                jq("ul.activity-list").prepend(response);
    8989                                jq("ul.activity-list li:first").addClass('new-update');
    90                                
     90
    9191                                if ( 0 != jq("div#latest-update").length ) {
    9292                                        var l = jq("ul#activity-stream li.new-update .activity-content .activity-inner p").html();
    9393                                        var v = jq("ul#activity-stream li.new-update .activity-content .activity-header p a.view").attr('href');
    94                                        
     94
    9595                                        jq("div#latest-update").slideUp(300,function(){
    9696                                                jq("div#latest-update").html('"' + l + '" &middot; <a href="' + v + '" rel="nofollow">View</a>');
    … …  
    9898                                        });
    9999                                }
    100                                
     100
    101101                                jq("li.new-update").hide().slideDown( 300 );
    102102                                jq("li.new-update").removeClass( 'new-update' );
    … …  
    104104
    105105                                /* Re-enable the submit button after 8 seconds. */
    106                                 setTimeout( function() { button.attr("disabled", ''); }, 8000 );
     106                                setTimeout( function() { button.prop("disabled", false); }, 8000 );
    107107                        }
    108108                });
    … …  
    371371                                if ( response[0] + response[1] == '-1' ) {
    372372                                        form.append( response.substr( 2, response.length ) ).hide().fadeIn( 200 );
    373                                         target.attr("disabled", '');
     373                                        target.prop("disabled", false);
    374374                                } else {
    375375                                        form.fadeOut( 200,
    … …  
    393393
    394394                                        /* Re-enable the submit button after 5 seconds. */
    395                                         setTimeout( function() { target.attr("disabled", ''); }, 5000 );
     395                                        setTimeout( function() { target.prop("disabled", false); }, 5000 );
    396396                                }
    397397                        });
    … …  
    644644                var friend_id = jq(this).val();
    645645
    646                 if ( jq(this).attr('checked') == true )
     646                if ( jq(this).prop('checked') == true )
    647647                        var friend_action = 'invite';
    648648                else
    … …  
    696696                        jq('.ajax-loader').toggle();
    697697                        jq('#friend-list li#uid-' + friend_id).remove();
    698                         jq('#invite-list input#f-' + friend_id).attr('checked', false);
     698                        jq('#invite-list input#f-' + friend_id).prop('checked', false);
    699699                });
    700700
    … …  
    10761076
    10771077        if ( null != jq.cookie('bp-activity-filter') && jq('#activity-filter-select').length )
    1078                 jq('#activity-filter-select select option[value="' + jq.cookie('bp-activity-filter') + '"]').attr( 'selected', 'selected' );
     1078                jq('#activity-filter-select select option[value="' + jq.cookie('bp-activity-filter') + '"]').prop( 'selected', true );
    10791079
    10801080        /* Activity Tab Set */
    … …  
    10911091        jq(objects).each( function(i) {
    10921092                if ( null != jq.cookie('bp-' + objects[i] + '-filter') && jq('li#' + objects[i] + '-order-select select').length )
    1093                         jq('li#' + objects[i] + '-order-select select option[value="' + jq.cookie('bp-' + objects[i] + '-filter') + '"]').attr( 'selected', 'selected' );
     1093                        jq('li#' + objects[i] + '-order-select select option[value="' + jq.cookie('bp-' + objects[i] + '-filter') + '"]').prop( 'selected', true );
    10941094
    10951095                if ( null != jq.cookie('bp-' + objects[i] + '-scope') && jq('div.' + objects[i]).length ) {
    … …  
    11241124        jq('div.item-list-tabs li#' + object + '-' + scope + ', div.item-list-tabs#object-nav li.current').addClass('selected');
    11251125        jq('div.item-list-tabs li.selected').addClass('loading');
    1126         jq('div.item-list-tabs select option[value="' + filter + '"]').attr( 'selected', 'selected' );
     1126        jq('div.item-list-tabs select option[value="' + filter + '"]').prop( 'selected', true );
    11271127
    11281128        if ( 'friends' == object )
    … …  
    11661166        jq('li#activity-' + scope + ', div.item-list-tabs li.current').addClass('selected');
    11671167        jq('div#object-nav.item-list-tabs li.selected, div.activity-type-tabs li.selected').addClass('loading');
    1168         jq('#activity-filter-select select option[value="' + filter + '"]').attr( 'selected', 'selected' );
     1168        jq('#activity-filter-select select option[value="' + filter + '"]').prop( 'selected', true );
    11691169
    11701170        /* Reload the activity stream based on the selection */
Note: See TracChangeset for help on using the changeset viewer.