Editor: hide the Move to Trash link for auto-drafts until they are auto-saved.

Props iseulde.
Fixes #16116.

git-svn-id: https://develop.svn.wordpress.org/trunk@36972 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2016-03-12 17:21:52 +00:00
parent 9d753fbf5a
commit b68a4e3da6
2 changed files with 8 additions and 0 deletions

View File

@ -134,6 +134,10 @@ input#link_url {
padding: 1px 2px;
}
body.post-new-php .submitbox .submitdelete {
display: none;
}
/* @todo: do we really need this? word on the street is we don't and this
stray rule may actually be compensated for elsewhere. */
#normal-sortables .submitbox .submitdelete:hover {

View File

@ -374,6 +374,10 @@ jQuery(document).ready( function($) {
$( '.autosave-message' ).text( postL10n.savingText );
}).on( 'after-autosave.edit-post', function( event, data ) {
$( '.autosave-message' ).text( data.message );
if ( $( document.body ).hasClass( 'post-new-php' ) ) {
$( '.submitbox .submitdelete' ).show();
}
});
$(window).on( 'beforeunload.edit-post', function() {