Changeset 9413
- Timestamp:
- 10/30/2008 12:24:11 PM (17 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 10 edited
-
css/colors-fresh.css (modified) (1 diff)
-
edit-comments.php (modified) (2 diffs)
-
edit-form-advanced.php (modified) (1 diff)
-
edit-pages.php (modified) (1 diff)
-
edit.php (modified) (1 diff)
-
includes/template.php (modified) (6 diffs)
-
js/edit-comments.js (modified) (2 diffs)
-
js/post.js (modified) (2 diffs)
-
upload.php (modified) (1 diff)
-
wp-admin.css (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/colors-fresh.css
r9411 r9413 30 30 } 31 31 32 .widefat { 32 .widefat, 33 #replyrow { 33 34 border-color: #dfdfdf; 34 35 } -
trunk/wp-admin/edit-comments.php
r9363 r9413 243 243 244 244 <?php if ( $comments ) { ?> 245 <table class="widefat"> 246 <thead> 247 <tr> 248 <?php print_column_headers('comment'); ?> 249 </tr> 250 </thead> 251 252 <tfoot> 253 <tr> 254 <?php print_column_headers('comment', false); ?> 255 </tr> 256 </tfoot> 257 258 <tbody id="the-comment-list" class="list:comment"> 245 246 <ol id="the-comment-list" class="list:comment"> 259 247 <?php 260 248 foreach ($comments as $comment) 261 249 _wp_comment_row( $comment->comment_ID, $mode, $comment_status ); 262 250 ?> 263 </ tbody>264 < tbodyid="the-extra-comment-list" class="list:comment" style="display: none;">251 </ol> 252 <ol id="the-extra-comment-list" class="list:comment" style="display: none;"> 265 253 <?php 266 254 foreach ($extra_comments as $comment) 267 255 _wp_comment_row( $comment->comment_ID, $mode, $comment_status ); 268 256 ?> 269 </tbody> 270 </table> 257 </ol> 271 258 272 259 <div class="tablenav"> … … 331 318 332 319 <?php 333 wp_comment_reply('-1', true, 'detail' );320 wp_comment_reply('-1', true, 'detail', false); 334 321 include('admin-footer.php'); ?> -
trunk/wp-admin/edit-form-advanced.php
r9409 r9413 369 369 ?> 370 370 371 <table class="widefat comments-box" style="display:none;"> 372 <thead> 373 <tr> 374 <th scope="col"><?php _e('Comments') ?></th> 375 <th scope="col"><?php _e('Author') ?></th> 376 <th scope="col"><?php _e('Submitted') ?></th> 377 </tr> 378 </thead> 379 <tbody id="the-comment-list" class="list:comment"> 380 </tbody> 381 </table> 371 <div class="comments-box" style="display:none;"> 372 <ol id="the-comment-list" class="list:comment"> 373 </ol> 374 </div> 382 375 <p class="hide-if-no-js"><a href="#commentstatusdiv" id="show-comments" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="images/loading.gif" alt="" /></p> 383 376 <?php -
trunk/wp-admin/edit-pages.php
r9363 r9413 278 278 <br class="clear" /> 279 279 280 <table class="widefat" style="margin-top: .5em"> 281 <thead> 282 <tr> 283 <th scope="col"><?php _e('Comment') ?></th> 284 <th scope="col"><?php _e('Date') ?></th> 285 <th scope="col"><?php _e('Actions') ?></th> 286 </tr> 287 </thead> 288 <tbody id="the-comment-list" class="list:comment"> 280 <ol id="the-comment-list" class="list:comment"> 289 281 <?php 290 282 foreach ($comments as $comment) 291 283 _wp_comment_row( $comment->comment_ID, 'detail', false, false ); 292 284 ?> 293 </tbody> 294 </table> 285 </ol> 295 286 296 287 <?php -
trunk/wp-admin/edit.php
r9363 r9413 280 280 <br class="clear" /> 281 281 282 <table class="widefat" style="margin-top: .5em"> 283 <thead> 284 <tr> 285 <th scope="col"><?php _e('Comment') ?></th> 286 <th scope="col"><?php _e('Author') ?></th> 287 <th scope="col"><?php _e('Submitted') ?></th> 288 </tr> 289 </thead> 290 291 <tfoot> 292 <tr> 293 <th scope="col"><?php _e('Comment') ?></th> 294 <th scope="col"><?php _e('Author') ?></th> 295 <th scope="col"><?php _e('Submitted') ?></th> 296 </tr> 297 </tfoot> 298 299 <tbody id="the-comment-list" class="list:comment"> 282 <ol id="the-comment-list" class="list:comment"> 300 283 <?php 301 284 foreach ($comments as $comment) 302 285 _wp_comment_row( $comment->comment_ID, 'single', false, false ); 303 286 ?> 304 </tbody> 305 </table> 287 </ol> 306 288 307 289 <?php -
trunk/wp-admin/includes/template.php
r9402 r9413 1859 1859 $unapprove_url = clean_url( wp_nonce_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "unapprove-comment_$comment->comment_ID" ) ); 1860 1860 $spam_url = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); 1861 1862 echo "<tr id='comment-$comment->comment_ID' class='$the_comment_status'>"; 1863 $columns = get_column_headers('comment'); 1864 $hidden = (array) get_user_option( 'manage-comment-columns-hidden' ); 1865 foreach ( $columns as $column_name => $column_display_name ) { 1866 $class = "class=\"$column_name column-$column_name\""; 1867 1868 $style = ''; 1869 if ( in_array($column_name, $hidden) ) 1870 $style = ' style="display:none;"'; 1871 1872 $attributes = "$class$style"; 1873 1874 switch ($column_name) { 1875 case 'cb': 1876 if ( !$checkbox ) break; 1877 echo '<th scope="row" class="check-column">'; 1878 if ( current_user_can('edit_post', $comment->comment_post_ID) ) echo "<input type='checkbox' name='delete_comments[]' value='$comment->comment_ID' />"; 1879 echo '</th>'; 1880 break; 1881 case 'comment': 1882 echo "<td $attributes>"; 1883 if ( 'detail' == $mode || 'single' == $mode ) comment_text(); ?> 1884 <div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden"> 1885 <textarea class="comment" rows="3" cols="10"><?php echo $comment->comment_content; ?></textarea> 1886 <div class="author-email"><?php echo attribute_escape( $comment->comment_author_email ); ?></div> 1887 <div class="author"><?php echo attribute_escape( $comment->comment_author ); ?></div> 1888 <div class="author-url"><?php echo attribute_escape( $comment->comment_author_url ); ?></div> 1889 <div class="comment_status"><?php echo $comment->comment_approved; ?></div> 1890 </div> 1891 <?php 1892 $actions = array(); 1893 1894 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 1895 $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>'; 1896 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>'; 1897 if ( $comment_status ) { // not looking at all comments 1898 if ( 'approved' == $the_comment_status ) { 1899 $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment vim-u vim-destructive' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>'; 1900 unset($actions['approve']); 1901 } else { 1902 $actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment vim-a vim-destructive' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>'; 1903 unset($actions['unapprove']); 1904 } 1905 } 1906 if ( 'spam' != $the_comment_status ) 1907 $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>'; 1908 $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>'; 1909 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>'; 1910 $actions['quickedit'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',\'edit\');return false;" class="vim-q" title="'.__('Quick Edit').'" href="#">' . __('Quick Edit') . '</a>'; 1911 if ( 'spam' != $the_comment_status ) 1912 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\');return false;" class="vim-r" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; 1913 1914 $actions = apply_filters( 'comment_row_actions', $actions, $comment ); 1915 1916 $i = 0; 1917 foreach ( $actions as $action => $link ) { 1918 ++$i; 1919 ( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | '; 1920 1921 // Reply and quickedit need a hide-if-no-js span 1922 if ( 'reply' == $action || 'quickedit' == $action ) 1923 $action .= ' hide-if-no-js'; 1924 1925 echo "<span class='$action'>$sep$link</span>"; 1926 } 1927 } 1928 1929 echo '</td>'; 1930 break; 1931 case 'author': 1932 echo "<td $attributes><strong>"; comment_author(); echo '</strong><br />'; 1933 if ( !empty($author_url) ) 1934 echo "<a href='$author_url'>$author_url_display</a><br />"; 1935 if ( current_user_can( 'edit_post', $post->ID ) ) { 1936 if ( !empty($comment->comment_author_email) ) { 1937 comment_author_email_link(); 1938 echo '<br />'; 1939 } 1940 echo '<a href="edit-comments.php?s='; 1941 comment_author_IP(); 1942 echo '&mode=detail">'; 1943 comment_author_IP(); 1944 echo '</a>'; 1945 } //current_user_can 1946 echo '</td>'; 1947 break; 1948 case 'date': 1949 echo "<td $attributes>" . get_comment_date(__('Y/m/d \a\t g:ia')) . '</td>'; 1950 break; 1951 case 'response': 1952 if ( 'single' !== $mode ) { 1953 echo "<td $attributes>\n"; 1954 echo ""$post_link" "; 1955 echo '<a href="edit-comments.php?p=' . $post->ID; 1956 if ( !empty($_GET['comment_type']) ) echo '&comment_type=' . htmlspecialchars( $_GET['comment_type'] ); 1957 echo '">' . sprintf ( __ngettext('(%s comment)', '(%s comments)', $post->comment_count), $post->comment_count ) . '</a><br />'; 1958 echo get_the_time(__('Y/m/d \a\t g:ia')); 1959 echo '</td>'; 1960 } 1861 ?> 1862 <li id='comment-<?php echo $comment->comment_ID; ?>' class='<?php echo $the_comment_status; ?> comment-list-item'> 1863 <p class="comment-author"><strong><?php comment_author(); ?></strong> 1864 <?php if ( current_user_can( 'edit_post', $post->ID ) && !empty( $comment->comment_author_email ) ) { echo ' | '; comment_author_email_link(); } ?> 1865 <span class="sepa">|</span> <a href="edit-comments.php?s=<?php comment_author_IP(); ?>"><?php comment_author_IP(); ?></a> <span class="sepa">|</span> <a href="<?php echo get_permalink( $post->ID ) . '#comment-' . $comment->comment_ID; ?>" style="text-decoration: none;">#</a><br /> 1866 <?php if ( !empty($author_url) ) echo "<a href='$author_url'>$author_url_display</a>"; ?> 1867 </p> 1868 1869 <?php if ( 'detail' == $mode || 'single' == $mode ) comment_text(); ?> 1870 <div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden"> 1871 <textarea class="comment" rows="3" cols="10"><?php echo $comment->comment_content; ?></textarea> 1872 <div class="author-email"><?php echo attribute_escape( $comment->comment_author_email ); ?></div> 1873 <div class="author"><?php echo attribute_escape( $comment->comment_author ); ?></div> 1874 <div class="author-url"><?php echo attribute_escape( $comment->comment_author_url ); ?></div> 1875 <div class="comment_status"><?php echo $comment->comment_approved; ?></div> 1876 </div> 1877 1878 <?php 1879 // TODO: I don't think checkboxes really matter anymore 1880 // if ( $checkbox && current_user_can( 'edit_post', $comment->comment_post_ID ) ) 1881 // echo "<input type='checkbox' name='delete_comments[]' value='$comment->comment_ID' />"; 1882 ?> 1883 1884 <?php 1885 $actions = array(); 1886 1887 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 1888 $actions['approve'] = "<span class='comment-action-link'><a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a></span>'; 1889 $actions['unapprove'] = "<span class='comment-action-link'><a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a></span>'; 1890 if ( $comment_status ) { // not looking at all comments 1891 if ( 'approved' == $the_comment_status ) { 1892 $actions['unapprove'] = "<span class='comment-action-link'><a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment vim-u vim-destructive' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a></span>'; 1893 unset($actions['approve']); 1894 } else { 1895 $actions['approve'] = "<span class='comment-action-link'><a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment vim-a vim-destructive' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a></span>'; 1896 unset($actions['unapprove']); 1961 1897 } 1962 1898 } 1963 echo "</tr>\n"; 1899 if ( 'spam' != $the_comment_status ) 1900 $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>'; 1901 $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>'; 1902 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>'; 1903 $actions['quickedit'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',\'edit\');return false;" class="vim-q" title="'.__('Quick Edit').'" href="#">' . __('Quick Edit') . '</a>'; 1904 if ( 'spam' != $the_comment_status ) 1905 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\');return false;" class="vim-r" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; 1906 1907 $actions = apply_filters( 'comment_row_actions', $actions, $comment ); 1908 1909 $i = 0; 1910 foreach ( $actions as $action => $link ) { 1911 ++$i; 1912 ( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' <span class="sepa">|</span> '; 1913 1914 // Reply and quickedit need a hide-if-no-js span 1915 if ( 'reply' == $action || 'quickedit' == $action ) 1916 $action .= ' hide-if-no-js'; 1917 1918 echo "<span class='$action'>$sep$link</span>"; 1919 } 1920 } 1921 ?> 1922 <span class="sepa">—</span> <?php echo get_comment_date( __('Y/m/d \a\t g:ia') ); ?> <span class="sepa">|</span> <a href="<?php echo get_permalink( $post->ID ); ?>" style="text-decoration: none;">¶</a> <?php echo $post_link; ?> 1923 </li> 1924 <?php 1964 1925 } 1965 1926 … … 1973 1934 * @param unknown_type $mode 1974 1935 */ 1975 function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', $table_row = true) {1936 function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', $table_row = false) { 1976 1937 global $current_user; 1977 1938 … … 1988 1949 <table style="display:none;"><tbody id="com-reply"><tr id="replyrow"><td colspan="6"> 1989 1950 <?php else : ?> 1990 < div id="com-reply" style="display:none;"><divid="replyrow">1951 <ul id="com-reply" style="display:none;"><li id="replyrow"> 1991 1952 <?php endif; ?> 1992 1953 <div id="replyhead" style="display:none;"><?php _e('Reply to Comment'); ?></div> … … 2036 1997 </td></tr></tbody></table> 2037 1998 <?php else : ?> 2038 </ div></div>1999 </li></ul> 2039 2000 <?php endif; ?> 2040 2001 </form> … … 2829 2790 <label class="hidden" for="find-posts-input"><?php _e( 'Search' ); ?></label> 2830 2791 <input type="text" id="find-posts-input" class="search-input" name="ps" value="" /> 2831 <input type="button" on click="findPosts.send();" value="<?php _e( 'Search' ); ?>" class="button" /><br />2792 <input type="button" onClick="findPosts.send();" value="<?php _e( 'Search' ); ?>" class="button" /><br /> 2832 2793 2833 2794 <input type="radio" name="find-posts-what" id="find-posts-posts" checked="checked" value="posts" /> … … 2839 2800 </div> 2840 2801 <div class="find-box-buttons"> 2841 <input type="button" class="button" on click="findPosts.close();" value="<?php _e('Close'); ?>" />2802 <input type="button" class="button" onClick="findPosts.close();" value="<?php _e('Close'); ?>" /> 2842 2803 <input id="find-posts-submit" type="submit" class="button" value="<?php _e('Select'); ?>" /> 2843 2804 </div> -
trunk/wp-admin/js/edit-comments.js
r9297 r9413 89 89 90 90 init : function() { 91 this.rows = $('#the-comment-list tr'); 92 if ( !this.rows.size() ) 93 this.rows = $('#the-comment-list > div.comment-item'); 91 this.rows = $('#the-comment-list li'); 94 92 var row = $('#replyrow'); 95 93 … … 150 148 t.o = '#comment-'+id; 151 149 152 $('#replyrow td').attr('colspan', $('.widefat thead th:visible').length);150 // $('#replyrow td').attr('colspan', $('.widefat thead th:visible').length); 153 151 var editRow = $('#replyrow'), rowData = $('#inline-'+id); 154 152 var act = t.act = (a == 'edit') ? 'edit-comment' : 'replyto-comment'; -
trunk/wp-admin/js/post.js
r9402 r9413 288 288 function(r) { 289 289 var r = wpAjax.parseAjaxResponse(r); 290 $('#commentstatusdiv . widefat').show();290 $('#commentstatusdiv .comments-box').show(); 291 291 $('.waiting').hide(); 292 292 … … 309 309 } 310 310 311 $('#the-comment-list').append('< tr><td colspan="5">'+wpAjax.broken+'</td></tr>');311 $('#the-comment-list').append('<li>'+wpAjax.broken+'</li>'); 312 312 } 313 313 ); -
trunk/wp-admin/upload.php
r9363 r9413 416 416 <br class="clear" /> 417 417 418 <table class="widefat" style="margin-top: .5em"> 419 <thead> 420 <tr> 421 <th scope="col"><?php _e('Comment') ?></th> 422 <th scope="col"><?php _e('Date') ?></th> 423 <th scope="col"><?php _e('Actions') ?></th> 424 </tr> 425 </thead> 426 <tbody id="the-comment-list" class="list:comment"> 418 <ol id="the-comment-list" class="list:comment"> 427 419 <?php 428 420 foreach ($comments as $comment) 429 421 _wp_comment_row( $comment->comment_ID, 'detail', false, false ); 430 422 ?> 431 </ tbody>432 </table> 423 </ol> 424 433 425 434 426 <?php -
trunk/wp-admin/wp-admin.css
r9411 r9413 1926 1926 } 1927 1927 1928 #the-comment-list td.comment p.comment-author { 1929 margin-top: 0; 1930 margin-left: 0; 1928 #the-comment-list { 1929 list-style: none; 1930 margin: 0; 1931 padding: 0; 1932 font-size: 11px; 1933 } 1934 1935 #the-comment-list .sepa { 1936 color: #999; 1937 } 1938 1939 #the-comment-list .comment-action-link { 1940 width: 6em; 1941 display: inline-block; 1942 } 1943 1944 #the-comment-list p.comment-author { 1945 height: 2.8em; 1946 } 1947 1948 #the-comment-list li.comment-list-item { 1949 padding: 0 1.2em 1em; 1950 border-bottom: 1px solid #ccc; 1931 1951 } 1932 1952 … … 1938 1958 #the-comment-list p.comment-author strong a { 1939 1959 border: none; 1940 }1941 1942 #the-comment-list td {1943 vertical-align: top;1944 }1945 1946 #the-comment-list td.comment {1947 /*1948 width: 65%;1949 max-width: 460px;1950 */1951 word-wrap: break-word;1952 }1953 1954 #the-comment-list .check-column {1955 padding-top: 8px;1956 1960 } 1957 1961 … … 2246 2250 /* reply to comments */ 2247 2251 #replyrow { 2252 border-width: 1px; 2253 border-style: solid; 2248 2254 font-size: 11px; 2255 margin: 0 0 12px; 2249 2256 } 2250 2257 … … 2906 2913 font-style: italic; 2907 2914 } 2915 2916 .comments-box { 2917 margin: 12px 0 5px; 2918 } 2919 2920
Note: See TracChangeset
for help on using the changeset viewer.