Changeset 31960
- Timestamp:
- 04/01/2015 04:33:32 PM (10 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/media/views.js
r31935 r31960 2641 2641 } else { 2642 2642 this.listenTo( this.model, 'change:percent', this.progress ); 2643 this.listenTo( this.model, 'change:parent', this.render );2644 2643 } 2645 2644 this.listenTo( this.model, 'change:title', this._syncTitle ); … … 3181 3180 'click .edit-attachment': 'editAttachment', 3182 3181 'click .refresh-attachment': 'refreshAttachment', 3183 'keydown': 'toggleSelectionHandler', 3184 'click .detach-from-parent': 'detachFromParent' 3182 'keydown': 'toggleSelectionHandler' 3185 3183 }, 3186 3184 … … 3281 3279 return; 3282 3280 } 3283 },3284 3285 /**3286 * @param {Object} event3287 */3288 detachFromParent: function( event ) {3289 event.preventDefault();3290 3291 this.model.save({3292 'parent' : 0,3293 'uploadedTo' : 0,3294 'uploadedToLink' : '',3295 'uploadedToTitle' : ''3296 });3297 3281 } 3298 3282 }); -
trunk/src/wp-includes/js/media/views/attachment.js
r31935 r31960 53 53 } else { 54 54 this.listenTo( this.model, 'change:percent', this.progress ); 55 this.listenTo( this.model, 'change:parent', this.render );56 55 } 57 56 this.listenTo( this.model, 'change:title', this._syncTitle ); -
trunk/src/wp-includes/js/media/views/attachment/details.js
r31935 r31960 36 36 'click .edit-attachment': 'editAttachment', 37 37 'click .refresh-attachment': 'refreshAttachment', 38 'keydown': 'toggleSelectionHandler', 39 'click .detach-from-parent': 'detachFromParent' 38 'keydown': 'toggleSelectionHandler' 40 39 }, 41 40 … … 136 135 return; 137 136 } 138 },139 140 /**141 * @param {Object} event142 */143 detachFromParent: function( event ) {144 event.preventDefault();145 146 this.model.save({147 'parent' : 0,148 'uploadedTo' : 0,149 'uploadedToLink' : '',150 'uploadedToTitle' : ''151 });152 137 } 153 138 }); -
trunk/src/wp-includes/media-template.php
r31642 r31960 418 418 <# } else { #> 419 419 <span class="value">{{ data.uploadedToTitle }}</span> 420 <# } #>421 <# if ( data.nonces.edit ) { #>422 <a class="detach-from-parent" data-id="{{ data.id }}" href="#">(<?php _e( 'Detach' ); ?>)</a>423 420 <# } #> 424 421 </label>
Note: See TracChangeset
for help on using the changeset viewer.