Ticket #26060: 26060.2.diff
File 26060.2.diff, 16.6 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/common.css
627 627 color: #000; 628 628 } 629 629 630 . alternate,631 .alt {630 .striped > tbody > :nth-child(odd), 631 .alternate { 632 632 background-color: #f9f9f9; 633 633 } 634 634 -
src/wp-admin/css/dashboard.css
694 694 margin-left: 12px; 695 695 } 696 696 697 #activity-widget #the-comment-list .alternate,698 #activity-widget #the-comment-list .alt {699 background: none;700 }701 702 697 #activity-widget #the-comment-list .comment-item { 703 698 background: #fafafa; 704 699 padding: 12px; -
src/wp-admin/css/list-tables.css
1433 1433 1434 1434 /* ms */ 1435 1435 /* Background Color for Site Status */ 1436 .wp-list-table .site-deleted {1436 .wp-list-table tr.site-deleted { 1437 1437 background: #ff8573; 1438 1438 } 1439 .wp-list-table .site-spammed {1439 .wp-list-table tr.site-spammed { 1440 1440 background: #faafaa; 1441 1441 } 1442 .wp-list-table .site-archived {1442 .wp-list-table tr.site-archived { 1443 1443 background: #ffebe8; 1444 1444 } 1445 .wp-list-table .site-mature {1445 .wp-list-table tr.site-mature { 1446 1446 background: #fecac2; 1447 1447 } 1448 1448 -
src/wp-admin/import.php
76 76 } else { 77 77 uasort( $importers, '_usort_by_first_member' ); 78 78 ?> 79 <table class="widefat importers ">79 <table class="widefat importers striped"> 80 80 81 81 <?php 82 $alt = '';83 82 foreach ($importers as $importer_id => $data) { 84 83 $action = ''; 85 84 if ( isset( $data['install'] ) ) { … … 108 107 $action = "<a href='" . esc_url( "admin.php?import=$importer_id" ) . "' title='" . esc_attr( wptexturize( strip_tags( $data[1] ) ) ) ."'>{$data[0]}</a>"; 109 108 } 110 109 111 $alt = $alt ? '' : ' class="alternate"';112 110 echo " 113 <tr $alt>111 <tr> 114 112 <td class='import-system row-title'>$action</td> 115 113 <td class='desc'>{$data[1]}</td> 116 114 </tr>"; -
src/wp-admin/includes/class-wp-links-list-table.php
111 111 public function display_rows() { 112 112 global $cat_id; 113 113 114 $alt = 0;115 116 114 foreach ( $this->items as $link ) { 117 115 $link = sanitize_bookmark( $link ); 118 116 $link->link_name = esc_attr( $link->link_name ); … … 122 120 123 121 $visible = ( $link->link_visible == 'Y' ) ? __( 'Yes' ) : __( 'No' ); 124 122 $rating = $link->link_rating; 125 $style = ( $alt++ % 2 ) ? '' : ' class="alternate"';126 123 127 124 $edit_link = get_edit_bookmark_link( $link ); 128 125 ?> 129 <tr id="link-<?php echo $link->link_id; ?>" <?php echo $style; ?>>126 <tr id="link-<?php echo $link->link_id; ?>"> 130 127 <?php 131 128 132 129 list( $columns, $hidden ) = $this->get_column_info(); -
src/wp-admin/includes/class-wp-list-table.php
953 953 * @return array List of CSS classes for the table tag. 954 954 */ 955 955 protected function get_table_classes() { 956 return array( 'widefat', 'fixed', $this->_args['plural'] );956 return array( 'widefat', 'fixed', 'striped', $this->_args['plural'] ); 957 957 } 958 958 959 959 /** … … 1028 1028 * @param object $item The current item 1029 1029 */ 1030 1030 public function single_row( $item ) { 1031 static $row_class = ''; 1032 $row_class = ( $row_class == '' ? ' class="alternate"' : '' ); 1033 1034 echo '<tr' . $row_class . '>'; 1031 echo '<tr>'; 1035 1032 $this->single_row_columns( $item ); 1036 1033 echo '</tr>'; 1037 1034 } -
src/wp-admin/includes/class-wp-media-list-table.php
268 268 global $post; 269 269 270 270 add_filter( 'the_title','esc_html' ); 271 $alt = '';272 271 273 272 while ( have_posts() ) : the_post(); 274 273 $user_can_edit = current_user_can( 'edit_post', $post->ID ); … … 277 276 || !$this->is_trash && $post->post_status == 'trash' ) 278 277 continue; 279 278 280 $alt = ( 'alternate' == $alt ) ? '' : 'alternate';281 279 $post_owner = ( get_current_user_id() == $post->post_author ) ? 'self' : 'other'; 282 280 $att_title = _draft_or_post_title(); 283 281 ?> 284 <tr id="post-<?php echo $post->ID; ?>" class="<?php echo trim( $alt .' author-' . $post_owner . ' status-' . $post->post_status ); ?>">282 <tr id="post-<?php echo $post->ID; ?>" class="<?php echo trim( ' author-' . $post_owner . ' status-' . $post->post_status ); ?>"> 285 283 <?php 286 284 287 285 list( $columns, $hidden ) = $this->get_column_info(); -
src/wp-admin/includes/class-wp-ms-sites-list-table.php
208 208 $date = 'Y/m/d \<\b\r \/\> g:i:s a'; 209 209 } 210 210 211 $class = '';212 211 foreach ( $this->items as $blog ) { 213 $class = ( 'alternate' == $class ) ? '' : 'alternate';212 $class = ''; 214 213 reset( $status_list ); 215 214 216 215 $blog_states = array(); 217 216 foreach ( $status_list as $status => $col ) { 218 217 if ( get_blog_status( $blog['blog_id'], $status ) == 1 ) { 219 $class = $col[0];218 $class = " class='{$col[0]}'"; 220 219 $blog_states[] = $col[1]; 221 220 } 222 221 } … … 231 230 $blog_state .= "<span class='post-state'>$state$sep</span>"; 232 231 } 233 232 } 234 echo "<tr class='$class'>";233 echo "<tr{$class}>"; 235 234 236 235 $blogname = ( is_subdomain_install() ) ? str_replace( '.' . get_current_site()->domain, '', $blog['domain'] ) : $blog['path']; 237 236 -
src/wp-admin/includes/class-wp-ms-users-list-table.php
149 149 public function display_rows() { 150 150 global $mode; 151 151 152 $alt = '';153 152 $super_admins = get_super_admins(); 154 153 foreach ( $this->items as $user ) { 155 $ alt = ( 'alternate' == $alt ) ? '' : 'alternate';154 $class = ''; 156 155 157 156 $status_list = array( 'spam' => 'site-spammed', 'deleted' => 'site-deleted' ); 158 157 159 158 foreach ( $status_list as $status => $col ) { 160 159 if ( $user->$status ) 161 $ alt.= " $col";160 $class .= " $col"; 162 161 } 163 162 164 163 ?> 165 <tr class="<?php echo $alt; ?>">164 <tr class="<?php echo trim( $class ); ?>"> 166 165 <?php 167 166 168 167 list( $columns, $hidden ) = $this->get_column_info(); -
src/wp-admin/includes/class-wp-posts-list-table.php
288 288 } 289 289 290 290 protected function get_table_classes() { 291 return array( 'widefat', 'fixed', is_post_type_hierarchical( $this->screen->post_type ) ? 'pages' : 'posts' );291 return array( 'widefat', 'fixed', 'striped', is_post_type_hierarchical( $this->screen->post_type ) ? 'pages' : 'posts' ); 292 292 } 293 293 294 294 public function get_columns() { … … 572 572 573 573 /** 574 574 * @global string $mode 575 * @staticvar string $alternate576 575 * @param WP_Post $post 577 576 * @param int $level 578 577 */ 579 578 public function single_row( $post, $level = 0 ) { 580 579 global $mode; 581 static $alternate;582 580 583 581 $global_post = get_post(); 584 582 $GLOBALS['post'] = $post; … … 589 587 $post_type_object = get_post_type_object( $post->post_type ); 590 588 $can_edit_post = current_user_can( 'edit_post', $post->ID ); 591 589 592 $alternate = 'alternate' == $alternate ? '' : 'alternate'; 593 $classes = $alternate . ' iedit author-' . ( get_current_user_id() == $post->post_author ? 'self' : 'other' ); 590 $classes = 'iedit author-' . ( get_current_user_id() == $post->post_author ? 'self' : 'other' ); 594 591 595 592 $lock_holder = wp_check_post_lock( $post->ID ); 596 593 if ( $lock_holder ) { -
src/wp-admin/includes/class-wp-terms-list-table.php
268 268 269 269 /** 270 270 * @global string $taxonomy 271 * @staticvar string $row_class272 271 * @param object $tag 273 272 * @param int $level 274 273 */ … … 276 275 global $taxonomy; 277 276 $tag = sanitize_term( $tag, $taxonomy ); 278 277 279 static $row_class = '';280 $row_class = ( $row_class == '' ? ' class="alternate"' : '' );281 282 278 $this->level = $level; 283 279 284 echo '<tr id="tag-' . $tag->term_id . '" ' . $row_class . '>';280 echo '<tr id="tag-' . $tag->term_id . '">'; 285 281 $this->single_row_columns( $tag ); 286 282 echo '</tr>'; 287 283 } -
src/wp-admin/includes/class-wp-users-list-table.php
306 306 307 307 $editable_roles = array_keys( get_editable_roles() ); 308 308 309 $style = '';310 309 foreach ( $this->items as $userid => $user_object ) { 311 310 if ( count( $user_object->roles ) <= 1 ) { 312 311 $role = reset( $user_object->roles ); … … 319 318 if ( is_multisite() && empty( $user_object->allcaps ) ) 320 319 continue; 321 320 322 $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"'; 323 echo "\n\t" . $this->single_row( $user_object, $style, $role, isset( $post_counts ) ? $post_counts[ $userid ] : 0 ); 321 echo "\n\t" . $this->single_row( $user_object, $style = '', $role, isset( $post_counts ) ? $post_counts[ $userid ] : 0 ); 324 322 } 325 323 } 326 324 … … 328 326 * Generate HTML for a single row on the users.php admin panel. 329 327 * 330 328 * @since 3.1.0 329 * @since 4.2.0 `$style` argument was deprecated. 331 330 * @access public 332 331 * 333 332 * @param object $user_object The current user object. 334 * @param string $style Optional. Style attributes added to the `<tr>` element. 335 * Must be sanitized. Default empty. 333 * @param string $style Deprecated. Not used. 336 334 * @param string $role Optional. Key for the $wp_roles array. Default empty. 337 335 * @param int $numposts Optional. Post count to display for this user. Defaults 338 336 * to zero, as in, a new user has made zero posts. … … 395 393 $role_name = isset( $wp_roles->role_names[$role] ) ? translate_user_role( $wp_roles->role_names[$role] ) : __( 'None' ); 396 394 $avatar = get_avatar( $user_object->ID, 32 ); 397 395 398 $r = "<tr id='user-$user_object->ID' $style>";396 $r = "<tr id='user-$user_object->ID'>"; 399 397 400 398 list( $columns, $hidden ) = $this->get_column_info(); 401 399 -
src/wp-admin/includes/template.php
589 589 590 590 $r = ''; 591 591 ++ $count; 592 if ( $count % 2 )593 $style = 'alternate';594 else595 $style = '';596 592 597 593 if ( is_serialized( $entry['meta_value'] ) ) { 598 594 if ( is_serialized_string( $entry['meta_value'] ) ) { … … 611 607 612 608 $delete_nonce = wp_create_nonce( 'delete-meta_' . $entry['meta_id'] ); 613 609 614 $r .= "\n\t<tr id='meta-{$entry['meta_id']}' class='$style'>";610 $r .= "\n\t<tr id='meta-{$entry['meta_id']}'>"; 615 611 $r .= "\n\t\t<td class='left'><label class='screen-reader-text' for='meta-{$entry['meta_id']}-key'>" . __( 'Key' ) . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta-{$entry['meta_id']}-key' type='text' size='20' value='{$entry['meta_key']}' />"; 616 612 617 613 $r .= "\n\t\t<div class='submit'>"; -
src/wp-admin/js/inline-edit-post.js
82 82 this.revert(); 83 83 84 84 $('#bulk-edit td').attr('colspan', $('.widefat:first thead th:visible').length); 85 $('table.widefat tbody').prepend( $('#bulk-edit') ); 85 // Insert the editor at the top of the table with an empty row above to maintain zebra striping. 86 $('table.widefat tbody').prepend( $('#bulk-edit') ).prepend('<tr class="hidden"></tr>'); 86 87 $('#bulk-edit').addClass('inline-editor').show(); 87 88 88 89 $( 'tbody th.check-column input[type="checkbox"]' ).each( function() { … … 128 129 fields.push('post_parent', 'page_template'); 129 130 } 130 131 131 // add the new blank row132 // add the new edit row with an extra blank row underneath to maintain zebra striping. 132 133 editRow = $('#inline-edit').clone(true); 133 134 $('td', editRow).attr('colspan', $('.widefat:first thead th:visible').length); 134 135 135 if ( $( t.what + id ).hasClass( 'alternate' ) ) { 136 $(editRow).addClass('alternate'); 137 } 138 $(t.what+id).hide().after(editRow); 136 $(t.what+id).hide().before(editRow).before('<tr class="hidden"></tr>'); 139 137 140 138 // populate the data 141 139 rowData = $('#inline_'+id); … … 265 263 266 264 if (r) { 267 265 if ( -1 !== r.indexOf( '<tr' ) ) { 268 $(inlineEditPost.what+id). remove();266 $(inlineEditPost.what+id).siblings('tr.hidden').addBack().remove(); 269 267 $('#edit-'+id).before(r).remove(); 270 268 $(inlineEditPost.what+id).hide().fadeIn(); 271 269 } else { … … 275 273 } else { 276 274 $('#edit-'+id+' .inline-edit-save .error').html(inlineEditL10n.error).show(); 277 275 } 278 279 if ( $('#post-'+id).prev().hasClass('alternate') ) {280 $('#post-'+id).removeClass('alternate');281 }282 276 }, 283 277 'html'); 284 278 return false; … … 291 285 $('table.widefat .spinner').hide(); 292 286 293 287 if ( 'bulk-edit' === id ) { 294 $('table.widefat #bulk-edit').removeClass('inline-editor').hide() ;288 $('table.widefat #bulk-edit').removeClass('inline-editor').hide().siblings('tr.hidden').remove(); 295 289 $('#bulk-titles').html(''); 296 290 $('#inlineedit').append( $('#bulk-edit') ); 297 291 } else { 298 $('#'+id). remove();292 $('#'+id).siblings('tr.hidden').addBack().remove(); 299 293 id = id.substr( id.lastIndexOf('-') + 1 ); 300 294 $(this.what+id).show(); 301 295 } -
src/wp-admin/js/inline-edit-tax.js
56 56 editRow = $('#inline-edit').clone(true), rowData = $('#inline_'+id); 57 57 $('td', editRow).attr('colspan', $('.widefat:first thead th:visible').length); 58 58 59 if ( $( t.what + id ).hasClass( 'alternate' ) ) { 60 $(editRow).addClass('alternate'); 61 } 59 $(t.what+id).hide().before(editRow).before('<tr class="hidden"></tr>'); 62 60 63 $(t.what+id).hide().after(editRow);64 65 61 $(':input[name="name"]', editRow).val( $('.name', rowData).text() ); 66 62 $(':input[name="slug"]', editRow).val( $('.slug', rowData).text() ); 67 63 … … 98 94 99 95 if (r) { 100 96 if ( -1 !== r.indexOf( '<tr' ) ) { 101 $(inlineEditTax.what+id). remove();97 $(inlineEditTax.what+id).siblings('tr.hidden').addBack().remove(); 102 98 new_id = $(r).attr('id'); 103 99 104 100 $('#edit-'+id).before(r).remove(); … … 110 106 } else { 111 107 $('#edit-'+id+' .inline-edit-save .error').html(inlineEditL10n.error).show(); 112 108 } 113 114 if ( $( row ).prev( 'tr' ).hasClass( 'alternate' ) ) {115 $(row).removeClass('alternate');116 }117 109 } 118 110 ); 119 111 return false; … … 124 116 125 117 if ( id ) { 126 118 $('table.widefat .spinner').hide(); 127 $('#'+id). remove();119 $('#'+id).siblings('tr.hidden').addBack().remove(); 128 120 id = id.substr( id.lastIndexOf('-') + 1 ); 129 121 $(this.what+id).show(); 130 122 } -
src/wp-admin/my-sites.php
75 75 do_action( 'myblogs_allblogs_options' ); 76 76 ?> 77 77 <br clear="all" /> 78 <table class="widefat fixed ">78 <table class="widefat fixed striped"> 79 79 <?php 80 80 /** 81 81 * Enable the Global Settings section on the My Sites screen. … … 109 109 $split = $split + $cols; 110 110 } 111 111 112 $c = '';113 112 foreach ( $rows as $row ) { 114 $c = $c == 'alternate' ? '' : 'alternate'; 115 echo "<tr class='$c'>"; 113 echo "<tr>"; 116 114 $i = 0; 117 115 foreach ( $row as $user_blog ) { 118 116 $s = $i == 3 ? '' : 'border-right: 1px solid #ccc;';