From 9e349220b592911c7856e59a5d499f3e8434fff0 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 20 Feb 2008 02:41:16 +0000 Subject: [PATCH] Update edit comment form. WIP git-svn-id: http://svn.automattic.com/wordpress/trunk@6923 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/comment.php | 2 + wp-admin/edit-form-comment.php | 122 ++++++++++++++++++--------------- wp-admin/js/comment.js | 14 ++++ wp-admin/wp-admin.css | 8 +-- wp-includes/script-loader.php | 1 + 5 files changed, 85 insertions(+), 62 deletions(-) create mode 100644 wp-admin/js/comment.js diff --git a/wp-admin/comment.php b/wp-admin/comment.php index 990d4b52da..2406f177dc 100644 --- a/wp-admin/comment.php +++ b/wp-admin/comment.php @@ -20,6 +20,8 @@ switch( $action ) { case 'editcomment' : $title = __('Edit Comment'); + wp_enqueue_script('comment'); + //wp_enqueue_script('thickbox'); require_once('admin-header.php'); $comment_id = absint( $_GET['c'] ); diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index 6425775740..5cb5803f1f 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -18,71 +18,81 @@ function focusit() { // focus on first input field } addLoadEvent(focusit); -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- - comment_content, 'content', 'newcomment_author_url'); ?> -
+
+ +
+

+
+ +
+
+ +
+

+
+ +
+
+ +
+

+
+ +
+
+ +
+

+comment_content, 'content'); ?> + +
+ +
+ +
+ +
+ +
+ +

+

+ +

comment_post_ID); //get the post - $post_title = $post->post_title; // and its title +$stamp = __('Timestamp:
%1$s at %2$s'); +$date = mysql2date(get_option('date_format'), $comment->comment_date); +$time = mysql2date(get_option('time_format'), $comment->comment_date); ?> -
- -

- -

-
+

+ +
-
-

+

+ +comment_ID", 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . ""; +?> +

+ +
- - - - - - - - - - - - - - - - - -
:   -   -
:
 comment_ID ) . "'; return true; } return false;\""; ?> /> - - - -
+ + + + + +
diff --git a/wp-admin/js/comment.js b/wp-admin/js/comment.js new file mode 100644 index 0000000000..77a211e5ec --- /dev/null +++ b/wp-admin/js/comment.js @@ -0,0 +1,14 @@ +addLoadEvent( function() { + add_postbox_toggles('comment'); + + jQuery('#timestamp').css('display', 'none'); + jQuery('.edit-timestamp').click(function () { + if (jQuery('#timestamp').is(":hidden")) { + jQuery('#timestamp').slideDown("normal"); + } else { + jQuery('#timestamp').hide(); + } + }); +}); + + diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index 6f26c66ad2..f286906261 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -239,7 +239,7 @@ input.disabled, textarea.disabled { background: #ccc; } -#postdiv, #titlediv, #guiddiv { +#postdiv, #titlediv, #guiddiv, #poststuff .stuffbox { margin: 0 8px 0 0; padding: 0; } @@ -411,10 +411,6 @@ input.delete:hover { background: #8B8; } -#namediv, #emaildiv, #uridiv { - float: left; -} - #ajax-response { padding: .5em; } @@ -999,7 +995,7 @@ html, body { padding: 2px; } -#poststuff .postbox, #titlediv, #poststuff .postarea { +#poststuff .postbox, #titlediv, #poststuff .postarea, #poststuff .stuffbox { margin-left: 20px; border: 1px solid #ebebeb; border-right: 1px solid #ccc; diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 7041f76062..e02576a3ca 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -155,6 +155,7 @@ class WP_Scripts { ) ); $this->add( 'page', '/wp-admin/js/page.js', array('jquery', 'slug', 'postbox'), '20080208' ); $this->add( 'link', '/wp-admin/js/link.js', array('jquery-ui-tabs', 'wp-lists', 'postbox'), '20080131' ); + $this->add( 'comment', '/wp-admin/js/comment.js', array('postbox'), '20080219' ); $this->add( 'media-upload', '/wp-admin/js/media-upload.js', false, '20080109' ); $this->localize( 'upload', 'uploadL10n', array( 'browseTitle' => attribute_escape(__('Browse your files')),