WordPress.org

Make WordPress Core

Changeset 6695


Ignore:
Timestamp:
01/31/08 20:04:54 (8 years ago)
Author:
ryan
Message:

Update edit link pages. Link categories need work.

Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-link-form.php

    r6363 r6695  
    3131?> 
    3232 
    33 <div class="wrap"> 
    34 <h2><?php echo $heading ?></h2> 
    3533<?php echo $form ?> 
    3634<?php wp_nonce_field($nonce_action); ?> 
    3735 
     36<div class="wrap"> 
     37 
    3838<div id="poststuff"> 
    39 <div id="moremeta"> 
    40 <div id="grabit" class="dbx-group"> 
    41  
    42 <fieldset id="categorydiv" class="dbx-box"> 
    43 <h3 class="dbx-handle"><?php _e('Categories') ?></h3> 
    44 <div class="dbx-content"> 
    45 <p id="jaxcat"><?php wp_nonce_field( 'add-link-category', '_ajax_nonce', false ); ?></p> 
    46 <ul id="categorychecklist" class="list:link-category"><?php dropdown_link_categories(get_option('default_link_category')); ?></ul> 
    47 </div> 
    48 </fieldset> 
    49  
    50 <fieldset class="dbx-box"> 
    51 <h3 class="dbx-handle"><?php _e('Target') ?></h3> 
    52 <div class="dbx-content"> 
     39 
     40<div id="namediv"> 
     41<h3><?php _e('Name') ?></h3> 
     42<div class="inside"> 
     43    <input type="text" name="link_name" size="30" tabindex="1" value="<?php echo $link->link_name; ?>" id="link_name" /> 
     44</div> 
     45</div> 
     46 
     47<div id="addressdiv"> 
     48<h3><?php _e('Address') ?></h3> 
     49<div class="inside"> 
     50    <input type="text" name="link_url" size="30" tabindex="1" value="<?php echo $link->link_url; ?>" id="link_url" /> 
     51</div> 
     52</div> 
     53 
     54<div id="descriptiondiv"> 
     55<h3><?php _e('Description') ?></h3> 
     56<div class="inside"> 
     57    <input type="text" name="link_description" size="30" tabindex="1" value="<?php echo $link->link_description; ?>" id="link_description" /> 
     58</div> 
     59</div> 
     60 
     61<div id="submitpost"> 
     62<p class="submit"> 
     63<input type="submit" name="save" value="<?php _e('Save'); ?>" style="font-weight: bold;" tabindex="4" /> 
     64</p> 
     65</div> 
     66 
     67<div id="linkcategorydiv" class="postbox <?php echo postbox_classes('linkcategorydiv'); ?>"> 
     68<h3><?php _e('Categories') ?></h3> 
     69<div class="inside"> 
     70 
     71<div id="category-adder" class="wp-hidden-children"> 
     72    <h4><a id="category-add-toggle" href="#category-add"><?php _e( '+ Add New Category' ); ?></a></h4> 
     73    <p id="category-add" class="wp-hidden-child"> 
     74        <input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _e( 'New category name' ); ?>" /> 
     75        <?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category') ) ); ?> 
     76        <input type="button" id="category-add-sumbit" class="add:categorychecklist:linkcategorydiv button" value="<?php _e( 'Add' ); ?>" /> 
     77        <?php wp_nonce_field( 'add-link-category', '_ajax_nonce', false ); ?> 
     78        <span id="category-ajax-response"></span> 
     79    </p> 
     80</div> 
     81 
     82<ul id="category-tabs"> 
     83    <li class="ui-tabs-selected"><a href="#categories-all"><?php _e( 'All Categories' ); ?></a></li> 
     84    <li class="wp-no-js-hidden"><a href="#categories-pop"><?php _e( 'Most Used' ); ?></a></li> 
     85</ul> 
     86 
     87<div id="categories-all" class="ui-tabs-panel"> 
     88    <ul id="categorychecklist" class="list:category categorychecklist form-no-clear"> 
     89        <?php dropdown_link_categories(); ?> 
     90    </ul> 
     91</div> 
     92 
     93<div id="categories-pop" class="ui-tabs-panel" style="display: none;"> 
     94    <ul id="categorychecklist-pop" class="categorychecklist form-no-clear"> 
     95        <?php wp_popular_categories_checklist(); ?> 
     96    </ul> 
     97</div> 
     98 
     99</div> 
     100</div> 
     101 
     102<h2><?php _e('Advanced Options'); ?></h2> 
     103 
     104<div id="linktargetdiv" class="postbox <?php echo postbox_classes('linktargetdiv'); ?>"> 
     105<h3><?php _e('Target') ?></h3> 
     106<div class="inside"> 
    53107<label for="link_target_blank" class="selectit"> 
    54108<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo(($link->link_target == '_blank') ? 'checked="checked"' : ''); ?> /> 
     
    61115<?php _e('none') ?></label> 
    62116</div> 
    63 </fieldset> 
    64  
    65 <fieldset class="dbx-box"> 
    66 <h3 class="dbx-handle"><?php _e('Visible') ?></h3> 
    67 <div class="dbx-content"> 
     117</div> 
     118 
     119<div id="linkvisiblediv" class="postbox <?php echo postbox_classes('linkvisiblediv'); ?>"> 
     120<h3><?php _e('Visible') ?></h3> 
     121<div class="inside"> 
    68122<label for="link_visible_yes" class="selectit"> 
    69123<input id="link_visible_yes" type="radio" name="link_visible" <?php if ($link->link_visible == 'Y') echo "checked='checked'"; ?> value="Y" /> 
     
    73127<?php _e('No') ?></label> 
    74128</div> 
    75 </fieldset> 
    76  
    77 </div> 
    78 </div> 
    79  
    80 <table class="editform" width="100%" cellspacing="2" cellpadding="5"> 
    81 <tr> 
    82 <th scope="row" valign="top"><label for="link_name"><?php _e('Name:') ?></label></th> 
    83 <td><input type="text" name="link_name" id="link_name" value="<?php echo $link->link_name; ?>" style="width: 95%" /></td> 
    84 </tr> 
    85 <tr> 
    86 <th width="20%" scope="row" valign="top"><label for="link_url"><?php _e('Address:') ?></label></th> 
    87 <td width="80%"><input type="text" name="link_url" id="link_url" value="<?php echo $link->link_url; if ( empty( $link->link_url ) ) echo 'http://'; ?>" style="width: 95%" /></td> 
    88 </tr> 
    89 <tr> 
    90 <th scope="row" valign="top"><label for="link_description"><?php _e('Description:') ?></label></th> 
    91 <td><input type="text" name="link_description" id="link_description" value="<?php echo $link->link_description; ?>" style="width: 95%" /></td> 
    92 </tr> 
    93 </table> 
    94  
    95 <p class="submit"> 
    96 <input type="submit" name="submit" value="<?php echo $submit_text ?>" /> 
    97 </p> 
    98  
    99 <div id="advancedstuff" class="dbx-group" > 
    100  
    101 <fieldset id="xfn" class="dbx-box"> 
    102 <h3 class="dbx-handle"><?php _e('Link Relationship (XFN)') ?></h3> 
    103 <div class="dbx-content"> 
     129</div> 
     130 
     131<div id="linkxfndiv" class="postbox <?php echo postbox_classes('linkxfndiv'); ?>"> 
     132<h3><?php _e('Link Relationship (XFN)') ?></h3> 
     133<div class="inside"> 
    104134<table class="editform" width="100%" cellspacing="2" cellpadding="5"> 
    105135    <tr> 
     
    210240</table> 
    211241</div> 
    212 </fieldset> 
    213  
    214 <fieldset id="advanced" class="dbx-box"> 
    215 <h3 class="dbx-handle"><?php _e('Advanced') ?></h3> 
    216 <div class="dbx-content"> 
     242</div> 
     243 
     244<div id="linkadvanceddiv" class="postbox <?php echo postbox_classes('linkadvanceddiv'); ?>"> 
     245<h3><?php _e('Advanced') ?></h3> 
     246<div class="inside"> 
    217247<table class="editform" width="100%" cellspacing="2" cellpadding="5"> 
    218248    <tr> 
     
    243273</table> 
    244274</div> 
    245 </fieldset> 
    246275</div> 
    247276 
     
    254283<input type="hidden" name="action" value="add" /> 
    255284<?php endif; ?> 
    256 </div> 
     285 
     286</div> 
     287 
     288</div> 
     289 
     290</div> 
     291 
    257292</form> 
    258 </div> 
  • trunk/wp-admin/link-add.php

    r6555 r6695  
    1212    'notes', 'linkcheck[]')); 
    1313 
    14 if ( current_user_can( 'manage_categories' ) ) 
    15     wp_enqueue_script( 'ajaxcat' ); 
     14wp_enqueue_script('link'); 
     15wp_enqueue_script('thickbox'); 
     16 
    1617require('admin-header.php'); 
    1718?> 
  • trunk/wp-admin/link.php

    r6544 r6695  
    8484 
    8585    case 'edit' : 
    86         if ( current_user_can( 'manage_categories' ) ) 
    87             wp_enqueue_script( 'ajaxlinkcat' ); 
     86        wp_enqueue_script('link'); 
     87        wp_enqueue_script('thickbox'); 
     88 
    8889        $parent_file = 'link-manager.php'; 
    8990        $submenu_file = 'link-manager.php'; 
  • trunk/wp-includes/script-loader.php

    r6694 r6695  
    143143                'requestFile' => get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php', 
    144144            ) ); 
     145            $this->add( 'link', '/wp-admin/js/link.js', array('jquery-ui-tabs', 'wp-lists', 'postbox'), '20080131' ); 
    145146            $this->add( 'media-upload', '/wp-admin/js/media-upload.js', false, '20080109' ); 
    146147            $this->localize( 'upload', 'uploadL10n', array( 
Note: See TracChangeset for help on using the changeset viewer.