WordPress.org

Make WordPress Core

Changeset 31582


Ignore:
Timestamp:
02/27/2015 09:26:42 PM (6 years ago)
Author:
wonderboymusic
Message:

When viewing media in List mode, auto-submit the form for attachment filters when the value of a <select> changes. This makes it behave similar to Grid mode and "feels" more performant, even though it is a full page load.

Fixes #30333.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/media.js

    r31037 r31582  
    7373
    7474    $( document ).ready( function() {
    75         var settings, $mediaGridWrap = $( '#wp-media-grid' );
     75        var settings,
     76            $mediaGridWrap = $( '#wp-media-grid' ),
     77            $form = $( '#posts-filter' );
     78
     79        $form.find( 'select' ).on( 'change', function () {
     80            $form.submit();
     81        } );
    7682
    7783        // Open up a manage media frame into the grid.
Note: See TracChangeset for help on using the changeset viewer.