Cleanup after [29220]:

`media.controller.Library` is State/Backbone Model and should not touch views.

See #23560.

Built from https://develop.svn.wordpress.org/trunk@29558


git-svn-id: http://core.svn.wordpress.org/trunk@29333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-08-20 20:00:16 +00:00
parent b89389da60
commit 557861446f
2 changed files with 9 additions and 5 deletions

View File

@ -753,8 +753,7 @@
}
this.get('selection').add( attachment );
// Set focus back to where it goes when an attachment is selected.
$( '.attachments-browser .attachments .attachment' ).first().focus();
this.frame.trigger( 'library:selection:add' );
},
/**
@ -5256,6 +5255,7 @@
this.collection.on( 'reset', this.render, this );
this.listenTo( this.controller, 'library:selection:add', this.attachmentFocus );
this.listenTo( this.controller, 'attachment:keydown:arrow', this.arrowEvent );
// Throttle the scroll handler and bind this.
@ -5278,6 +5278,10 @@
_.defer( this.setColumns, this );
},
attachmentFocus: function() {
this.$( 'li:first' ).focus();
},
arrowEvent: function( event ) {
var attachments = this.$el.children( 'li' ),
perRow = Math.round( this.$el.width() / attachments.first().outerWidth() ),

File diff suppressed because one or more lines are too long