Media Grid: remove some unused Trash/Delete handler logic. Rendered useless since [29266] and made official by [29322].

See #28819.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-08-07 05:03:17 +00:00
parent 8ed123c97f
commit f0f4174ed8
2 changed files with 1 additions and 37 deletions

View File

@ -236,23 +236,6 @@
media.view.Attachment.Details.TwoColumn = media.view.Attachment.Details.extend({
template: media.template( 'attachment-details-two-column' ),
preDestroy: function( event ) {
event.preventDefault();
this.lastIndex = this.controller.getCurrentIndex();
this.hasNext = this.controller.hasNext();
},
trashAttachment: function( event ) {
this.preDestroy( event );
media.view.Attachment.Details.prototype.trashAttachment.apply( this, arguments );
},
deleteAttachment: function( event ) {
this.preDestroy( event );
media.view.Attachment.Details.prototype.deleteAttachment.apply( this, arguments );
},
editAttachment: function( event ) {
event.preventDefault();
this.controller.setState( 'edit-image' );
@ -263,25 +246,6 @@
*/
toggleSelectionHandler: function() {},
afterDelete: function( model ) {
if ( ! model.destroyed ) {
return;
}
var frame = this.controller, index = this.lastIndex;
if ( ! frame.library.length ) {
media.frame.modal.close();
return;
}
if ( this.hasNext ) {
index -= 1;
}
frame.model = frame.library.at( index );
frame.nextMediaItem();
},
render: function() {
media.view.Attachment.Details.prototype.render.apply( this, arguments );

File diff suppressed because one or more lines are too long