Make WordPress Core

Changeset 2639


Ignore:
Timestamp:
06/14/2005 07:31:36 AM (21 years ago)
Author:
matt
Message:

New schmancy posting interface

Location:
trunk/wp-admin
Files:
3 added
7 edited

Legend:

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

    r2595 r2639  
    582582        echo '
    583583        <div id="quicktags">
    584         <a href="http://wordpress.org/docs/reference/post/#quicktags" title="' .  __('Help with quicktags') . '">' . __('Quicktags') . '</a>:
    585584        <script src="quicktags.js" type="text/javascript"></script>
    586585        <script type="text/javascript">edToolbar();</script>
  • trunk/wp-admin/admin-header.php

    r2559 r2639  
    7979<?php endif; ?>
    8080
     81
    8182//]]>
    8283</script>
     84
     85<?php if ( isset( $editing ) ) : ?>
     86<script type="text/javascript" src="dbx.js"></script>
     87<script type="text/javascript" src="dbx-key.js"></script>
     88<?php endif; ?>
    8389
    8490<?php do_action('admin_head', ''); ?>
  • trunk/wp-admin/edit-form-advanced.php

    r2636 r2639  
    5959<?php endif; ?>
    6060<div id="poststuff">
    61     <fieldset id="titlediv">
    62       <legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend>
    63           <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $edited_post_title; ?>" id="title" /></div>
    64     </fieldset>
    65 
    66     <fieldset id="categorydiv">
    67       <legend><a href="http://wordpress.org/docs/reference/post/#category" title="<?php _e('Help on categories') ?>"><?php _e('Categories') ?></a></legend>
    68           <div><?php dropdown_categories(get_settings('default_category')); ?></div>
    69     </fieldset>
    70 
    71     <fieldset id="commentstatusdiv">
    72       <legend><a href="http://wordpress.org/docs/reference/post/#comments" title="<?php _e('Help on comment status') ?>"><?php _e('Discussion') ?></a></legend>
    73           <div>
    74           <input name="advanced_view" type="hidden" value="1" />
    75           <label for="comment_status" class="selectit">
    76               <input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($comment_status, 'open'); ?> />
    77          <?php _e('Allow Comments') ?></label>
    78                  <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label>
    79 </div>
    80 </fieldset>
    81     <fieldset id="postpassworddiv">
    82       <legend><a href="http://wordpress.org/docs/reference/post/#post_password" title="<?php _e('Help on post password') ?>"><?php _e('Post Password') ?></a></legend>
    83           <div><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post_password ?>" /></div>
    84     </fieldset>
    85 
    86 <br />
    87 <fieldset id="postexcerpt">
    88 <legend><a href="http://wordpress.org/docs/reference/post/#excerpt" title="<?php _e('Help with excerpts') ?>"><?php _e('Excerpt') ?></a></legend>
    89 <div><textarea rows="1" cols="40" name="excerpt" tabindex="4" id="excerpt"><?php echo $excerpt ?></textarea></div>
    90 </fieldset>
     61
     62<div id="moremeta">
     63<div id="grabit" class="dbx-group">
     64
     65<fieldset id="commentstatusdiv" class="dbx-box">
     66<h3 class="dbx-handle"><?php _e('Discussion') ?></h3>
     67<div class="dbx-content">
     68<input name="advanced_view" type="hidden" value="1" />
     69<label for="comment_status" class="selectit">
     70<input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($comment_status, 'open'); ?> />
     71<?php _e('Allow Comments') ?></label>
     72<label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label>
     73</div>
     74</fieldset>
     75
     76<fieldset id="passworddiv" class="dbx-box">
     77<h3 class="dbx-handle"><?php _e('Password-Protect Post') ?></h3>
     78<div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post_password ?>" /></div>
     79</fieldset>
     80
     81<fieldset id="slugdiv" class="dbx-box">
     82<h3 class="dbx-handle"><?php _e('Post slug') ?></h3>
     83<div class="dbx-content"><input name="post_name" type="text" size="13" id="post_name" value="<?php echo $post_name ?>" /></div>
     84</fieldset>
     85
     86<fieldset id="categorydiv" class="dbx-box">
     87<h3 class="dbx-handle"><?php _e('Categories') ?></h3>
     88<div class="dbx-content"><?php dropdown_categories(get_settings('default_category')); ?></div>
     89</fieldset>
     90
     91<fieldset class="dbx-box">
     92<h3 class="dbx-handle"><?php _e('Post Status') ?></h3>
     93<div class="dbx-content"><?php if ( user_can_create_post($user_ID) ) : ?>
     94<label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post_status, 'publish'); ?> /> <?php _e('Published') ?></label>
     95<?php endif; ?>
     96          <label for="post_status_draft" class="selectit"><input id="post_status_draft" name="post_status" type="radio" value="draft" <?php checked($post_status, 'draft'); ?> /> <?php _e('Draft') ?></label>
     97          <label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="radio" value="private" <?php checked($post_status, 'private'); ?> /> <?php _e('Private') ?></label></div>
     98</fieldset>
     99
     100<?php if ($user_level > 4) : ?>
     101<fieldset class="dbx-box">
     102<h3 class="dbx-handle"><?php _e('Post Timestamp'); ?>:</h3>
     103<div class="dbx-content"><?php touch_time(($action == 'edit')); ?></div>
     104</fieldset>
     105<?php endif; ?>
     106
     107<?php if ($user_level > 7 && $users = $wpdb->get_results("SELECT ID, user_login FROM $wpdb->users WHERE user_level <= $user_level AND user_level > 0") ) : ?>
     108<fieldset id="authordiv" class="dbx-box">
     109<h3 class="dbx-handle"><?php _e('Post author'); ?>:</h3>
     110<div class="dbx-content">
     111<select name="post_author_override" id="post_author_override">
     112<?php
     113foreach ($users as $o) :
     114$o = get_userdata( $o->ID );
     115if ( $post_author == $o->ID || ( empty($post_ID) && $user_ID == $o->ID ) ) $selected = 'selected="selected"';
     116else $selected = '';
     117echo "<option value='$o->ID' $selected>$o->display_name</option>";
     118endforeach;
     119?>
     120</select>
     121</div>
     122</fieldset>
     123<?php endif; ?>
     124
     125</div>
     126</div>
     127
     128<fieldset id="titlediv">
     129  <legend><?php _e('Title') ?></legend>
     130  <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $edited_post_title; ?>" id="title" /></div>
     131</fieldset>
     132
    91133<fieldset id="postdiv">
    92        <legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with post field') ?>"><?php _e('Post') ?></a></legend>
     134       <legend><?php _e('Post') ?></legend>
    93135<?php the_quicktags(); ?>
    94136<?php
    … …  
    100142<div><textarea rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="5" id="content"><?php echo $content ?></textarea></div>
    101143</fieldset>
    102 <?php
    103 ?>
    104144<script type="text/javascript">
    105145<!--
    … …  
    126166
    127167<?php do_action('edit_form_advanced', ''); ?>
    128 </div>
    129 
    130 </div>
    131 
    132 <div class="wrap">
    133 <h2><?php _e('Advanced'); ?></h2>
    134 
    135 <table width="100%" cellspacing="2" cellpadding="5" class="editform">
    136         <tr>
    137                 <th scope="row" valign="top"><?php _e('Post Status') ?>:</th>
    138                 <td><?php if ( user_can_create_post($user_ID) ) : ?>
    139 <label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post_status, 'publish'); ?> /> <?php _e('Published') ?></label><br />
    140 <?php endif; ?>
    141           <label for="post_status_draft" class="selectit"><input id="post_status_draft" name="post_status" type="radio" value="draft" <?php checked($post_status, 'draft'); ?> /> <?php _e('Draft') ?></label><br />
    142           <label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="radio" value="private" <?php checked($post_status, 'private'); ?> /> <?php _e('Private') ?></label></td>
    143         </tr>
    144         <tr>
    145                 <th scope="row" valign="top"><?php _e('Send trackbacks to'); ?>:</th>
    146                 <td><?php echo $form_trackback; ?> <br />
    147                 <?php _e('Separate multiple URIs with spaces'); ?></td>
    148         </tr>
    149         <tr valign="top">
    150                 <th scope="row" width="25%"><?php _e('Post slug') ?>:</th>
    151                 <td><input name="post_name" type="text" size="25" id="post_name" value="<?php echo $post_name ?>" /></td>
    152         </tr>
    153 <?php if ($user_level > 7 && $users = $wpdb->get_results("SELECT ID, user_login FROM $wpdb->users WHERE user_level <= $user_level AND user_level > 0") ) : ?>
    154         <tr>
    155                 <th scope="row"><?php _e('Post author'); ?>:</th>
    156                 <td>
    157                 <select name="post_author_override" id="post_author_override">
    158                 <?php
    159                 foreach ($users as $o) :
    160                         $o = get_userdata( $o->ID );
    161                         if ( $post_author == $o->ID || ( empty($post_ID) && $user_ID == $o->ID ) ) $selected = 'selected="selected"';
    162                         else $selected = '';
    163                         echo "<option value='$o->ID' $selected>$o->user_login ($o->first_name $o->last_name)</option>";
    164                 endforeach;
    165                 ?>
    166                 </select>
    167                 </td>
    168         </tr>
    169 <?php endif; ?>
    170 <?php if ($user_level > 4) : ?>
    171         <tr>
    172                 <th scope="row"><?php _e('Edit time'); ?>:</th>
    173                 <td><?php touch_time(($action == 'edit')); ?></td>
    174         </tr>
    175 <?php endif; ?>
    176 <?php if ('edit' == $action) : ?>
    177         <tr>
    178                 <th scope="row"><?php _e('Delete'); ?>:</th>
    179                 <td>
    180                 <input name="deletepost" class="button" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this post') ?>" <?php echo "onclick=\"return confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n  \'Cancel\' to stop, \'OK\' to delete."), addslashes($edited_post_title) ) . "')\""; ?> />
    181 </td>
    182 <?php endif; ?>
    183         </tr>
    184 </table>
    185 
    186 <fieldset id="postcustom">
    187 <legend><?php _e('Custom Fields') ?></legend>
    188 <div id="postcustomstuff">
    189 <?php
    190 if($metadata = has_meta($post_ID)) {
    191 ?>
    192 <?php
    193         list_meta($metadata);
    194 ?>
    195 <?php
    196 }
    197         meta_form();
    198 ?>
    199 </div>
    200 </fieldset>
     168
     169<div id="advancedstuff" class="dbx-group" >
     170
     171<fieldset id="postexcerpt" class="dbx-box">
     172<h3 class="dbx-handle"><?php _e('Optional Excerpt') ?></h3>
     173<div class="dbx-content"><textarea rows="1" cols="40" name="excerpt" tabindex="4" id="excerpt"><?php echo $excerpt ?></textarea></div>
     174</fieldset>
     175
     176<fieldset class="dbx-box">
     177<h3 class="dbx-handle"><?php _e('Trackbacks') ?></h3>
     178<div class="dbx-content"><?php _e('Send trackbacks to'); ?>: <?php echo $form_trackback; ?> (<?php _e('Separate multiple URIs with spaces'); ?>)
    201179<?php
    202180if ('' != $pinged)
    … …  
    204182?>
    205183</div>
     184</fieldset>
     185
     186<fieldset id="postcustom" class="dbx-box">
     187<h3 class="dbx-handle"><?php _e('Custom Fields') ?></h3>
     188<div id="postcustomstuff" class="dbx-content">
     189<?php
     190if($metadata = has_meta($post_ID)) {
     191?>
     192<?php
     193        list_meta($metadata);
     194?>
     195<?php
     196}
     197        meta_form();
     198?>
     199</div>
     200</fieldset>
     201
     202</div>
     203
     204<?php if ('edit' == $action) : ?>
     205<p><input name="deletepost" class="button" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this post') ?>" <?php echo "onclick=\"return confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n  \'Cancel\' to stop, \'OK\' to delete."), addslashes($edited_post_title) ) . "')\""; ?> /></p>
     206<?php endif; ?>
     207
     208</div>
     209
     210</div>
    206211
    207212</form>
  • trunk/wp-admin/options-writing.php

    r2469 r2639  
    1212  <form name="form1" method="post" action="options.php">
    1313    <input type="hidden" name="action" value="update" />
    14     <input type="hidden" name="page_options" value="'default_post_edit_rows','use_smilies','use_balanceTags','advanced_edit','ping_sites','mailserver_url', 'mailserver_port','mailserver_login','mailserver_pass','default_category','default_email_category','new_users_can_blog'" />
     14    <input type="hidden" name="page_options" value="'default_post_edit_rows','use_smilies','use_balanceTags','ping_sites','mailserver_url', 'mailserver_port','mailserver_login','mailserver_pass','default_category','default_email_category','new_users_can_blog'" />
    1515    <table width="100%" cellspacing="2" cellpadding="5" class="editform">
    16       <tr valign="top">
    17         <th scope="row"> <?php _e('When starting a post, show:') ?> </th>
    18         <td><?php get_settings('advanced_edit') ?><label>
    19           <input name="advanced_edit" type="radio" value="0" <?php checked('0', get_settings('advanced_edit')); ?> />
    20 <?php _e('Simple controls') ?></label>
    21           <br />
    22           <label for="advanced_edit">
    23           <input name="advanced_edit" id="advanced_edit" type="radio" value="1" <?php checked('1', get_settings('advanced_edit')); ?> />
    24 <?php _e('Advanced controls') ?></label>
    25                 </td>
    26       </tr>
    2716      <tr valign="top">
    28         <th width="33%" scope="row"> <?php _e('Size of the writing box:') ?></th>
     17        <th width="33%" scope="row"> <?php _e('Size of the post box:') ?></th>
    2918        <td><input name="default_post_edit_rows" type="text" id="default_post_edit_rows" value="<?php form_option('default_post_edit_rows'); ?>" size="2" style="width: 1.5em; " />
    3019         <?php _e('lines') ?></td>
  • trunk/wp-admin/post.php

    r2604 r2639  
    732732                $excerpt = apply_filters('default_excerpt', $excerpt);
    733733
    734                 if (get_settings('advanced_edit')) {
    735                         include('edit-form-advanced.php');
    736                 } else {
    737                         include('edit-form.php');
    738                 }
     734                include('edit-form-advanced.php');
    739735?>
    740736<div class="wrap">
  • trunk/wp-admin/quicktags.js

    r2605 r2639  
    117117
    118118edButtons[edButtons.length] =
    119 new edButton('ed_pre'
     119new edButton('ed_code'
    120120,'code'
    121121,'<code>'
  • trunk/wp-admin/wp-admin.css

    r2533 r2639  
    5656
    5757body    {
    58         background: #f2f2f2;
     58        background: #fff;
    5959        color: #000;
    6060        margin: 0;
    … …  
    6363
    6464body, td {
    65         font: 10pt Georgia, "Times New Roman", Times, serif;
     65        font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana;
    6666}
    6767
    6868fieldset {
    69         border: 1px solid #ddd;
    70         -moz-border-radius: 5px;
     69        border: none;
    7170        padding: 3px;
    7271}
    … …  
    137136        border: 1px solid #b2b2b2;
    138137        color: #000;
    139         font-family: Georgia, "Times New Roman", Times, serif;
     138        font:  13px Verdana, Arial, Helvetica, sans-serif;
    140139        margin: 1px;
    141140        padding: 3px;
    … …  
    221220}
    222221
    223 .submit, #quicktags, .editform th, #postcustomsubmit {
     222.submit, .editform th, #postcustomsubmit {
    224223        text-align: right;
    225224}
    … …  
    267266}
    268267
    269 #adminmenu .current, #adminmenu2 .current, #ed_strong {
     268#adminmenu .current, #adminmenu2 .current {
    270269        font-weight: bold;
    271270}
    … …  
    324323}
    325324
    326 #categorydiv {
    327         line-height: 130%;
    328         margin-right: 15px;
    329         position: absolute;
    330         right: 5%;
    331         width: 9em;
    332 }
    333 
    334 #categorydiv div {
    335         height: 27em;
    336         overflow: auto;
    337 }
    338325
    339326#categorydiv input, #poststatusdiv input, #commentstatusdiv input, #pingstatusdiv input {
    … …  
    341328}
    342329
    343 #content, #excerpt {
    344         margin-left: 1%;
     330#content, #titlediv input, #quicktags {
     331        margin-left: 2%;
    345332        width: 97%;
    346333}
    … …  
    351338}
    352339
    353 #ed_del {
     340#quicktags #ed_strong {
     341        font-weight: bold;
     342}
     343
     344#quicktags #ed_link {
     345        color: blue;
     346        text-decoration: underline;
     347}
     348
     349#quicktags #ed_del {
    354350        text-decoration: line-through;
    355351}
    356352
    357 #ed_em {
     353#quicktags #ed_em {
    358354        font-style: italic;
     355}
     356
     357#quicktags #ed_code {
     358        font-family: "Courier New", Courier, mono;
    359359}
    360360
    … …  
    412412}
    413413
    414 #metainfo, #postdiv, #postexcerpt {
    415         clear: both;
    416 }
    417 
    418 #postcustom {
    419         border: 1px solid #aaa;
    420         padding: .5em;
    421         width: 97%;
    422 }
    423414
    424415#postcustom .updatemeta, #postcustom .deletemeta {
    … …  
    438429
    439430#poststuff {
    440         margin-right: 11em;
     431        margin-right: 16em;
    441432}
    442433
    … …  
    463454}
    464455
    465 #quicktags {
    466         margin-right: 1%;
    467 }
    468 
    469456#save {
    470         width: 14em;
    471 }
    472 
    473 #simple #titlediv {
    474         height: 4em;
     457        width: 15em;
    475458}
    476459
    … …  
    497480        margin: .5em;
    498481        padding: 0;
    499 }
    500 
    501 #titlediv, #commentstatusdiv, #postpassworddiv, #namediv, #uridiv, #emaildiv, #pageparent {
    502         float: left;
    503         height: 6em;
    504         margin-right: 5px;
    505482}
    506483
    … …  
    515492        letter-spacing: -.05em;
    516493        margin: 0;
     494        font-family: Georgia, "Times New Roman", Times, serif
    517495}
    518496
    … …  
    558536}
    559537
    560 
    561 /* emeyer additions */
    562 
    563 .active td {background: #BEB;}
    564 .active .name {background: #9C9;}
    565 .alternate.active td {background: #ADA;}
    566 .alternate.active .name {background: #8B8;}
     538.active td {
     539        background: #BEB;
     540}
     541.active .name {
     542        background: #9C9;
     543}
     544.alternate.active td {
     545        background: #ADA;
     546}
     547.alternate.active .name {
     548        background: #8B8;
     549}
     550
     551/* Box stuff */
     552.dbx-clone {
     553        position:absolute;
     554        visibility:hidden;
     555}
     556.dbx-clone, .dbx-clone .dbx-handle-cursor {
     557        cursor:move !important;
     558}
     559.dbx-dummy {
     560        display:block;
     561        width:0;
     562        height:0;
     563        overflow:hidden;
     564}
     565.dbx-group, .dbx-box, .dbx-handle {
     566        position:relative;
     567        display:block;
     568}
     569
     570
     571/****************************************************************
     572  avoid padding, margins or borders on dbx-box,
     573  to reduce visual discrepancies between it and the clone. 
     574  overall, dbx-box is best left as visually unstyled as possible
     575*****************************************************************/
     576.dbx-box {
     577        margin:0;
     578        padding:0;
     579        border:none;
     580}
     581
     582/* Can change this */
     583#moremeta fieldset, #advancedstuff fieldset {
     584        margin-bottom: 1em;
     585}
     586#moremeta fieldset div {
     587        margin-left: 5px;
     588}
     589#moremeta {
     590        line-height: 130%;
     591        margin-right: 15px;
     592        position: absolute;
     593        right: 5%;
     594        width: 14.5em;
     595        border-left: 1px solid #dfe8f1;
     596}
     597
     598#slugdiv input, #passworddiv input, #authordiv select {
     599        margin-top: .5em;
     600        width: 95%;
     601}
     602
     603#moremeta h3, #advancedstuff h3 {
     604        padding: 3px;
     605        font-weight: normal;
     606        font-size: 13px;
     607}
     608
     609#advancedstuff div {
     610        margin-top: .5em;
     611        margin-left: 2%;
     612}
     613
     614/* default box styles */
     615.dbx-box {
     616}
     617
     618/* box when toggle is open */
     619.dbx-box-open {
     620}
     621
     622/* box when toggle is closed */
     623.dbx-box-closed {
     624}
     625
     626/* toggle state of inner content area */
     627.dbx-box-open .dbx-content {
     628        display:block;
     629}
     630.dbx-box-closed .dbx-content {
     631        display:none;
     632}
     633
     634/* handles */
     635.dbx-handle {
     636        background-color: #dfe8f1;
     637        margin: 0;
     638        padding: 0;
     639}
     640
     641/* handle cursors */
     642.dbx-handle-cursor {
     643        cursor:move;
     644}
     645       
     646/* toggle images */
     647a.dbx-toggle, a.dbx-toggle:visited {
     648        display:block;
     649        width: 12px;
     650        height: 12px;
     651        overflow: hidden;
     652        background-image: url( toggle.png );
     653        position: absolute;
     654        top: .3em;
     655        right: .3em;
     656        border-bottom: 0;
     657        background-position: 0 0;
     658}
     659       
     660a.dbx-toggle-open, a.dbx-toggle-open:visited {
     661        background-position: 0;
     662}
     663       
     664a.dbx-toggle-closed, a.dbx-toggle-closed:visited {
     665        background-position: -12px 0;
     666}
     667       
     668a.dbx-toggle-hilite-open, a.dbx-toggle-hilite-open:visited {
     669        background-position: 0;
     670}
     671       
     672a.dbx-toggle-hilite-closed, a.dbx-toggle-hilite-closed:visited {
     673        background-position: -12px 0;
     674}
     675
     676/* additional clone styles */
     677.dbx-clone {
     678        opacity: 0.8;
     679        -moz-opacity: 0.8;
     680        -khtml-opacity: 0.8;
     681        filter: alpha(opacity=80);
     682}
Note: See TracChangeset for help on using the changeset viewer.