Autosave: improve the notice when the sessionStorage autosave is different than the content.

- Make it higher priority than the server autosave.
- Change it so the editors undo and redo can be used.
- Replace the restore link with a button.
- Add better explanation/help.

See #37025.

git-svn-id: https://develop.svn.wordpress.org/trunk@37737 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2016-06-17 03:01:32 +00:00
parent 96d7eadb0c
commit 0f319917c4
2 changed files with 45 additions and 46 deletions

View File

@@ -2003,14 +2003,13 @@ function convert_to_screen( $hook_name ) {
*/
function _local_storage_notice() {
?>
<div id="local-storage-notice" class="hidden notice">
<div id="local-storage-notice" class="hidden notice is-dismissible">
<p class="local-restore">
<?php _e('The backup of this post in your browser is different from the version below.'); ?>
<a class="restore-backup" href="#"><?php _e('Restore the backup.'); ?></a>
<?php _e( 'The backup of this post in your browser is different from the version below.' ); ?>
<button type="button" class="button restore-backup"><?php _e('Restore the backup'); ?></button>
</p>
<p class="undo-restore hidden">
<?php _e('Post restored successfully.'); ?>
<a class="undo-restore-backup" href="#"><?php _e('Undo.'); ?></a>
<p class="help">
<?php _e( 'This will replace the current editor content with the last backup version. You can use undo and redo in the editor to get the old content back or to return to the restored version.' ); ?>
</p>
</div>
<?php