WordPress.org

Make WordPress Core

Changeset 12500


Ignore:
Timestamp:
12/23/2009 09:15:13 AM (11 years ago)
Author:
westi
Message:

Improve the revision comparison user interface to hilight that we compare "old on left" to "new on right". Includes some js to hide the radio buttons to stop you selecting reverse comparisions.
Fixes #11088 props filosofo.

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/revision.php

    r11380 r12500  
    99/** WordPress Administration Bootstrap */
    1010require_once('admin.php');
     11
     12wp_enqueue_script('list-revisions');
    1113
    1214wp_reset_vars(array('revision', 'left', 'right', 'diff', 'action'));
  • trunk/wp-includes/post-template.php

    r12327 r12500  
    13001300
    13011301            $rows .= "<tr$class>\n";
    1302             $rows .= "\t<th style='white-space: nowrap' scope='row'><input type='radio' name='left' value='$revision->ID'$left_checked /><input type='radio' name='right' value='$revision->ID'$right_checked /></th>\n";
     1302            $rows .= "\t<th style='white-space: nowrap' scope='row'><input type='radio' name='left' value='$revision->ID'$left_checked />\n";
     1303            $rows .= "\t<th style='white-space: nowrap' scope='row'><input type='radio' name='right' value='$revision->ID'$right_checked /></th>\n";
    13031304            $rows .= "\t<td>$date</td>\n";
    13041305            $rows .= "\t<td>$name</td>\n";
     
    13241325<br class="clear" />
    13251326
    1326 <table class="widefat post-revisions" cellspacing="0">
     1327<table class="widefat post-revisions" cellspacing="0" id="post-revisions">
     1328    <col />
    13271329    <col />
    13281330    <col style="width: 33%" />
     
    13311333<thead>
    13321334<tr>
    1333     <th scope="col"></th>
     1335    <th scope="col"><?php _e( 'Old' ); ?></th>
     1336    <th scope="col"><?php _e( 'New' ); ?></th>
    13341337    <th scope="col"><?php _e( 'Date Created' ); ?></th>
    13351338    <th scope="col"><?php _e( 'Author' ); ?></th>
  • trunk/wp-includes/script-loader.php

    r12496 r12500  
    374374        $scripts->add_data( 'hoverIntent', 'group', 1 );
    375375
     376        $scripts->add( 'list-revisions', "/wp-includes/js/wp-list-revisions$suffix.js", null, '20091223' );
     377
    376378        $scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery-ui-draggable' ), '20090415' );
    377379        $scripts->add_data( 'media', 'group', 1 );
Note: See TracChangeset for help on using the changeset viewer.