WordPress.org

Make WordPress Core

Changeset 22040


Ignore:
Timestamp:
09/27/2012 05:28:37 AM (8 years ago)
Author:
koopersmith
Message:

Automatically add any uploading media files to the group of selected files.

This also automatically adds any files uploaded on the gallery screen to that gallery.

see #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-views.js

    r22036 r22040  
    404404            // Track uploading attachments.
    405405            wp.Uploader.queue.on( 'add remove reset change:percent', this.renderUploadProgress, this );
     406            wp.Uploader.queue.on( 'add', this.selectUpload, this );
    406407        },
    407408
     
    428429                browser:   this.$('.upload-attachments a')
    429430            }, this.options.uploader ) );
     431        },
     432
     433        selectUpload: function( attachment ) {
     434            this.controller.selection.add( attachment );
    430435        },
    431436
Note: See TracChangeset for help on using the changeset viewer.