Changeset 9219
- Timestamp:
- 10/16/2008 10:35:53 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/dashboard.css
r9121 r9219 109 109 } 110 110 111 /* QuickPress */ 112 113 #quick-press #add-media-button { 114 margin: .5em 0; 115 } 116 117 #quick-press #content-label { 118 margin-top: 1em; 119 } 120 121 #quick-press .textarea-wrap { 122 clear: both; 123 } 124 111 125 /* Recent Drafts */ 112 126 #dashboard_recent_drafts ul { … … 116 130 } 117 131 118 /* Primary Feed*/132 /* Feeds */ 119 133 120 #dashboard_primary a.rsswidget, #dashboard_plugins h5 { 134 .rss-widget ul { 135 margin: 0; 136 padding: 0; 137 list-style: none; 138 } 139 140 .rss-widget a.rsswidget { 121 141 font-size: 14px; 122 142 } 123 143 124 #dashboard_primaryspan.rss-date {144 .rss-widget span.rss-date { 125 145 font-size: 14px; 146 } 147 148 .rss-widget cite { 149 display: block; 150 text-align: right; 151 margin: 0 0 1em; 152 padding: 0; 153 } 154 155 .rss-widget cite:before { 156 content: '\2014'; 126 157 } 127 158 … … 129 160 130 161 #dashboard_plugins h5 { 162 font-size: 14px; 131 163 margin: 0; 132 164 display: inline; -
trunk/wp-admin/includes/dashboard.php
r9208 r9219 29 29 30 30 // QuickPress Widget 31 wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' , 'wp_dashboard_empty_control');31 wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' ); 32 32 33 33 // Recent Drafts … … 185 185 </div> 186 186 187 <h4><label for="quickpress-content"><?php _e('Post') ?></label></h4> 187 <div id="add-media-button" class="alignright"> 188 <a class="thickbox button" href="http://hacek.local/wordpress/wp-admin/media-upload.php?TB_iframe=true" id="add-media-link"><?php _e( 'Insert Media' ); ?></a> 189 </div> 190 191 <h4 id="content-label"><label for="content"><?php _e('Post') ?></label></h4> 188 192 <div class="textarea-wrap"> 189 <textarea name="content" id=" quickpress-content" class="mceEditor" rows="3" cols="15"><?php echo $post->post_content; ?></textarea>193 <textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php echo $post->post_content; ?></textarea> 190 194 </div> 191 195 … … 316 320 $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a>'; 317 321 $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>'; 318 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; 322 $actions['quickedit'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\',\'edit\');return false;" class="vim-q" title="'.__('Quick Edit').'" href="#">' . __('Quick Edit') . '</a>'; 323 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; 319 324 320 325 $actions = apply_filters( 'comment_row_actions', $actions, $comment ); … … 327 332 328 333 // Reply and quickedit need a hide-if-no-js span 329 if ( 'reply' == $action || 'quickedit' == $action)334 if ( 'reply' == $action ) 330 335 $action .= ' hide-if-no-js'; 336 elseif ( 'quickedit' == $action ) 337 $action .= ' hide-if-no-js hide-if-js'; // hah 331 338 332 339 $actions_string .= "<span class='$action'>$sep$link</span>"; … … 362 369 <blockquote><p><?php comment_excerpt(); ?></p></blockquote> 363 370 <p class="comment-actions"><?php echo $actions_string; ?></p> 371 372 <div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden"> 373 <textarea class="comment"><?php echo $comment->comment_content; ?></textarea> 374 <div class="author-email"><?php echo attribute_escape( $comment->comment_author_email ); ?></div> 375 <div class="author"><?php echo attribute_escape( $comment->comment_author ); ?></div> 376 <div class="author-url"><?php echo attribute_escape( $comment->comment_author_url ); ?></div> 377 <div class="comment_status"><?php echo $comment->comment_approved; ?></div> 378 </div> 379 364 380 </div> 365 381 <?php … … 455 471 function wp_dashboard_rss_output( $widget_id ) { 456 472 $widgets = get_option( 'dashboard_widget_options' ); 473 echo "<div class='rss-widget'>"; 457 474 wp_widget_rss_output( $widgets[$widget_id] ); 475 echo "</div>"; 458 476 } 459 477 … … 463 481 464 482 function wp_dashboard_secondary_control() { 465 wp_dashboard_rss_control( 'dashboard_secondary' , array( 'show_summary' => false, 'show_author' => false, 'show_date' => false ));483 wp_dashboard_rss_control( 'dashboard_secondary' ); 466 484 } 467 485 … … 477 495 @extract( @$widgets['dashboard_secondary'], EXTR_SKIP ); 478 496 $rss = @fetch_rss( $url ); 497 479 498 if ( !isset($rss->items) || 0 == count($rss->items) ) 480 499 return false; 481 500 482 echo "<ul id='planetnews'>\n";483 484 501 $rss->items = array_slice($rss->items, 0, $items); 485 foreach ($rss->items as $item ) { 486 $title = wp_specialchars($item['title']); 487 list($author,$post) = explode( ':', $title, 2 ); 488 $link = clean_url($item['link']); 489 490 echo "\t<li><a href='$link'><span class='post'>$post</span><span class='hidden'> - </span><cite>$author</cite></a></li>\n"; 491 } 492 493 echo "</ul>\n<br class='clear' />\n"; 502 503 if ( 'http://planet.wordpress.org/' == $rss->channel['link'] ) { 504 foreach ( array_keys($rss->items) as $i ) { 505 list($site, $description) = explode( ':', wp_specialchars($rss->items[$i]['title']), 2 ); 506 $rss->items[$i]['dc']['creator'] = trim($site); 507 $rss->items[$i]['title'] = trim($description); 508 } 509 } 510 511 echo "<div class='rss-widget'>"; 512 wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] ); 513 echo "</div>"; 494 514 } 495 515 … … 605 625 606 626 /* Dashboard Widgets Controls */ 607 608 // Temp609 function wp_dashboard_empty_control() {610 echo "This feature isn't enabled in this prototype.";611 }612 627 613 628 // Calls widget_control callback -
trunk/wp-admin/index.php
r9103 r9219 17 17 wp_enqueue_script( 'dashboard' ); 18 18 wp_enqueue_script( 'plugin-install' ); 19 wp_enqueue_script( 'media-upload' ); 19 20 wp_admin_css( 'dashboard' ); 20 21 wp_admin_css( 'plugin-install' ); -
trunk/wp-admin/js/dashboard.js
r9103 r9219 1 var edCanvas; 2 1 3 jQuery( function($) { 2 4 … … 43 45 44 46 $('#publish').click( function() { act.val( 'post-quickpress-publish' ); } ); 47 48 edCanvas = jQuery('#content'); 45 49 }; 46 50 quickPressLoad(); -
trunk/wp-admin/js/edit-comments.js
r9217 r9219 90 90 init : function() { 91 91 this.rows = $('#the-comment-list tr'); 92 if ( !this.rows.size() ) 93 this.rows = $('#the-comment-list > div.comment-item'); 92 94 var row = $('#replyrow'); 93 95 -
trunk/wp-admin/js/media-upload.js
r8600 r9219 10 10 11 11 ed.execCommand('mceInsertContent', false, h); 12 } else 12 } else if ( jQuery.isFunction( 'edInsertContent' ) ) { 13 13 edInsertContent(edCanvas, h); 14 } else { 15 jQuery( edCanvas ).val( jQuery( edCanvas ).val() + h ); 16 } 14 17 15 18 tb_remove(); -
trunk/wp-includes/widgets.php
r9088 r9219 1582 1582 $title = __('Untitled'); 1583 1583 $desc = ''; 1584 $summary = '';1585 1584 if ( isset( $item['description'] ) && is_string( $item['description'] ) ) 1586 $desc = $summary =str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['description'], ENT_QUOTES))));1585 $desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['description'], ENT_QUOTES)))); 1587 1586 elseif ( isset( $item['summary'] ) && is_string( $item['summary'] ) ) 1588 $desc = $summary = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['summary'], ENT_QUOTES)))); 1587 $desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['summary'], ENT_QUOTES)))); 1588 if ( 360 < strlen( $desc ) ) 1589 $desc = substr( $desc, 0, 360 ) . ' […]'; 1590 $summary = $desc; 1589 1591 1590 1592 if ( $show_summary ) {
Note: See TracChangeset
for help on using the changeset viewer.