Remove the JS part of [31619].

Fixes #6820.


git-svn-id: https://develop.svn.wordpress.org/trunk@31960 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-04-01 16:33:32 +00:00
parent 8f8c526a56
commit 45dfe8815f
4 changed files with 2 additions and 37 deletions

View File

@ -2640,7 +2640,6 @@ Attachment = View.extend({
this.listenTo( this.model, 'change', this.render );
} else {
this.listenTo( this.model, 'change:percent', this.progress );
this.listenTo( this.model, 'change:parent', this.render );
}
this.listenTo( this.model, 'change:title', this._syncTitle );
this.listenTo( this.model, 'change:caption', this._syncCaption );
@ -3180,8 +3179,7 @@ Details = Attachment.extend({
'click .untrash-attachment': 'untrashAttachment',
'click .edit-attachment': 'editAttachment',
'click .refresh-attachment': 'refreshAttachment',
'keydown': 'toggleSelectionHandler',
'click .detach-from-parent': 'detachFromParent'
'keydown': 'toggleSelectionHandler'
},
initialize: function() {
@ -3280,20 +3278,6 @@ Details = Attachment.extend({
this.controller.trigger( 'attachment:keydown:arrow', event );
return;
}
},
/**
* @param {Object} event
*/
detachFromParent: function( event ) {
event.preventDefault();
this.model.save({
'parent' : 0,
'uploadedTo' : 0,
'uploadedToLink' : '',
'uploadedToTitle' : ''
});
}
});

View File

@ -52,7 +52,6 @@ Attachment = View.extend({
this.listenTo( this.model, 'change', this.render );
} else {
this.listenTo( this.model, 'change:percent', this.progress );
this.listenTo( this.model, 'change:parent', this.render );
}
this.listenTo( this.model, 'change:title', this._syncTitle );
this.listenTo( this.model, 'change:caption', this._syncCaption );

View File

@ -35,8 +35,7 @@ Details = Attachment.extend({
'click .untrash-attachment': 'untrashAttachment',
'click .edit-attachment': 'editAttachment',
'click .refresh-attachment': 'refreshAttachment',
'keydown': 'toggleSelectionHandler',
'click .detach-from-parent': 'detachFromParent'
'keydown': 'toggleSelectionHandler'
},
initialize: function() {
@ -135,20 +134,6 @@ Details = Attachment.extend({
this.controller.trigger( 'attachment:keydown:arrow', event );
return;
}
},
/**
* @param {Object} event
*/
detachFromParent: function( event ) {
event.preventDefault();
this.model.save({
'parent' : 0,
'uploadedTo' : 0,
'uploadedToLink' : '',
'uploadedToTitle' : ''
});
}
});

View File

@ -418,9 +418,6 @@ function wp_print_media_templates() {
<# } else { #>
<span class="value">{{ data.uploadedToTitle }}</span>
<# } #>
<# if ( data.nonces.edit ) { #>
<a class="detach-from-parent" data-id="{{ data.id }}" href="#">(<?php _e( 'Detach' ); ?>)</a>
<# } #>
</label>
<# } #>
<div class="attachment-compat"></div>