WordPress.org

Make WordPress Core

Changeset 29831


Ignore:
Timestamp:
10/03/2014 06:42:13 PM (5 years ago)
Author:
wonderboymusic
Message:

For attachment-compat fields, show a spinner while wp.media.model.Attachment.saveCompat() is firing.

Fixes #27028.

File:
1 edited

Legend:

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

    r29813 r29831  
    48414841                this.details( this.model, this.controller.state().get('selection') );
    48424842            }
     4843
     4844            this.listenTo( this.controller, 'attachment:compat:waiting attachment:compat:ready', this.updateSave );
    48434845        },
    48444846        /**
     
    69096911            });
    69106912
    6911             this.model.saveCompat( data );
     6913            this.controller.trigger( 'attachment:compat:waiting', ['waiting'] );
     6914            this.model.saveCompat( data ).always( _.bind( this.postSave, this ) );
     6915        },
     6916
     6917        postSave: function() {
     6918            this.controller.trigger( 'attachment:compat:ready', ['ready'] );
    69126919        }
    69136920    });
Note: See TracChangeset for help on using the changeset viewer.