Skip to content

Commit 45dfe88

Browse files
committed
Remove the JS part of [31619].
Fixes WordPress#6820. git-svn-id: https://develop.svn.wordpress.org/trunk@31960 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 8f8c526 commit 45dfe88

4 files changed

Lines changed: 2 additions & 37 deletions

File tree

src/wp-includes/js/media/views.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2640,7 +2640,6 @@ Attachment = View.extend({
26402640
this.listenTo( this.model, 'change', this.render );
26412641
} else {
26422642
this.listenTo( this.model, 'change:percent', this.progress );
2643-
this.listenTo( this.model, 'change:parent', this.render );
26442643
}
26452644
this.listenTo( this.model, 'change:title', this._syncTitle );
26462645
this.listenTo( this.model, 'change:caption', this._syncCaption );
@@ -3180,8 +3179,7 @@ Details = Attachment.extend({
31803179
'click .untrash-attachment': 'untrashAttachment',
31813180
'click .edit-attachment': 'editAttachment',
31823181
'click .refresh-attachment': 'refreshAttachment',
3183-
'keydown': 'toggleSelectionHandler',
3184-
'click .detach-from-parent': 'detachFromParent'
3182+
'keydown': 'toggleSelectionHandler'
31853183
},
31863184

31873185
initialize: function() {
@@ -3280,20 +3278,6 @@ Details = Attachment.extend({
32803278
this.controller.trigger( 'attachment:keydown:arrow', event );
32813279
return;
32823280
}
3283-
},
3284-
3285-
/**
3286-
* @param {Object} event
3287-
*/
3288-
detachFromParent: function( event ) {
3289-
event.preventDefault();
3290-
3291-
this.model.save({
3292-
'parent' : 0,
3293-
'uploadedTo' : 0,
3294-
'uploadedToLink' : '',
3295-
'uploadedToTitle' : ''
3296-
});
32973281
}
32983282
});
32993283

src/wp-includes/js/media/views/attachment.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ Attachment = View.extend({
5252
this.listenTo( this.model, 'change', this.render );
5353
} else {
5454
this.listenTo( this.model, 'change:percent', this.progress );
55-
this.listenTo( this.model, 'change:parent', this.render );
5655
}
5756
this.listenTo( this.model, 'change:title', this._syncTitle );
5857
this.listenTo( this.model, 'change:caption', this._syncCaption );

src/wp-includes/js/media/views/attachment/details.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ Details = Attachment.extend({
3535
'click .untrash-attachment': 'untrashAttachment',
3636
'click .edit-attachment': 'editAttachment',
3737
'click .refresh-attachment': 'refreshAttachment',
38-
'keydown': 'toggleSelectionHandler',
39-
'click .detach-from-parent': 'detachFromParent'
38+
'keydown': 'toggleSelectionHandler'
4039
},
4140

4241
initialize: function() {
@@ -135,20 +134,6 @@ Details = Attachment.extend({
135134
this.controller.trigger( 'attachment:keydown:arrow', event );
136135
return;
137136
}
138-
},
139-
140-
/**
141-
* @param {Object} event
142-
*/
143-
detachFromParent: function( event ) {
144-
event.preventDefault();
145-
146-
this.model.save({
147-
'parent' : 0,
148-
'uploadedTo' : 0,
149-
'uploadedToLink' : '',
150-
'uploadedToTitle' : ''
151-
});
152137
}
153138
});
154139

src/wp-includes/media-template.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,6 @@ function wp_print_media_templates() {
418418
<# } else { #>
419419
<span class="value">{{ data.uploadedToTitle }}</span>
420420
<# } #>
421-
<# if ( data.nonces.edit ) { #>
422-
<a class="detach-from-parent" data-id="{{ data.id }}" href="#">(<?php _e( 'Detach' ); ?>)</a>
423-
<# } #>
424421
</label>
425422
<# } #>
426423
<div class="attachment-compat"></div>

0 commit comments

Comments
 (0)