WordPress.org

Make WordPress Core

Changeset 20346


Ignore:
Timestamp:
04/04/2012 02:45:30 AM (6 years ago)
Author:
azaozz
Message:

Make the layout of the tables on edit link screen "liquid" so they can be shown on the side, see #20015

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/wp-admin.dev.css

    r20335 r20346  
    222222input[type="checkbox"],
    223223input[type="radio"] {
    224     vertical-align: text-bottom;
     224    vertical-align: text-top;
     225    padding: 0;
     226    margin: 1px 0 0;
    225227}
    226228
     
    20312033}
    20322034
     2035.stuffbox h3 {
     2036    cursor: auto;
     2037}
     2038
    20332039.postbox .inside,
    20342040.stuffbox .inside {
     
    34283434}
    34293435
     3436/* links tables */
     3437table.links-table {
     3438    width: 100%;
     3439}
     3440
     3441.links-table th {
     3442    font-weight: normal;
     3443    text-align: left;
     3444    vertical-align: top;
     3445    min-width: 80px;
     3446    width: 20%;
     3447    word-wrap: break-word;
     3448}
     3449
     3450.links-table th,
     3451.links-table td {
     3452    padding: 5px 0;
     3453}
     3454
     3455.links-table td label {
     3456    margin-right: 8px;
     3457}
     3458
     3459.links-table td input[type="text"],
     3460.links-table td textarea {
     3461    width: 100%;
     3462}
     3463
     3464.links-table #link_rel {
     3465    max-width: 280px;
     3466}
    34303467
    34313468/*------------------------------------------------------------------------------
  • trunk/wp-admin/includes/meta-boxes.php

    r20272 r20346  
    760760function link_xfn_meta_box($link) {
    761761?>
    762 <table class="editform" style="width: 100%;" cellspacing="2" cellpadding="5">
    763     <tr>
    764         <th style="width: 20%;" scope="row"><label for="link_rel"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('rel:') ?></label></th>
    765         <td style="width: 80%;"><input type="text" name="link_rel" id="link_rel" size="50" value="<?php echo ( isset( $link->link_rel ) ? esc_attr($link->link_rel) : ''); ?>" /></td>
    766     </tr>
    767     <tr>
    768         <td colspan="2">
    769             <table cellpadding="3" cellspacing="5" class="form-table">
    770                 <tr>
    771                     <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('identity') ?> </th>
    772                     <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('identity') ?> </span></legend>
    773                         <label for="me">
    774                         <input type="checkbox" name="identity" value="me" id="me" <?php xfn_check('identity', 'me'); ?> />
    775                         <?php _e('another web address of mine') ?></label>
    776                     </fieldset></td>
    777                 </tr>
    778                 <tr>
    779                     <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friendship') ?> </th>
    780                     <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friendship') ?> </span></legend>
    781                         <label for="contact">
    782                         <input class="valinp" type="radio" name="friendship" value="contact" id="contact" <?php xfn_check('friendship', 'contact'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('contact') ?></label>
    783                         <label for="acquaintance">
    784                         <input class="valinp" type="radio" name="friendship" value="acquaintance" id="acquaintance" <?php xfn_check('friendship', 'acquaintance'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('acquaintance') ?></label>
    785                         <label for="friend">
    786                         <input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check('friendship', 'friend'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friend') ?></label>
    787                         <label for="friendship">
    788                         <input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check('friendship'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label>
    789                     </fieldset></td>
    790                 </tr>
    791                 <tr>
    792                     <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('physical') ?> </th>
    793                     <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('physical') ?> </span></legend>
    794                         <label for="met">
    795                         <input class="valinp" type="checkbox" name="physical" value="met" id="met" <?php xfn_check('physical', 'met'); ?> />
    796                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('met') ?></label>
    797                     </fieldset></td>
    798                 </tr>
    799                 <tr>
    800                     <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('professional') ?> </th>
    801                     <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('professional') ?> </span></legend>
    802                         <label for="co-worker">
    803                         <input class="valinp" type="checkbox" name="professional" value="co-worker" id="co-worker" <?php xfn_check('professional', 'co-worker'); ?> />
    804                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('co-worker') ?></label>
    805                         <label for="colleague">
    806                         <input class="valinp" type="checkbox" name="professional" value="colleague" id="colleague" <?php xfn_check('professional', 'colleague'); ?> />
    807                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('colleague') ?></label>
    808                     </fieldset></td>
    809                 </tr>
    810                 <tr>
    811                     <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?> </th>
    812                     <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?> </span></legend>
    813                         <label for="co-resident">
    814                         <input class="valinp" type="radio" name="geographical" value="co-resident" id="co-resident" <?php xfn_check('geographical', 'co-resident'); ?> />
    815                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('co-resident') ?></label>
    816                         <label for="neighbor">
    817                         <input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check('geographical', 'neighbor'); ?> />
    818                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('neighbor') ?></label>
    819                         <label for="geographical">
    820                         <input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check('geographical'); ?> />
    821                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label>
    822                     </fieldset></td>
    823                 </tr>
    824                 <tr>
    825                     <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?> </th>
    826                     <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?> </span></legend>
    827                         <label for="child">
    828                         <input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child'); ?> />
    829                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('child') ?></label>
    830                         <label for="kin">
    831                         <input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check('family', 'kin'); ?> />
    832                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('kin') ?></label>
    833                         <label for="parent">
    834                         <input class="valinp" type="radio" name="family" value="parent" id="parent" <?php xfn_check('family', 'parent'); ?> />
    835                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('parent') ?></label>
    836                         <label for="sibling">
    837                         <input class="valinp" type="radio" name="family" value="sibling" id="sibling" <?php xfn_check('family', 'sibling'); ?> />
    838                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('sibling') ?></label>
    839                         <label for="spouse">
    840                         <input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check('family', 'spouse'); ?> />
    841                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('spouse') ?></label>
    842                         <label for="family">
    843                         <input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check('family'); ?> />
    844                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label>
    845                     </fieldset></td>
    846                 </tr>
    847                 <tr>
    848                     <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('romantic') ?> </th>
    849                     <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('romantic') ?> </span></legend>
    850                         <label for="muse">
    851                         <input class="valinp" type="checkbox" name="romantic" value="muse" id="muse" <?php xfn_check('romantic', 'muse'); ?> />
    852                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('muse') ?></label>
    853                         <label for="crush">
    854                         <input class="valinp" type="checkbox" name="romantic" value="crush" id="crush" <?php xfn_check('romantic', 'crush'); ?> />
    855                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('crush') ?></label>
    856                         <label for="date">
    857                         <input class="valinp" type="checkbox" name="romantic" value="date" id="date" <?php xfn_check('romantic', 'date'); ?> />
    858                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('date') ?></label>
    859                         <label for="romantic">
    860                         <input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="romantic" <?php xfn_check('romantic', 'sweetheart'); ?> />
    861                         <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('sweetheart') ?></label>
    862                     </fieldset></td>
    863                 </tr>
    864             </table>
    865         </td>
    866     </tr>
     762<table class="links-table" cellspacing="0">
     763    <tr>
     764        <th scope="row"><label for="link_rel"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('rel:') ?></label></th>
     765        <td><input type="text" name="link_rel" id="link_rel" value="<?php echo ( isset( $link->link_rel ) ? esc_attr($link->link_rel) : ''); ?>" /></td>
     766    </tr>
     767    <tr>
     768        <th scope="row"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('identity') ?></th>
     769        <td><fieldset><legend class="screen-reader-text"><span><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('identity') ?></span></legend>
     770            <label for="me">
     771            <input type="checkbox" name="identity" value="me" id="me" <?php xfn_check('identity', 'me'); ?> />
     772            <?php _e('another web address of mine') ?></label>
     773        </fieldset></td>
     774    </tr>
     775    <tr>
     776        <th scope="row"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friendship') ?></th>
     777        <td><fieldset><legend class="screen-reader-text"><span><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friendship') ?></span></legend>
     778            <label for="contact">
     779            <input class="valinp" type="radio" name="friendship" value="contact" id="contact" <?php xfn_check('friendship', 'contact'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('contact') ?>
     780            </label>
     781            <label for="acquaintance">
     782            <input class="valinp" type="radio" name="friendship" value="acquaintance" id="acquaintance" <?php xfn_check('friendship', 'acquaintance'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('acquaintance') ?>
     783            </label>
     784            <label for="friend">
     785            <input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check('friendship', 'friend'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friend') ?>
     786            </label>
     787            <label for="friendship">
     788            <input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check('friendship'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?>
     789            </label>
     790        </fieldset></td>
     791    </tr>
     792    <tr>
     793        <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('physical') ?> </th>
     794        <td><fieldset><legend class="screen-reader-text"><span><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('physical') ?></span></legend>
     795            <label for="met">
     796            <input class="valinp" type="checkbox" name="physical" value="met" id="met" <?php xfn_check('physical', 'met'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('met') ?>
     797            </label>
     798        </fieldset></td>
     799    </tr>
     800    <tr>
     801        <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('professional') ?> </th>
     802        <td><fieldset><legend class="screen-reader-text"><span><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('professional') ?></span></legend>
     803            <label for="co-worker">
     804            <input class="valinp" type="checkbox" name="professional" value="co-worker" id="co-worker" <?php xfn_check('professional', 'co-worker'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('co-worker') ?>
     805            </label>
     806            <label for="colleague">
     807            <input class="valinp" type="checkbox" name="professional" value="colleague" id="colleague" <?php xfn_check('professional', 'colleague'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('colleague') ?>
     808            </label>
     809        </fieldset></td>
     810    </tr>
     811    <tr>
     812        <th scope="row"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?></th>
     813        <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?> </span></legend>
     814            <label for="co-resident">
     815            <input class="valinp" type="radio" name="geographical" value="co-resident" id="co-resident" <?php xfn_check('geographical', 'co-resident'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('co-resident') ?>
     816            </label>
     817            <label for="neighbor">
     818            <input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check('geographical', 'neighbor'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('neighbor') ?>
     819            </label>
     820            <label for="geographical">
     821            <input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check('geographical'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?>
     822            </label>
     823        </fieldset></td>
     824    </tr>
     825    <tr>
     826        <th scope="row"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?></th>
     827        <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?> </span></legend>
     828            <label for="child">
     829            <input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('child') ?>
     830            </label>
     831            <label for="kin">
     832            <input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check('family', 'kin'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('kin') ?>
     833            </label>
     834            <label for="parent">
     835            <input class="valinp" type="radio" name="family" value="parent" id="parent" <?php xfn_check('family', 'parent'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('parent') ?>
     836            </label>
     837            <label for="sibling">
     838            <input class="valinp" type="radio" name="family" value="sibling" id="sibling" <?php xfn_check('family', 'sibling'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('sibling') ?>
     839            </label>
     840            <label for="spouse">
     841            <input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check('family', 'spouse'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('spouse') ?>
     842            </label>
     843            <label for="family">
     844            <input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check('family'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?>
     845            </label>
     846        </fieldset></td>
     847    </tr>
     848    <tr>
     849        <th scope="row"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('romantic') ?></th>
     850        <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('romantic') ?> </span></legend>
     851            <label for="muse">
     852            <input class="valinp" type="checkbox" name="romantic" value="muse" id="muse" <?php xfn_check('romantic', 'muse'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('muse') ?>
     853            </label>
     854            <label for="crush">
     855            <input class="valinp" type="checkbox" name="romantic" value="crush" id="crush" <?php xfn_check('romantic', 'crush'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('crush') ?>
     856            </label>
     857            <label for="date">
     858            <input class="valinp" type="checkbox" name="romantic" value="date" id="date" <?php xfn_check('romantic', 'date'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('date') ?>
     859            </label>
     860            <label for="romantic">
     861            <input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="romantic" <?php xfn_check('romantic', 'sweetheart'); ?> />&nbsp;<?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('sweetheart') ?>
     862            </label>
     863        </fieldset></td>
     864    </tr>
     865
    867866</table>
    868867<p><?php _e('If the link is to a person, you can specify your relationship with them using the above form. If you would like to learn more about the idea check out <a href="http://gmpg.org/xfn/">XFN</a>.'); ?></p>
     
    879878function link_advanced_meta_box($link) {
    880879?>
    881 <table class="form-table" style="width: 100%;" cellspacing="2" cellpadding="5">
    882     <tr class="form-field">
    883         <th valign="top"  scope="row"><label for="link_image"><?php _e('Image Address') ?></label></th>
    884         <td><input type="text" name="link_image" class="code" id="link_image" size="50" value="<?php echo ( isset( $link->link_image ) ? esc_attr($link->link_image) : ''); ?>" style="width: 95%" /></td>
    885     </tr>
    886     <tr class="form-field">
    887         <th valign="top"  scope="row"><label for="rss_uri"><?php _e('RSS Address') ?></label></th>
    888         <td><input name="link_rss" class="code" type="text" id="rss_uri" value="<?php echo ( isset( $link->link_rss ) ? esc_attr($link->link_rss) : ''); ?>" size="50" style="width: 95%" /></td>
    889     </tr>
    890     <tr class="form-field">
    891         <th valign="top"  scope="row"><label for="link_notes"><?php _e('Notes') ?></label></th>
    892         <td><textarea name="link_notes" id="link_notes" cols="50" rows="10" style="width: 95%"><?php echo ( isset( $link->link_notes ) ? $link->link_notes : ''); // textarea_escaped ?></textarea></td>
    893     </tr>
    894     <tr class="form-field">
    895         <th valign="top"  scope="row"><label for="link_rating"><?php _e('Rating') ?></label></th>
     880<table class="links-table" cellpadding="0">
     881    <tr>
     882        <th scope="row"><label for="link_image"><?php _e('Image Address') ?></label></th>
     883        <td><input type="text" name="link_image" class="code" id="link_image" value="<?php echo ( isset( $link->link_image ) ? esc_attr($link->link_image) : ''); ?>" /></td>
     884    </tr>
     885    <tr>
     886        <th scope="row"><label for="rss_uri"><?php _e('RSS Address') ?></label></th>
     887        <td><input name="link_rss" class="code" type="text" id="rss_uri" value="<?php echo ( isset( $link->link_rss ) ? esc_attr($link->link_rss) : ''); ?>" /></td>
     888    </tr>
     889    <tr>
     890        <th scope="row"><label for="link_notes"><?php _e('Notes') ?></label></th>
     891        <td><textarea name="link_notes" id="link_notes" rows="10"><?php echo ( isset( $link->link_notes ) ? $link->link_notes : ''); // textarea_escaped ?></textarea></td>
     892    </tr>
     893    <tr>
     894        <th scope="row"><label for="link_rating"><?php _e('Rating') ?></label></th>
    896895        <td><select name="link_rating" id="link_rating" size="1">
    897896        <?php
    898             for ($r = 0; $r <= 10; $r++) {
    899                 echo('            <option value="'. esc_attr($r) .'" ');
    900                 if ( isset($link->link_rating) && $link->link_rating == $r)
    901                     echo 'selected="selected"';
    902                 echo('>'.$r.'</option>');
     897            for ( $r = 0; $r <= 10; $r++ ) {
     898                echo '<option value="' . $r . '"';
     899                if ( isset($link->link_rating) && $link->link_rating == $r )
     900                    echo ' selected="selected"';
     901                echo('>' . $r . '</option>');
    903902            }
    904903        ?></select>&nbsp;<?php _e('(Leave at 0 for no rating.)') ?>
Note: See TracChangeset for help on using the changeset viewer.