Changeset 29098
- Timestamp:
- 07/11/2014 06:49:12 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/media-grid.js
r29089 r29098 310 310 }, 311 311 312 deleteAttachment: function( event ) {312 preDestroy: function( event ) { 313 313 event.preventDefault(); 314 314 315 315 this.lastIndex = this.controller.getCurrentIndex(); 316 316 this.hasNext = this.controller.hasNext(); 317 317 }, 318 319 trashAttachment: function( event ) { 320 this.preDestroy( event ); 321 media.view.Attachment.Details.prototype.trashAttachment.apply( this, arguments ); 322 }, 323 324 deleteAttachment: function( event ) { 325 this.preDestroy( event ); 318 326 media.view.Attachment.Details.prototype.deleteAttachment.apply( this, arguments ); 319 327 }, … … 503 511 this.content.set( view ); 504 512 // Update browser url when navigating media details 505 this.gridRouter.navigate( this.gridRouter.baseUrl( '?item=' + this.model.id ) ); 513 if ( this.model ) { 514 this.gridRouter.navigate( this.gridRouter.baseUrl( '?item=' + this.model.id ) ); 515 } else { 516 this.resetRoute(); 517 } 506 518 }, 507 519
Note: See TracChangeset
for help on using the changeset viewer.