Make WordPress Core

Ticket #6181: 6181.diff

File 6181.diff, 24.5 KB (added by mdawaffe, 17 years ago)
  • wp-includes/js/wp-lists.js

     
    7070                s.nonce = wpList.nonce(e,s);
    7171
    7272                var es = $('#' + s.element + ' :input').not('[name=_ajax_nonce], [name=_wpnonce], [name=action]');
    73                 var required = $('#' + s.element + ' .form-required:has(:input[value=""]), #' + s.element + ' .form-required:input[value=""]');
    74                 if ( required.size() ) {
    75                         wpAjax.invalidateForm( required );
    76                         return false;
    77                 }
     73                var valid = wpAjax.validateForm( '#' + s.element );
     74                if ( !valid ) { return false; }
    7875
    7976                s.data = $.param( $.extend( { _ajax_nonce: s.nonce, action: s.action }, wpAjax.unserialize( cls[4] || '' ) ) );
    8077                var formData = $.isFunction(es.fieldSerialize) ? es.fieldSerialize() : es.serialize();
  • wp-includes/js/wp-ajax-response.js

     
    5050                else if ( 0 === x ) { return !re.html('<div class="error"><p>' + this.broken  + '</p></div>'); }
    5151                return true;
    5252        },
    53         invalidateForm: function( jQ ) {
    54                 jQ.addClass( 'form-invalid' ).change( function() { jQuery(this).removeClass( 'form-invalid' ); } );
     53        validateForm: function( selector ) {
     54                selector = jQuery( selector );
     55                return !selector.find('.form-required').andSelf().filter('.form-required:has(:input[value=""]), .form-required:input[value=""]').addClass( 'form-invalid' ).change( function() { jQuery(this).removeClass( 'form-invalid' ); } ).size();
    5556        }
    5657}, wpAjax || { noPerm: 'You do not have permission to do that.', broken: 'AJAX is teh b0rked.' } );
  • wp-includes/link-template.php

     
    439439}
    440440
    441441function get_edit_post_link( $id = 0 ) {
    442         $post = &get_post( $id );
     442        if ( !$post = &get_post( $id ) )
     443                return;
    443444
    444         if ( $post->post_type == 'page' ) {
     445        switch ( $post->post_type ) :
     446        case 'page' :
    445447                if ( !current_user_can( 'edit_page', $post->ID ) )
    446448                        return;
    447 
    448449                $file = 'page';
    449         } else {
     450                $var  = 'post';
     451                break;
     452        case 'attachment' :
    450453                if ( !current_user_can( 'edit_post', $post->ID ) )
    451454                        return;
    452 
     455                $file = 'media';
     456                $var  = 'attachment_id';
     457                break;
     458        default :
     459                if ( !current_user_can( 'edit_post', $post->ID ) )
     460                        return;
    453461                $file = 'post';
    454         }
    455 
    456         return apply_filters( 'get_edit_post_link', get_bloginfo( 'wpurl' ) . '/wp-admin/' . $file . '.php?action=edit&amp;post=' . $post->ID, $post->ID );
     462                $var  = 'post';
     463                break;
     464        endswitch;
     465       
     466        return apply_filters( 'get_edit_post_link', get_bloginfo( 'wpurl' ) . "/wp-admin/$file.php?action=edit&amp;$var=$post->ID", $post->ID );
    457467}
    458468
    459469function edit_post_link( $link = 'Edit This', $before = '', $after = '' ) {
     
    462472        if ( $post->post_type == 'page' ) {
    463473                if ( !current_user_can( 'edit_page', $post->ID ) )
    464474                        return;
    465 
    466                 $file = 'page';
    467475        } else {
    468476                if ( !current_user_can( 'edit_post', $post->ID ) )
    469477                        return;
    470 
    471                 $file = 'post';
    472478        }
    473479
    474480        $link = '<a href="' . get_edit_post_link( $post->ID ) . '" title="' . __( 'Edit post' ) . '">' . $link . '</a>';
  • wp-includes/script-loader.php

     
    4141
    4242                $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');
    4343
    44                 $this->add( 'wp-ajax-response', '/wp-includes/js/wp-ajax-response.js', array('jquery'), '20080229' . mt_rand() );
     44                $this->add( 'wp-ajax-response', '/wp-includes/js/wp-ajax-response.js', array('jquery'), '20080312' );
    4545                $this->localize( 'wp-ajax-response', 'wpAjax', array(
    4646                        'noPerm' => 'You do not have permission to do that.',
    4747                        'broken' => 'AJAX is teh b0rked.'
    4848                ) );
    4949
    50                 $this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080221' . mt_rand());
     50                $this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080312' );
    5151
    5252                $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax.js', array('prototype'), '20070306');
    5353                $this->localize( 'wp-ajax', 'WPAjaxL10n', array(
     
    5757                        'whoaText' => __("Slow down, I'm still sending your data!")
    5858                ) );
    5959
    60                 $this->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('wp-ajax-response'), '20080228' . mt_rand());
     60                $this->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('wp-ajax-response'), '20080312' );
    6161                $this->localize( 'wp-lists', 'wpListL10n', array(
    6262                        'url' => get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php'
    6363                ) );
  • wp-admin/includes/media.php

     
    484484
    485485add_filter('attachment_fields_to_edit', 'image_attachment_fields_to_edit', 10, 2);
    486486
     487function media_single_attachment_fields_to_edit( $form_fields, $post ) {
     488        unset($form_fields['url'], $form_fields['align'], $form_fields['image-size']);
     489        return $form_fields;
     490}
     491
    487492function image_attachment_fields_to_save($post, $attachment) {
    488493        if ( substr($post['post_mime_type'], 0, 5) == 'image' ) {
    489494                if ( strlen(trim($post['post_title'])) == 0 ) {
     
    548553                        'label'      => __('Link URL'),
    549554                        'input'      => 'html',
    550555                        'html'       => "
    551                                 <input type='text' name='attachments[$post->ID][url]' value='" . attribute_escape($file) . "' />
     556                                <input type='text' name='attachments[$post->ID][url]' value='" . attribute_escape($file) . "' /><br />
    552557                                <button type='button' class='button url-$post->ID' value=''>" . __('None') . "</button>
    553558                                <button type='button' class='button url-$post->ID' value='" . attribute_escape($file) . "'>" . __('File URL') . "</button>
    554559                                <button type='button' class='button url-$post->ID' value='" . attribute_escape($link) . "'>" . __('Post URL') . "</button>
     
    604609                return '';
    605610
    606611        foreach ( $attachments as $id => $attachment )
    607                 if ( $item = get_media_item($id, isset($errors[$id]) ? $errors[$id] : null) )
     612                if ( $item = get_media_item( $id, array( 'errors' => isset($errors[$id]) ? $errors[$id] : null) ) )
    608613                        $output .= "\n<div id='media-item-$id' class='media-item child-of-$attachment->post_parent preloaded'><div id='media-upload-error-$id'></div><div class='filename'></div><div class='progress'><div class='bar'></div></div>$item<div class='progress clickmask'></div>\n</div>";
    609614
    610615        return $output;
    611616}
    612617
    613 function get_media_item( $attachment_id, $errors = null, $send = true, $delete = true ) {
     618function get_media_item( $attachment_id, $args = null ) {
     619        $default_args = array( 'errors' => null, 'send' => true, 'delete' => true, 'toggle' => true );
     620        $args = wp_parse_args( $args, $default_args );
     621        extract( $args, EXTR_SKIP );
     622
    614623        global $post_mime_types;
    615624        if ( ( $attachment_id = intval($attachment_id) ) && $thumb_url = get_attachment_icon_src( $attachment_id ) )
    616625                $thumb_url = $thumb_url[0];
     
    643652
    644653        $form_fields = get_attachment_fields_to_edit($post, $errors);
    645654
    646         $class = empty($errors) ? 'startclosed' : 'startopen';
     655        if ( $toggle ) {
     656                $class = empty($errors) ? 'startclosed' : 'startopen';
     657                $toggle_links = "
     658        <a class='toggle describe-toggle-on' href='#'>$toggle_on</a>
     659        <a class='toggle describe-toggle-off' href='#'>$toggle_off</a>";
     660        } else {
     661                $class = 'form-table';
     662                $toggle_links = '';
     663        }
     664
    647665        $item = "
    648666        $type
    649         <a class='toggle describe-toggle-on' href='#'>$toggle_on</a>
    650         <a class='toggle describe-toggle-off' href='#'>$toggle_off</a>
     667        $toggle_links
    651668        <div class='filename new'>$filename</div>
    652         <table class='slidetoggle describe $class'><tbody>
     669        <table class='slidetoggle describe $class'>
     670                <tbody class='media-item-info'>
    653671                <tr>
    654                         <td class='A1B1' rowspan='4' colspan='2'><img class='thumbnail' src='$thumb_url' alt='' /></td>
     672                        <td class='A1B1' rowspan='4'><img class='thumbnail' src='$thumb_url' alt='' /></td>
    655673                        <td>$filename</td>
    656674                </tr>
    657                 <tr><td>$post->post_mime_type</td></tr>
     675                <td>$post->post_mime_type</td></tr>
    658676                <tr><td>" . mysql2date($post->post_date, get_option('time_format')) . "</td></tr>
    659                 <tr><td>" . apply_filters('media_meta', '', $post) . "</tr></td>\n";
     677                <tr><td>" . apply_filters('media_meta', '', $post) . "</tr></td>
     678                </tbody>
     679                <tbody>\n";
    660680
    661681        $defaults = array(
    662682                'input'      => 'text',
     
    671691        if ( $delete )
    672692                $delete = "<a href='$delete_href' id='del[$attachment_id]' disabled='disabled' class='delete'>" . __('Delete') . "</button>";
    673693        if ( ( $send || $delete ) && !isset($form_fields['buttons']) )
    674                 $form_fields['buttons'] = array('tr' => "\t\t<tr class='submit'><td colspan='2'></td><td class='savesend'>$send $delete</td></tr>\n");
     694                $form_fields['buttons'] = array('tr' => "\t\t<tr class='submit'><td></td><td class='savesend'>$send $delete</td></tr>\n");
    675695
    676696        $hidden_fields = array();
    677697
     
    692712                        continue;
    693713                }
    694714
    695                 $required = $field['required'] ? '<abbr title="required">*</abbr>' : '';
    696                 $item .= "\t\t<tr class='$id'>\n\t\t\t<td class='label'><label for='$name'>{$field['label']}</label></td>\n\t\t\t<td class='required'>$required</td>\n\t\t\t<td class='field'>";
     715                $required = $field['required'] ? '<abbr title="required" class="required">*</abbr>' : '';
     716                $class  = $id;
     717                $class .= $field['required'] ? ' form-required' : '';
     718
     719                $item .= "\t\t<tr class='$class'>\n\t\t\t<th valign='top' scope='row' class='label'><label for='$name'><span class='alignleft'>{$field['label']}</span><span class='alignright'>$required</span><br class='clear' /></label></th>\n\t\t\t<td class='field'>";
    697720                if ( !empty($field[$field['input']]) )
    698721                        $item .= $field[$field['input']];
    699722                elseif ( $field['input'] == 'textarea' ) {
     
    701724                } else {
    702725                        $item .= "<input type='text' id='$name' name='$name' value='" . wp_specialchars($field['value'], 1) . "' />";
    703726                }
     727                if ( !empty($field['helps']) )
     728                        $item .= "<p class='help'>" . join( "</p>\n<p class='help'>", array_unique((array) $field['helps']) ) . '</p>';
    704729                $item .= "</td>\n\t\t</tr>\n";
    705730
    706731                $extra_rows = array();
     
    709734                        foreach ( array_unique((array) $field['errors']) as $error )
    710735                                $extra_rows['error'][] = $error;
    711736
    712                 if ( !empty($field['helps']) )
    713                         foreach ( array_unique((array) $field['helps']) as $help )
    714                                 $extra_rows['help'][] = $help;
    715 
    716737                if ( !empty($field['extra_rows']) )
    717738                        foreach ( $field['extra_rows'] as $class => $rows )
    718739                                foreach ( (array) $rows as $html )
     
    720741
    721742                foreach ( $extra_rows as $class => $rows )
    722743                        foreach ( $rows as $html )
    723                                 $item .= "\t\t<tr><td colspan='2'></td><td class='$class'>$html</td></tr>\n";
     744                                $item .= "\t\t<tr><td></td><td class='$class'>$html</td></tr>\n";
    724745        }
    725746
    726747        if ( !empty($form_fields['_final']) )
    727                 $item .= "\t\t<tr class='final'><td colspan='3'>{$form_fields['_final']}</td></tr>\n";
     748                $item .= "\t\t<tr class='final'><td colspan='2'>{$form_fields['_final']}</td></tr>\n";
    728749        $item .= "\t</table>\n";
    729750
    730751        foreach ( $hidden_fields as $name => $value )
     
    10371058        return '
    10381059        <table class="describe"><tbody>
    10391060                <tr>
    1040                         <td class="label"><label for="insertonly[src]">' . __('Image URL') . '</label></td>
    1041                         <td class="required"><abbr title="required">*</abbr></td>
     1061                        <th valign="top" scope="row" class="label">
     1062                                <span class="alignleft"><label for="insertonly[src]">' . __('Image URL') . '</label></span>
     1063                                <span class="alignright"><abbr title="required" class="required">*</abbr></span>
     1064                        </th>
    10421065                        <td class="field"><input id="insertonly[src]" name="insertonly[src]" value="" type="text"></td>
    10431066                </tr>
    10441067                <tr>
    1045                         <td class="label"><label for="insertonly[alt]">' . __('Description') . '</label></td>
    1046                         <td class="required"><abbr title="required">*</abbr></td>
     1068                        <th valign="top" scope="row" class="label">
     1069                                <span class="alignleft"><label for="insertonly[alt]">' . __('Description') . '</label></span>
     1070                                <span class="alignright"><abbr title="required">*</abbr></span>
     1071                        </th>
    10471072                        <td class="field"><input id="insertonly[alt]" name="insertonly[alt]" value="" type="text"></td>
    10481073                </tr>
    1049                 <tr><td colspan="2"></td><td class="help">' . __('Alternate text, e.g. "The Mona Lisa"') . '</td></tr>
     1074                <tr><td></td><td class="help">' . __('Alternate text, e.g. "The Mona Lisa"') . '</td></tr>
    10501075                <tr class="align">
    1051                         <td class="label"><label for="insertonly[align]">' . __('Alignment') . '</label></td>
    1052                         <td class="required"></td>
     1076                        <th valign="top" scope="row" class="label"><label for="insertonly[align]">' . __('Alignment') . '</label></th>
    10531077                        <td class="field">
    10541078                                <input name="insertonly[align]" id="image-align-none-0" value="none" type="radio">
    10551079                                <label for="image-align-none-0" class="align image-align-none-label">' . __('None') . '</label>
     
    10621086                        </td>
    10631087                </tr>
    10641088                <tr>
    1065                         <td colspan="2"></td>
     1089                        <td></td>
    10661090                        <td>
    10671091                                <input type="submit" class="button" name="insertonlybutton" value="' . attribute_escape(__('Insert into Post')) . '" />
    10681092                        </td>
     
    10751099        return '
    10761100        <table class="describe"><tbody>
    10771101                <tr>
    1078                         <td class="label"><label for="insertonly[href]">' . __('Audio File URL') . '</label></td>
    1079                         <td class="required"><abbr title="required">*</abbr></td>
     1102                        <th valign="top" scope="row" class="label">
     1103                                <span class="alignleft"><label for="insertonly[href]">' . __('Audio File URL') . '</label></span>
     1104                                <span class="alignright"><abbr title="required" class="required">*</abbr></span>
     1105                        </th>
    10801106                        <td class="field"><input id="insertonly[href]" name="insertonly[href]" value="" type="text"></td>
    10811107                </tr>
    10821108                <tr>
    1083                         <td class="label"><label for="insertonly[title]">' . __('Title') . '</label></td>
    1084                         <td class="required"><abbr title="required">*</abbr></td>
     1109                        <th valign="top" scope="row" class="label">
     1110                                <span class="alignleft"><label for="insertonly[title]">' . __('Title') . '</label></span>
     1111                                <span class="alignright"><abbr title="required" class="required">*</abbr></span>
     1112                        </th>
    10851113                        <td class="field"><input id="insertonly[title]" name="insertonly[title]" value="" type="text"></td>
    10861114                </tr>
    1087                 <tr><td colspan="2"></td><td class="help">' . __('Link text, e.g. "Still Alive by Jonathan Coulton"') . '</td></tr>
     1115                <tr><td></td><td class="help">' . __('Link text, e.g. "Still Alive by Jonathan Coulton"') . '</td></tr>
    10881116                <tr>
    1089                         <td colspan="2"></td>
     1117                        <td></td>
    10901118                        <td>
    10911119                                <input type="submit" class="button" name="insertonlybutton" value="' . attribute_escape(__('Insert into Post')) . '" />
    10921120                        </td>
     
    10991127        return '
    11001128        <table class="describe"><tbody>
    11011129                <tr>
    1102                         <td class="label"><label for="insertonly[href]">' . __('Video URL') . '</label></td>
    1103                         <td class="required"><abbr title="required">*</abbr></td>
     1130                        <th valign="top" scope="row" class="label">
     1131                                <span class="alignleft"><label for="insertonly[href]">' . __('Video URL') . '</label></span>
     1132                                <span class="alignright"><abbr title="required" class="required">*</abbr></span>
     1133                        </th>
    11041134                        <td class="field"><input id="insertonly[href]" name="insertonly[href]" value="" type="text"></td>
    11051135                </tr>
    11061136                <tr>
    1107                         <td class="label"><label for="insertonly[title]">' . __('Title') . '</label></td>
    1108                         <td class="required"><abbr title="required">*</abbr></td>
     1137                        <th valign="top" scope="row" class="label">
     1138                                <span class="alignleft"><label for="insertonly[title]">' . __('Title') . '</label></span>
     1139                                <span class="alignright"><abbr title="required" class="required">*</abbr></span>
     1140                        </th>
    11091141                        <td class="field"><input id="insertonly[title]" name="insertonly[title]" value="" type="text"></td>
    11101142                </tr>
    1111                 <tr><td colspan="2"></td><td class="help">' . __('Link text, e.g. "Lucy on YouTube"') . '</td></tr>
     1143                <tr><td></td><td class="help">' . __('Link text, e.g. "Lucy on YouTube"') . '</td></tr>
    11121144                <tr>
    1113                         <td colspan="2"></td>
     1145                        <td></td>
    11141146                        <td>
    11151147                                <input type="submit" class="button" name="insertonlybutton" value="' . attribute_escape(__('Insert into Post')) . '" />
    11161148                        </td>
     
    11231155        return '
    11241156        <table class="describe"><tbody>
    11251157                <tr>
    1126                         <td class="label"><label for="insertonly[href]">' . __('URL') . '</label></td>
    1127                         <td class="required"><abbr title="required">*</abbr></td>
     1158                        <th valign="top" scope="row" class="label">
     1159                                <span class="alignleft"><label for="insertonly[href]">' . __('URL') . '</label></span>
     1160                                <span class="alignright"><abbr title="required" class="required">*</abbr></span>
     1161                        </th>
    11281162                        <td class="field"><input id="insertonly[href]" name="insertonly[href]" value="" type="text"></td>
    11291163                </tr>
    11301164                <tr>
    1131                         <td class="label"><label for="insertonly[title]">' . __('Title') . '</label></td>
    1132                         <td class="required"><abbr title="required">*</abbr></td>
     1165                        <th valign="top" scope="row" class="label">
     1166                                <span class="alignleft"><label for="insertonly[title]">' . __('Title') . '</label></span>
     1167                                <span class="alignright"><abbr title="required" class="required">*</abbr></span>
     1168                        </th>
    11331169                        <td class="field"><input id="insertonly[title]" name="insertonly[title]" value="" type="text"></td>
    11341170                </tr>
    1135                 <tr><td colspan="2"></td><td class="help">' . __('Link text, e.g. "Ransom Demands (PDF)"') . '</td></tr>
     1171                <tr><td></td><td class="help">' . __('Link text, e.g. "Ransom Demands (PDF)"') . '</td></tr>
    11361172                <tr>
    1137                         <td colspan="2"></td>
     1173                        <td></td>
    11381174                        <td>
    11391175                                <input type="submit" class="button" name="insertonlybutton" value="' . attribute_escape(__('Insert into Post')) . '" />
    11401176                        </td>
  • wp-admin/js/common.js

     
    44
    55        // Reveal
    66        jQuery('.wp-no-js-hidden').removeClass( 'wp-no-js-hidden' );
     7
     8        // Basic form validation
     9        if ( ( 'undefined' != typeof wpAjax ) && jQuery.isFunction( wpAjax.validateForm ) ) {
     10                jQuery('form').submit( function() { return wpAjax.validateForm( jQuery(this) ); } );
     11        }
    712});
  • wp-admin/edit-attachment-rows.php

     
    4646
    4747        case 'media':
    4848                ?>
    49                 <td><strong><!-- TODO <a href="upload.php?action=edit&amp;post=<?php the_ID(); ?>"> --><?php the_title(); ?><!-- </a> --></strong><br />
     49                <td><strong><a href="media.php?action=edit&amp;attachment_id=<?php the_ID(); ?>"><?php the_title(); ?></a></strong><br />
    5050                <?php echo strtoupper(preg_replace('/^.*?\.(\w+)$/', '$1', get_attached_file($post->ID))); ?>
    5151                <?php do_action('manage_media_media_column', $post->ID); ?>
    5252                </td>
  • wp-admin/media.php

     
     1<?php
     2
     3require_once('admin.php');
     4
     5$parent_file = 'edit.php';
     6$submenu_file = 'upload.php';
     7
     8wp_reset_vars(array('action'));
     9
     10switch( $action ) :
     11case 'upload' :
     12case 'delete' : break; // stubs
     13case 'editattachment' :
     14        $errors = media_upload_form_handler();
     15        if ( empty($errors) ) {
     16                wp_redirect( add_query_arg( 'message', 'updated' ) );
     17                exit;
     18                break;
     19        }
     20        // no break
     21case 'edit' :
     22        $title = __('Edit Media');
     23
     24        if ( empty($errors) )
     25                $errors = null;
     26
     27        if ( empty( $_GET['attachment_id'] ) ) {
     28                wp_redirect('upload.php');
     29                exit();
     30        }
     31        $att_id = (int) $_GET['attachment_id'];
     32        $att = get_post($att_id);
     33
     34        add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
     35
     36        wp_enqueue_script( 'wp-ajax-response' );
     37        add_action('admin_head', 'media_admin_css');
     38
     39        require( 'admin-header.php' );
     40
     41        $message = '';
     42        $class = '';
     43        if ( isset($_GET['message']) ) {
     44                switch ( $_GET['message'] ) :
     45                case 'updated' :
     46                        $message = __('Media attachment updated.');
     47                        $class = 'updated fade';
     48                        break;
     49                endswitch;
     50        }
     51        if ( $message )
     52                echo "<div id='message' class='$class'><p>$message</p></div>\n";
     53
     54?>
     55
     56<div class="wrap">
     57
     58<h2><?php _e( 'Edit Media' ); ?></h2>
     59
     60<form method="post" action="<?php echo clean_url( remove_query_arg( 'message' ) ); ?>" class="media-upload-form" id="media-single-form">
     61<div id="media-items" class="media-single">
     62<div id='media-item-<?php echo $att_id; ?>' class='media-item'>
     63<?php echo get_media_item( $att_id, array( 'toggle' => false, 'send' => false, 'delete' => false, 'errors' => $errors ) ); ?>
     64</div>
     65</div>
     66
     67<p class="submit">
     68<input type="submit" class="button" name="save" value="<?php _e('Save Changes'); ?>" />
     69<input type="hidden" name="post_id" id="post_id" value="<?php echo $post_id; ?>" />
     70<input type="hidden" name="action" value="editattachment" />
     71<?php wp_nonce_field('media-form'); ?>
     72</p>
     73
     74
     75</div>
     76
     77<?php
     78
     79        require( 'admin-footer.php' );
     80
     81        break;
     82endswitch;
     83
     84wp_redirect( 'upload.php' );
     85exit;
     86
     87?>
  • wp-admin/css/media.css

     
    3636        margin: 0 0 0.5em 0;
    3737}
    3838
     39th { position: relative; }
     40
    3941.media-upload-form label.form-help, td.help {
    4042        font-style: italic;
    4143        font-weight: normal;
    4244}
    4345
    44 .media-upload-form p {
    45         margin: 0 1em 1em 0;
     46.media-upload-form p.help {
     47        margin: 0;
     48        padding: 0;
    4649}
    4750
    4851.media-upload-form fieldset {
     
    5760.align .field label {
    5861        display: inline;
    5962        padding: 0 0 0 28px;
    60         margin: 0 0;
     63        margin: 0 1em 0 0;
    6164}
    62 .align .field input {
    63         margin-left: 15px;
    64 }
    65 
    6665.image-align-none-label {
    6766        background: url(../images/align-none.png) no-repeat center left;
    6867}
     
    8786        display: inline;
    8887        margin: 0 1em 0 0;
    8988}
    90 tr.image-size td.field {
    91         text-align: center;
    92 }
    9389.pinkynail {
    9490        max-width: 40px;
    9591        max-height: 40px;
    9692}
    9793
    98 #media-items {
    99         border-width: 1px;
    100         border-style: solid;
    101         border-bottom: none;
    102         width: 623px;
    103 }
    104 .media-item {
    105         border-bottom-width: 1px;
    106         border-bottom-style: solid;
    107         width: 623px;
    108         position: relative;
    109         min-height: 36px;
    110 }
    11194.filename {
    112         line-height: 36px;
    113         margin-left: 50px;
    114         z-index: 2;
     95        display: none;
    11596}
    11697button.dismiss {
    11798        position: absolute;
     
    148129        height: 32px;
    149130        max-width: 40px;
    150131}
    151 .describe {
    152         border-top-width: 1px;
    153         border-top-style: solid;
    154         padding: 5px;
    155         width: 100%;
    156         clear: both;
     132
     133tbody.media-item-info tr {
     134        background-color: transparent;
    157135}
     136tbody.media-item-info th, tbody.media-item-info td {
     137        border: none;
     138        margin: 0;
     139}
     140
     141.form-table tbody.media-item-info {
     142        border: 8px solid #fff;
     143}
     144
    158145.describe.startopen, .describe.startclosed {
    159146        display: none;
    160147}
    161 .required abbr {
     148abbr.required {
    162149        text-decoration: none;
    163150        border: none;
    164151}
    165 
    166152.describe label {
    167153        display: inline;
    168154}
     
    196182        z-index: 3;
    197183        height: 36px;
    198184}
    199 tr.align td.field {
    200         text-align: center;
    201 }
    202185
    203186.hidden {
    204187        height: 0px;
    205188        width: 0px;
    206189        overflow: hidden;
    207190        border: none;
     191}
     192
     193/* Specific to Uploader */
     194
     195#media-upload .media-upload-form p {
     196        margin: 0 1em 1em 0;
     197}
     198#media-upload p.help {
     199        font-style: italic;
     200        font-weight: normal;
     201}
     202#media-upload tr.image-size td.field {
     203        text-align: center;
     204}
     205#media-upload #media-items {
     206        border-width: 1px;
     207        border-style: solid;
     208        border-bottom: none;
     209        width: 623px;
     210}
     211
     212#media-upload .media-item {
     213        border-bottom-width: 1px;
     214        border-bottom-style: solid;
     215        width: 623px;
     216        position: relative;
     217        min-height: 36px;
     218}
     219#media-upload .filename {
     220        display: block;
     221        line-height: 36px;
     222        margin-left: 50px;
     223        z-index: 2;
     224}
     225#media-upload .describe {
     226        border-top-width: 1px;
     227        border-top-style: solid;
     228        padding: 5px;
     229        width: 100%;
     230        clear: both;
     231}
     232#media-upload .describe th.label {
     233        padding-top: .5em;
     234        text-align: left;
     235}
     236#media-upload tr.align td.field {
     237        text-align: center;
    208238}
     239 No newline at end of file
  • wp-admin/css/colors-classic.css

     
    533533        color: #cfebf6;
    534534}
    535535
    536 div#media-upload-error, .file-error, .required abbr, .widget-control-remove:hover, .delete:hover {
     536div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover, .delete:hover {
    537537        color: #f00;
    538538}
    539539
  • wp-admin/css/colors-fresh.css

     
    510510        color: #555;
    511511}
    512512
    513 div#media-upload-error, .file-error, .required abbr, .widget-control-remove:hover, .delete:hover {
     513div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover, .delete:hover {
    514514        color: #f00;
    515515}
    516516