Make WordPress Core

Changeset 27243


Ignore:
Timestamp:
02/24/2014 08:48:02 PM (12 years ago)
Author:
wonderboymusic
Message:

Remove a few unnecessary jQuery selectors added in [27239]. Playlists don't exist in some older contexts that galleries do.

See #26631.

Location:
trunk/src/wp-includes/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/plupload/handlers.js

    r27239 r27243  
    2323
    2424        // Disable submit
    25         jQuery('#insert-gallery, #insert-playlist').prop('disabled', true);
     25        jQuery('#insert-gallery').prop('disabled', true);
    2626}
    2727
     
    4848        if ( max > hundredmb && file.size > hundredmb ) {
    4949                setTimeout(function(){
    50                        
     50
    5151                        if ( file.status < 3 && file.loaded === 0 ) { // not uploading
    5252                                wpFileError(file, pluploadL10n.big_upload_failed.replace('%1$s', '<a class="uploader-html" href="#">').replace('%2$s', '</a>'));
     
    6565        if ( items.length == 1 ) {
    6666                items.addClass('open').find('.slidetoggle').show();
    67                 jQuery('.insert-gallery, .insert-playlist').hide();
     67                jQuery('.insert-gallery').hide();
    6868        } else if ( items.length > 1 ) {
    6969                items.removeClass('open');
    7070                // Only show Gallery/Playlist buttons when there are at least two files.
    71                 jQuery('.insert-gallery, .insert-playlist').show();
     71                jQuery('.insert-gallery').show();
    7272        }
    7373
     
    172172                                var type,
    173173                                        item = jQuery('#media-item-' + fileObj.id);
    174                                
     174
    175175                                if ( type = jQuery('#type-of-' + fileObj.id).val() )
    176176                                        jQuery('#' + type + '-counter').text(jQuery('#' + type + '-counter').text()-0+1);
     
    258258
    259259function uploadComplete() {
    260         jQuery('#insert-gallery, #insert-playlist').prop('disabled', false);
     260        jQuery('#insert-gallery').prop('disabled', false);
    261261}
    262262
  • trunk/src/wp-includes/js/swfupload/handlers.js

    r27239 r27243  
    3333        try {
    3434                if ( typeof topWin.tb_remove != 'undefined' )
    35                         topWin.jQuery('#TB_overlay').unbind('click', topWin.tb_remove); 
     35                        topWin.jQuery('#TB_overlay').unbind('click', topWin.tb_remove);
    3636        } catch(e){}
    3737
     
    213213                jQuery('.savebutton').hide();
    214214
    215         // Only show Gallery/Playlist buttons when there are at least two files.
     215        // Only show Gallery buttons when there are at least two files.
    216216        if ( items.length > 1 ) {
    217                 jQuery('.insert-gallery, .insert-playlist').show();
     217                jQuery('.insert-gallery').show();
    218218        } else {
    219                 jQuery('.insert-gallery, .insert-playlist').hide();
     219                jQuery('.insert-gallery').hide();
    220220        }
    221221}
     
    240240        if ( swfu.getStats().files_queued == 0 ) {
    241241                jQuery('#cancel-upload').prop('disabled', true);
    242                 jQuery('#insert-gallery, #insert-playlist').prop('disabled', false);
     242                jQuery('#insert-gallery').prop('disabled', false);
    243243        }
    244244}
Note: See TracChangeset for help on using the changeset viewer.