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.
Built from https://develop.svn.wordpress.org/trunk@37737


git-svn-id: http://core.svn.wordpress.org/trunk@37702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz
2016-06-17 03:02:29 +00:00
parent d242446e59
commit c8d203e1a3
4 changed files with 47 additions and 48 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