Autosave notice styling from mdawaffe. fixes #6054

git-svn-id: http://svn.automattic.com/wordpress/trunk@7145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-03-03 21:15:34 +00:00
parent e38923c92d
commit 08ed4d3b40
6 changed files with 7 additions and 18 deletions

View File

@ -484,7 +484,7 @@ case 'autosave' : // The name of this action is hardcoded in edit_post()
$do_lock = true;
$data = '';
$message = '<div class="updated"><p>' . sprintf( __('Saved at %s.'), date( __('g:i:s a'), current_time( 'timestamp', true ) ) ) . '</p></div>';
$message = sprintf( __('Draft Saved at %s.'), date( __('g:i:s a'), current_time( 'timestamp', true ) ) );
$supplemental = array();

View File

@ -148,10 +148,11 @@ if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_I
if ( ( 'edit' == $action) && current_user_can('delete_post', $post_ID) )
echo "<a href='" . wp_nonce_url("post.php?action=delete&amp;post=$post_ID", 'delete-post_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete&nbsp;post') . "</a>";
?>
<br class="clear" />
<?php if ($post_ID): ?>
<br />
<?php printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); ?>
<?php endif; ?>
<span id="autosave"></span>
</p>
<div class="side-info">
@ -197,8 +198,6 @@ endif; ?>
<?php echo $form_pingback ?>
<?php echo $form_prevstatus ?>
<div id="autosave"></div>
<div id="tagsdiv" class="postbox <?php echo postbox_classes('tagsdiv', 'post'); ?>">
<h3><?php _e('Tags'); ?></h3>
<div class="inside">

View File

@ -126,10 +126,11 @@ if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_I
if ( ('edit' == $action) && current_user_can('delete_page', $post_ID) )
echo "<a href='" . wp_nonce_url("page.php?action=delete&amp;post=$post_ID", 'delete-page_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete&nbsp;page') . "</a>";
?>
<br class="clear" />
<?php if ($post_ID): ?>
<br />
<?php printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); ?>
<?php endif; ?>
<span id="autosave"></span>
</p>
<div class="side-info">
@ -169,8 +170,6 @@ endif; ?>
<?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?>
</div>
<div id="autosave"></div>
<?php do_meta_boxes('page', 'normal', $post); ?>
<?php do_action('edit_page_form'); ?>

View File

@ -1047,15 +1047,6 @@ html, body {
margin-right: 8px;
}
#poststuff #autosave {
margin: 0;
padding: 0;
}
#poststuff #autosave div.updated, #poststuff #autosave div.error {
margin: 0 8px 10px 20px;
}
#poststuff .inside {
margin: 0 12px 15px;
font-size: 11px;

View File

@ -103,7 +103,7 @@ function autosave_update_slug(post_id) {
}
function autosave_loading() {
jQuery('#autosave').html('<div class="updated"><p>' + autosaveL10n.savingText + '</p></div>');
jQuery('#autosave').html(autosaveL10n.savingText);
}
function autosave_enable_buttons() {

View File

@ -53,7 +53,7 @@ class WP_Scripts {
'previewPageText' => __('View this Page'),
'previewPostText' => __('View this Post'),
'requestFile' => get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php',
'savingText' => __('Saving&#8230;')
'savingText' => __('Saving Draft&#8230;')
) );
$this->add( 'wp-ajax', '/wp-includes/js/wp-ajax.js', array('prototype'), '20070306');