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:
parent
8f8c526a56
commit
45dfe8815f
@ -2640,7 +2640,6 @@ Attachment = View.extend({
|
|||||||
this.listenTo( this.model, 'change', this.render );
|
this.listenTo( this.model, 'change', this.render );
|
||||||
} else {
|
} else {
|
||||||
this.listenTo( this.model, 'change:percent', this.progress );
|
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:title', this._syncTitle );
|
||||||
this.listenTo( this.model, 'change:caption', this._syncCaption );
|
this.listenTo( this.model, 'change:caption', this._syncCaption );
|
||||||
@ -3180,8 +3179,7 @@ Details = Attachment.extend({
|
|||||||
'click .untrash-attachment': 'untrashAttachment',
|
'click .untrash-attachment': 'untrashAttachment',
|
||||||
'click .edit-attachment': 'editAttachment',
|
'click .edit-attachment': 'editAttachment',
|
||||||
'click .refresh-attachment': 'refreshAttachment',
|
'click .refresh-attachment': 'refreshAttachment',
|
||||||
'keydown': 'toggleSelectionHandler',
|
'keydown': 'toggleSelectionHandler'
|
||||||
'click .detach-from-parent': 'detachFromParent'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
@ -3280,20 +3278,6 @@ Details = Attachment.extend({
|
|||||||
this.controller.trigger( 'attachment:keydown:arrow', event );
|
this.controller.trigger( 'attachment:keydown:arrow', event );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {Object} event
|
|
||||||
*/
|
|
||||||
detachFromParent: function( event ) {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
this.model.save({
|
|
||||||
'parent' : 0,
|
|
||||||
'uploadedTo' : 0,
|
|
||||||
'uploadedToLink' : '',
|
|
||||||
'uploadedToTitle' : ''
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -52,7 +52,6 @@ Attachment = View.extend({
|
|||||||
this.listenTo( this.model, 'change', this.render );
|
this.listenTo( this.model, 'change', this.render );
|
||||||
} else {
|
} else {
|
||||||
this.listenTo( this.model, 'change:percent', this.progress );
|
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:title', this._syncTitle );
|
||||||
this.listenTo( this.model, 'change:caption', this._syncCaption );
|
this.listenTo( this.model, 'change:caption', this._syncCaption );
|
||||||
|
@ -35,8 +35,7 @@ Details = Attachment.extend({
|
|||||||
'click .untrash-attachment': 'untrashAttachment',
|
'click .untrash-attachment': 'untrashAttachment',
|
||||||
'click .edit-attachment': 'editAttachment',
|
'click .edit-attachment': 'editAttachment',
|
||||||
'click .refresh-attachment': 'refreshAttachment',
|
'click .refresh-attachment': 'refreshAttachment',
|
||||||
'keydown': 'toggleSelectionHandler',
|
'keydown': 'toggleSelectionHandler'
|
||||||
'click .detach-from-parent': 'detachFromParent'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
@ -135,20 +134,6 @@ Details = Attachment.extend({
|
|||||||
this.controller.trigger( 'attachment:keydown:arrow', event );
|
this.controller.trigger( 'attachment:keydown:arrow', event );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {Object} event
|
|
||||||
*/
|
|
||||||
detachFromParent: function( event ) {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
this.model.save({
|
|
||||||
'parent' : 0,
|
|
||||||
'uploadedTo' : 0,
|
|
||||||
'uploadedToLink' : '',
|
|
||||||
'uploadedToTitle' : ''
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -418,9 +418,6 @@ function wp_print_media_templates() {
|
|||||||
<# } else { #>
|
<# } else { #>
|
||||||
<span class="value">{{ data.uploadedToTitle }}</span>
|
<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>
|
</label>
|
||||||
<# } #>
|
<# } #>
|
||||||
<div class="attachment-compat"></div>
|
<div class="attachment-compat"></div>
|
||||||
|
Loading…
Reference in New Issue
Block a user