mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
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:
parent
8ed123c97f
commit
f0f4174ed8
@ -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 );
|
||||
|
||||
|
2
wp-includes/js/media-grid.min.js
vendored
2
wp-includes/js/media-grid.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user