Changeset 29085
- Timestamp:
- 07/11/2014 05:21:04 AM (10 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/media-grid.js
r29081 r29085 304 304 this.model.on( 'add', this.select, this ); 305 305 this.model.on( 'remove', this.deselect, this ); 306 this.model.on( 'sync', this.afterDelete, this ); 307 }, 308 309 deleteAttachment: function( event ) { 310 event.preventDefault(); 311 312 this.lastIndex = this.controller.getCurrentIndex(); 313 this.hasNext = this.controller.hasNext(); 314 315 media.view.Attachment.Details.prototype.deleteAttachment.apply( this, arguments ); 316 }, 317 318 afterDelete: function( model ) { 319 if ( ! model.destroyed ) { 320 return; 321 } 322 323 var frame = this.controller, index = this.lastIndex; 324 325 if ( ! frame.library.length ) { 326 media.frame.modal.close(); 327 return; 328 } 329 330 if ( this.hasNext ) { 331 index -= 1; 332 } 333 frame.model = frame.library.at( index ); 334 frame.nextMediaItem(); 306 335 }, 307 336 -
trunk/src/wp-includes/media-template.php
r29082 r29085 290 290 <# if ( data.width && data.height ) { #> 291 291 <div class="dimensions">{{ data.width }} × {{ data.height }}</div> 292 <# } #>293 294 <# if ( data.can.save ) { #>295 <a class="edit-attachment" href="{{ data.editLink }}&image-editor" target="_blank"><?php _e( 'Edit Image' ); ?></a>296 <a class="refresh-attachment" href="#"><?php _e( 'Refresh' ); ?></a>297 292 <# } #> 298 293 <# } #>
Note: See TracChangeset
for help on using the changeset viewer.