Media Library: After [36546] restore the "Add new" functionality.

Rework handling of the `'toggle:upload:attachment'` event using `.on` vs `.listenTo` for better compatibility with the current version of Backbone.

Props adamsilverstein.
See #34350.
Fixes #35853.
Built from https://develop.svn.wordpress.org/trunk@36575


git-svn-id: http://core.svn.wordpress.org/trunk@36542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling
2016-02-18 17:50:26 +00:00
parent d499011145
commit 71b735974b
3 changed files with 3 additions and 3 deletions

View File

@@ -3754,7 +3754,7 @@ AttachmentsBrowser = View.extend({
AttachmentView: wp.media.view.Attachment.Library
});
this.listenTo( this.controller, 'toggle:upload:attachment', _.bind( this.toggleUploader, this ) );
this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this );
this.controller.on( 'edit:selection', this.editSelection );
this.createToolbar();
if ( this.options.sidebar ) {

File diff suppressed because one or more lines are too long

View File

@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-alpha-36574';
$wp_version = '4.5-alpha-36575';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.