Permalink
Browse files

Draggable dash, first cut. Props mdawaffe. see #7552

git-svn-id: http://svn.automattic.com/wordpress/trunk@9103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
ryan
ryan committed Oct 8, 2008
1 parent 5d1f8b9 commit 637cca38daf7c37a462b2d94835f33e487f962a5
View
@@ -465,7 +465,8 @@
$comment = get_comment($comment_id);
if ( ! $comment ) die('1');
- $mode = ( isset($_POST['mode']) && 'single' == $_POST['mode'] ) ? 'single' : 'detail';
+ $modes = array( 'single', 'detail', 'dashboard' );
+ $mode = isset($_POST['mode']) && in_array( $_POST['mode'], $modes ) ? $_POST['mode'] : 'detail';
$position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1';
$checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0;
@@ -475,7 +476,12 @@
$x = new WP_Ajax_Response();
ob_start();
- _wp_comment_row( $comment->comment_ID, $mode, false, $checkbox );
+ if ( 'dashboard' == $mode ) {
+ require_once( ABSPATH . 'wp-admin/includes/dashboard.php' );
+ _wp_dashboard_recent_comments_row( $comment, false );
+ } else {
+ _wp_comment_row( $comment->comment_ID, $mode, false, $checkbox );
+ }
$comment_list_item = ob_get_contents();
ob_end_clean();
@@ -80,7 +80,7 @@
$breadcrumb = '<a href="index.php">' . __('Dashboard') . '</a> &rsaquo; ' . $title;
}
-$settings_pages = array( 'categories.php', 'edit.php', 'edit-comments.php', 'edit-form-advanced.php', 'edit-link-categories.php', 'edit-link-form.php', 'edit-page-form.php', 'edit-tags.php', 'link-manager.php', 'upload.php', 'users.php', 'edit-pages.php', 'post-new.php', 'post.php', 'page-new.php', 'page.php' );
+$settings_pages = array( 'categories.php', 'edit.php', 'edit-comments.php', 'edit-form-advanced.php', 'edit-link-categories.php', 'edit-link-form.php', 'edit-page-form.php', 'edit-tags.php', 'link-manager.php', 'upload.php', 'users.php', 'edit-pages.php', 'post-new.php', 'post.php', 'page-new.php', 'page.php', 'index.php' );
?>
<img id="logo50" src="images/logo50.png" alt="" /> <h1><?php if ( '' == get_bloginfo('name', 'display') ) echo '&nbsp;'; else echo get_bloginfo('name', 'display'); ?> <a href="<?php echo trailingslashit( get_bloginfo('url') ); ?>" title="View site" id="view-site-link"><img src="<?php echo trailingslashit( bloginfo('wpurl') ) . 'wp-admin/images/new-window-icon.gif'; ?>" alt="" /></a>
@@ -7,7 +7,7 @@
#footer {
background-position:99% 10px;
}
-#poststuff .closed .togbox, #poststuff .togbox {
+.metabox-holder .closed .togbox, .metabox-holder .togbox, #poststuff .closed .togbox, #poststuff .togbox {
background-image: url(../images/toggle-arrow-rtl.gif) !important;
}
.bar {
@@ -62,7 +62,7 @@ li.widget-list-control-item h4.widget-title a,
}
li.widget-list-control-item, div.nav, .tablenav, #dashboard-widgets p.dashboard-widget-links,
-.form-table tr, #poststuff h3, #replyhandle,
+.form-table tr, #poststuff h3, .metabox-holder h3, #replyhandle,
.login form, h3.info-box-title, #post-status-info, #edit-settings-wrap,
#wpbody-content .describe tr, #edithead, #replyhead {
background-color: #cfebf7;
@@ -498,23 +498,23 @@ input.readonly {
color: #333;
}
-#poststuff .closed .togbox {
+.metabox-holder .closed .togbox, #poststuff .closed .togbox {
background-color: #2583ad;
background-image: url(../images/toggle-arrow.gif);
}
-#poststuff .postbox, #titlediv, #poststuff .postarea, #poststuff .stuffbox {
+.metabox-holder .postbox, #poststuff .postbox, #titlediv, #poststuff .postarea, #poststuff .stuffbox {
border-color: #ebebeb;
border-right-color: #ccc;
border-bottom-color: #ccc;
}
-#poststuff .togbox {
+.metabox-holder .togbox, #poststuff .togbox {
background-color: #b2b2b2;
background-image: url(../images/toggle-arrow.gif);
}
-#poststuff .postbox {
+.metabox-holder .postbox, #poststuff .postbox {
background-color: #FFF;
}
@@ -15,7 +15,7 @@
border-right-color: transparent;
border-left-color: #ccc;
}
-#poststuff .closed .togbox, #poststuff .togbox {
+.metabox-holder .closed .togbox, .metabox-holder .togbox, #poststuff .closed .togbox, #poststuff .togbox {
background-image: url(../images/toggle-arrow-rtl.gif);
}
#upload-menu li.current {
@@ -62,7 +62,7 @@ li.widget-list-control-item h4.widget-title a,
}
li.widget-list-control-item, div.nav, .tablenav, #dashboard-widgets p.dashboard-widget-links,
-.form-table tr, #poststuff h3, #replyhandle,
+.form-table tr, #poststuff h3, .metabox-holder h3, #replyhandle,
.login form, h3.info-box-title, #post-status-info, #edit-settings-wrap,
#wpbody-content .describe tr, #edithead, #replyhead {
background-color: #eaf3fa;
@@ -482,23 +482,23 @@ input.readonly {
color: #333;
}
-#poststuff .closed .togbox {
+.metabox-holder .closed .togbox, #poststuff .closed .togbox {
background-color: #2583ad;
background-image: url(../images/toggle-arrow.gif);
}
-#poststuff .postbox, #titlediv, #poststuff .postarea, #poststuff .stuffbox {
+.metabox-holder .postbox, #poststuff .postbox, #titlediv, #poststuff .postarea, #poststuff .stuffbox {
border-color: #ebebeb;
border-right-color: #ccc;
border-bottom-color: #ccc;
}
-#poststuff .togbox {
+.metabox-holder .togbox, #poststuff .togbox {
background-color: #b2b2b2;
background-image: url(../images/toggle-arrow.gif);
}
-#poststuff .postbox {
+.metabox-holder .postbox, #poststuff .postbox {
background-color: #FFF;
}
@@ -1,62 +1 @@
-/* Right Now */
-#rightnow {
- margin-right:0;
- margin-left: 7px;
-}
-#rightnow .reallynow span {
- text-align: right;
- float: right;
-}
-#rightnow .reallynow a {
- text-align: left;
- float: left;
- margin: 1px 0 0 6px;
-}
-/* Widgets */
-div#dashboard-widgets-wrap {
- margin-right:0;
- margin-left:-13px;
-}
-div.dashboard-widget-holder {
- float:right;
-}
-div.dashboard-widget {
- margin-right:0;
- margin-left: 20px;
-}
-h3.dashboard-widget-title span {
- text-align: right;
- float: right;
-}
-h3.dashboard-widget-title small {
- text-align: left;
- float:left;
-}
-div.dashboard-widget-submit input {
- font-family: Tahoma;
-}
-div.dashboard-widget-content ul, div.dashboard-widget-content ol, div.dashboard-widget-content dl {
- padding-left:0;
- padding-right:15px;
-}
-#dashboard_secondary div.dashboard-widget-content ul li {
- float:right;
-}
-#dashboard_secondary div.dashboard-widget-content ul li .post {
- font-family:arial;
-}
-#dashboard_secondary div.dashboard-widget-content ul li a {
- border-right:0 none;
- border-left: 1px solid #dadada;
- height:110px;
-}
-#dashboard_secondary div.dashboard-widget-content ul li a cite {
- font-family: Tahoma;
-}
-#dashboard-widgets .widget_rss ul li span.rss-date {
- float:right;
-}
-#dashboard-widgets .widget_rss ul li a {
- float: right;
- margin: 0 0 .2em .5em;
-}
+/* TODO */
Oops, something went wrong.

0 comments on commit 637cca3

Please sign in to comment.