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
This commit is contained in:
parent
6e3e7b374b
commit
4f3462cc04
|
@ -236,23 +236,6 @@
|
||||||
media.view.Attachment.Details.TwoColumn = media.view.Attachment.Details.extend({
|
media.view.Attachment.Details.TwoColumn = media.view.Attachment.Details.extend({
|
||||||
template: media.template( 'attachment-details-two-column' ),
|
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 ) {
|
editAttachment: function( event ) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.controller.setState( 'edit-image' );
|
this.controller.setState( 'edit-image' );
|
||||||
|
@ -263,25 +246,6 @@
|
||||||
*/
|
*/
|
||||||
toggleSelectionHandler: function() {},
|
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() {
|
render: function() {
|
||||||
media.view.Attachment.Details.prototype.render.apply( this, arguments );
|
media.view.Attachment.Details.prototype.render.apply( this, arguments );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue