From 4f3462cc04edeb9f3533f683e01216404f1b90b5 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 7 Aug 2014 05:02:18 +0000 Subject: [PATCH] Media Grid: remove some unused Trash/Delete handler logic. Rendered useless since [29266] and made official by [29322]. See #28819. git-svn-id: https://develop.svn.wordpress.org/trunk@29427 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/media-grid.js | 36 -------------------------------- 1 file changed, 36 deletions(-) diff --git a/src/wp-includes/js/media-grid.js b/src/wp-includes/js/media-grid.js index 943bc6cd60..9491e8d6cb 100644 --- a/src/wp-includes/js/media-grid.js +++ b/src/wp-includes/js/media-grid.js @@ -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 );