Changeset 8371
- Timestamp:
- 07/18/2008 10:10:41 AM (15 years ago)
- Location:
- branches/crazyhorse/wp-admin
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/crazyhorse/wp-admin/admin-footer.php
r8115 r8371 1 <br class="clear" /></div></div><!-- wpbody-content wpbody --> 2 <br class="clear" /></div><!-- wpcontent --> 1 </div><!-- wpbody-content --> 2 <?php if ( ! $fixed_bar ) { ?> 3 </div><!-- wpbody --> 4 <?php } ?> 5 </div><!-- wpcontent --> 3 6 </div><!-- wpwrap --> 7 4 8 <div id="footer"> 5 9 <p><?php -
branches/crazyhorse/wp-admin/admin-header.php
r8335 r8371 16 16 add_filter( 'admin_body_class', 'add_minwidth' ); 17 17 } 18 19 $fixed_bar_pages = array( 'post.php', 'post-new.php' ); 20 $fixed_bar = in_array( $the_current_page, $fixed_bar_pages ) ? true : false; 18 21 19 22 get_admin_page_title(); … … 120 123 } 121 124 ?> 122 <div id="wpbody"><div id="wpbody-content"> 125 <div id="wpbody"> 126 127 <?php if ( ! $fixed_bar ) { ?> 128 <div id="wpbody-content"> 129 <?php } ?> -
branches/crazyhorse/wp-admin/css/colors-fresh.css
r8335 r8371 1 #wpcontent {1 #wpcontent, #wpbody { 2 2 background-color: #e4f2fd; 3 3 } … … 708 708 background-color: #99ff99; 709 709 } 710 711 712 713 714 #adminmenu { 715 background-color: #E4F2FD; 716 } 717 718 719 /* fixed tool bar */ 720 #fixedbar { 721 background-color:#464646; 722 color: #ccc; 723 } 724 725 #fixedbar #last-edit { 726 727 } 728 729 #fixedbar a, 730 #fixedbar .curtime { 731 color: #ccc; 732 } 733 734 #fixedbar a:hover { 735 color: #fff; 736 } 737 738 #fixedbar a.button { 739 color: #246; 740 } 741 742 #fixedbar a.button:hover { 743 color: #d54e21; 744 } 745 746 #timestampdiv { 747 color: #ccc; 748 } -
branches/crazyhorse/wp-admin/css/dashboard.css
r8292 r8371 20 20 border-style: solid; 21 21 border-width: 1px; 22 padding: 0;22 padding: 2px; 23 23 border-color: #CCCCCC; 24 24 } … … 26 26 form .textarea-wrap textarea { 27 27 border: 0pt none; 28 padding: 0; 29 width: 100%; 28 30 } 29 31 -
branches/crazyhorse/wp-admin/edit-form-advanced.php
r8329 r8371 9 9 $messages[4] = __('Post updated.'); 10 10 $messages[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( $_GET['revision'], false ) ); 11 $messages[6] = __('Post published.'); 11 12 12 13 $notice = false; … … 37 38 38 39 ?> 39 <?php if ( $notice ) : ?> 40 <div id="notice" class="error"><p><?php echo $notice ?></p></div> 41 <?php endif; ?> 42 <?php if (isset($_GET['message'])) : ?> 43 <div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div> 44 <?php endif; ?> 40 45 41 46 42 <?php … … 232 228 233 229 <form name="post" action="post.php" method="post" id="post"> 230 <div id="wpbody-content"> 231 232 <?php if ( $notice ) : ?> 233 <div id="notice" class="error"><p><?php echo $notice ?></p></div> 234 <?php endif; ?> 235 <?php if (isset($_GET['message'])) : ?> 236 <div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div> 237 <?php endif; ?> 238 234 239 <?php if ( (isset($mode) && 'bookmarklet' == $mode) || isset($_GET['popupurl']) ): ?> 235 240 <input type="hidden" name="mode" value="bookmarklet" /> … … 244 249 ?></h2> 245 250 246 < p id="big-add-button">251 <!--<p id="big-add-button"> 247 252 <span id="previewview"> 248 253 <?php if ( 'publish' == $post->post_status ) { ?> … … 252 257 <?php } ?> 253 258 </span> 254 </p> 259 </p>--> 255 260 256 261 <?php … … 344 349 <div id="post-status-info"> 345 350 <span id="wp-word-count" class="alignleft"></span> 346 <span id="autosave" class="alignright"></span> 351 <span class="alignright"> 352 <span id="autosave"> </span> 353 <?php 354 if ( $post_ID ) { 355 echo '<span id="last-edit">'; 356 if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) { 357 $last_user = get_userdata($last_id); 358 printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); 359 } else { 360 printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); 361 } 362 echo '</span>'; 363 } 364 ?> 365 </span> 347 366 <br class="clear" /> 348 367 </div> 349 368 350 <div id="submitpost" class="submitbox"> 369 370 <?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?> 371 <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> 372 <?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?> 373 <?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?> 374 <?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?> 375 </div> 376 377 <?php 378 379 echo $form_pingback; 380 echo $form_prevstatus; 381 382 do_meta_boxes('post', 'normal', $post); 383 384 do_action('edit_form_advanced'); 385 386 do_meta_boxes('post', 'advanced', $post); 387 388 do_action('dbx_post_sidebar'); 389 390 ?> 391 392 </div> 393 </div> 394 </div><!-- /poststuff --> 395 396 </div> 397 </div> 398 399 <div id="fixedbar"> 400 <table id="fixedbar-wrap"><tbody><tr> 401 <td id="preview-link"> 402 <?php if ( 'publish' == $post->post_status ) { ?> 403 <a href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Post'); ?></a> 404 <?php } elseif ( 'edit' == $action ) { ?> 405 <a href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank" tabindex="4"><?php _e('Preview this Post'); ?></a> 406 <?php } ?> 407 </td> 408 <td id="submitpost" class="submitbox"> 351 409 <div id="post-time-info" class="alignleft"> 352 410 <?php 353 411 if ( current_user_can( 'publish_posts' ) ) : // Contributors don't get to choose the date of publish 354 412 $stamp = __( 'Timestamp: <span class="timestamp">%1$s%3$s</span>' ); 355 $edit = ' <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex="4">' . __('(Change)') . '</a>';413 $edit = ' (<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex="4">' . __('Change') . '</a>)'; 356 414 if ($post_ID) { 357 415 if ( '0000-00-00 00:00:00' == $post->post_date ) { // draft, 1 or more saves, no date specified … … 370 428 ?> 371 429 372 <p class="curtime"><?php printf($stamp, $date, $time, $edit); ?> 373 </p> 430 <p class="curtime"><?php printf($stamp, $date, $time, $edit); ?></p> 374 431 <div id='timestampdiv' class='hide-if-js'><?php touch_time(($action == 'edit'),1,4); ?></div> 375 432 376 433 <?php 377 378 434 endif; 379 380 if ( $post_ID ) { 381 echo '<p id="last-edit">'; 382 if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) { 383 $last_user = get_userdata($last_id); 384 printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); 385 } else { 386 printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); 387 } 388 echo '</p>'; 389 } 390 391 ?> 392 435 ?> 393 436 </div> 394 437 <p class="submit alignright"> … … 409 452 <input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> 410 453 411 <?php 454 <?php else : ?> 412 455 413 456 <input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" /> … … 420 463 ?> 421 464 </p> 422 <br class="clear" /> 423 </div> 424 425 <?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?> 426 <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> 427 <?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?> 428 <?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?> 429 <?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?> 430 </div> 431 432 <?php 433 434 echo $form_pingback; 435 echo $form_prevstatus; 436 437 do_meta_boxes('post', 'normal', $post); 438 439 do_action('edit_form_advanced'); 440 441 do_meta_boxes('post', 'advanced', $post); 442 443 do_action('dbx_post_sidebar'); 444 445 ?> 446 447 </div> 448 </div> 449 </div> 450 465 </td></tr></tbody></table> 451 466 </div> 452 467 -
branches/crazyhorse/wp-admin/includes/template.php
r8339 r8371 1241 1241 foreach ( array('high', 'sorted', 'core', 'default', 'low') as $priority ) { 1242 1242 foreach ( (array) $wp_meta_boxes[$page][$context][$priority] as $box ) { 1243 if ( false == = $box)1243 if ( false == $box || ! $box['title'] ) 1244 1244 continue; 1245 1245 $i++; 1246 1246 echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes($box['id'], $page) . '">' . "\n"; 1247 echo "<h3> {$box['title']}</h3>\n";1247 echo "<h3><span class='hndle'>{$box['title']}</span></h3>\n"; 1248 1248 echo '<div class="inside">' . "\n"; 1249 1249 call_user_func($box['callback'], $object, $box); -
branches/crazyhorse/wp-admin/js/comment.js
r8300 r8371 1 1 jQuery(document).ready( function() { 2 add_postbox_toggles('comment');2 postboxes.add_postbox_toggles('comment'); 3 3 4 4 // close postboxes that should be closed -
branches/crazyhorse/wp-admin/js/common.js
r8268 r8371 26 26 27 27 el.mouseover(function(e) { 28 txt = el.attr('tip'), o = el.offset(); ;28 txt = el.attr('tip'), o = el.offset(); 29 29 30 30 clearTimeout(TT.sD); … … 51 51 // Temp 52 52 if ( !$('#post-search, #widget-search').size() ) { 53 $(' .wrap:first').append( '<p id="post-search"><input id="post-search-input" type="text" /><input class="button" type="button" value="Search" /></p>' );53 $('#wphead').append( '<p id="post-search-prep"><input id="post-search-input" type="text" /><input class="button" type="button" value="Search" /></p>' ); 54 54 } 55 56 // Temp 2 57 var minH = $(window).height()-185+"px" 58 $('#wpbody-content').css("min-height", minH); 59 55 60 56 61 } ); -
branches/crazyhorse/wp-admin/js/link.js
r8026 r8371 5 5 jQuery('#link_name').focus(); 6 6 // postboxes 7 add_postbox_toggles('link');7 postboxes.add_postbox_toggles('link'); 8 8 9 9 // category tabs -
branches/crazyhorse/wp-admin/js/page.js
r7529 r8371 1 1 jQuery(document).ready( function() { 2 add_postbox_toggles('page');2 postboxes.add_postbox_toggles('page'); 3 3 make_slugedit_clickable(); 4 4 -
branches/crazyhorse/wp-admin/js/post.js
r8286 r8371 70 70 71 71 // postboxes 72 add_postbox_toggles('post');72 postboxes.add_postbox_toggles('post'); 73 73 74 74 // Editable slugs … … 162 162 jQuery('.edit-timestamp').click(function () { 163 163 if (jQuery('#timestampdiv').is(":hidden")) { 164 jQuery('.curtime').slideUp("normal"); 164 165 jQuery('#timestampdiv').slideDown("normal"); 165 jQuery('.timestamp').hide();166 // jQuery('.timestamp').hide(); 166 167 } else { 167 jQuery('#timestampdiv'). hide();168 jQuery('#timestampdiv').slideUp("normal"); 168 169 jQuery('#mm').val(jQuery('#hidden_mm').val()); 169 170 jQuery('#jj').val(jQuery('#hidden_jj').val()); … … 171 172 jQuery('#hh').val(jQuery('#hidden_hh').val()); 172 173 jQuery('#mn').val(jQuery('#hidden_mn').val()); 173 jQuery('.timestamp').show(); 174 jQuery('.curtime').slideDown("normal"); 175 // jQuery('.timestamp').show(); 174 176 } 175 177 return false; … … 186 188 jQuery('#mn').val() + ' ' 187 189 ).append( link ); 190 jQuery('.curtime').slideDown("normal"); 188 191 return false; 189 192 }); -
branches/crazyhorse/wp-admin/js/postbox.js
r8291 r8371 1 function add_postbox_toggles(page) {2 jQuery('.postbox h3').before('<a class="togbox">+</a> ');3 jQuery('.postbox a.togbox').click( function() { jQuery(jQuery(this).parent().get(0)).toggleClass('closed'); save_postboxes_state(page); } );4 1 5 jQuery('#side-sortables').append( '<div id="make-it-tall" style="margin-bottom: -2000px; padding-bottom: 2001px"></div>' ); 6 jQuery('#wpbody-content').css( 'overflow', 'hidden' ); 2 (function($) { 3 postboxes = { 4 add_postbox_toggles : function(page) { 5 $('.postbox h3').before('<a class="togbox">+</a> '); 6 $('.postbox h3, .postbox a.togbox').click( function() { $($(this).parent().get(0)).toggleClass('closed'); save_postboxes_state(page); } ); 7 8 $('#side-sortables').append( '<div id="make-it-tall" style="margin-bottom: -2000px; padding-bottom: 2001px"></div>' ); 9 $('#wpbody-content').css( 'overflow', 'hidden' ); 10 11 this.init(page); 12 }, 13 14 expandSidebar : function( doIt ) { 15 if ( doIt || $.trim( $( '#side-info-column' ).text() ) ) { 16 $( '#post-body' ).addClass( 'has-sidebar' ); 17 $( '#side-sortables' ).css('z-index','0'); 18 } else { 19 $( '#post-body' ).removeClass( 'has-sidebar' ); 20 $( '#side-sortables' ).css('z-index','-1'); 21 } 22 }, 7 23 8 var expandSidebar = function( doIt ) { 9 if ( doIt || jQuery.trim( jQuery( '#side-info-column' ).text() ) ) { 10 jQuery( '#post-body' ).addClass( 'has-sidebar' ); 11 } else { 12 jQuery( '#post-body' ).removeClass( 'has-sidebar' ); 24 init : function(page) { 25 jQuery('.meta-box-sortables').sortable( { 26 connectWith: [ '.meta-box-sortables' ], 27 items: '> .postbox', 28 handle: '.hndle', 29 stop: function() { 30 if ( 'side-sortables' == this.id ) { // doing this with jQuery doesn't work for some reason: make-it-tall gets duplicated 31 var makeItTall = document.getElementById( 'make-it-tall' ); 32 var sideSort = makeItTall.parentNode; 33 sideSort.removeChild( makeItTall ); 34 sideSort.appendChild( makeItTall ); 35 36 } 37 var postVars = { 38 action: 'meta-box-order', 39 _ajax_nonce: jQuery('#meta-box-order-nonce').val(), 40 page: page 41 } 42 jQuery('.meta-box-sortables').each( function() { 43 postVars["order[" + this.id.split('-')[0] + "]"] = jQuery(this).sortable( 'toArray' ).join(','); 44 } ); 45 jQuery.post( postboxL10n.requestFile, postVars, function() { 46 postboxes.expandSidebar(); 47 } ); 48 }, 49 over: function(e, ui) { 50 if ( !ui.element.is( '#side-sortables' ) ) 51 return; 52 postboxes.expandSidebar( true ); 53 } 54 } ); 13 55 } 14 }; 56 } 57 }(jQuery)); 15 58 16 var postingMetaBox = false; // post once, not once per sortable 17 jQuery('.meta-box-sortables').sortable( { 18 connectWith: [ '.meta-box-sortables' ], 19 items: '> .postbox', 20 handle: 'h3', 21 update: function() { 22 if ( 'side-sortables' == this.id ) { // doing this with jQuery doesn't work for some reason: make-it-tall gets duplicated 23 var makeItTall = document.getElementById( 'make-it-tall' ); 24 var sideSort = makeItTall.parentNode; 25 sideSort.removeChild( makeItTall ); 26 sideSort.appendChild( makeItTall ); 27 28 } 29 if ( postingMetaBox ) { 30 return; 31 } 32 postingMetaBox = true; 33 var postVars = { 34 action: 'meta-box-order', 35 _ajax_nonce: jQuery('#meta-box-order-nonce').val(), 36 page: page 37 } 38 jQuery('.meta-box-sortables').each( function() { 39 postVars["order[" + this.id.split('-')[0] + "]"] = jQuery(this).sortable( 'toArray' ).join(','); 40 } ); 41 jQuery.post( postboxL10n.requestFile, postVars, function() { 42 postingMetaBox = false; 43 expandSidebar(); 44 } ); 45 }, 46 over: function(e, ui) { 47 if ( !ui.element.is( '#side-sortables' ) ) 48 return; 49 expandSidebar( true ); 50 } 51 } ); 52 } 59 jQuery(document).ready(function(){postboxes.expandSidebar();}); 53 60 54 61 function save_postboxes_state(page) { -
branches/crazyhorse/wp-admin/post.php
r8150 r8371 21 21 } elseif ( !empty($_POST['mode']) && 'sidebar' == $_POST['mode'] ) { 22 22 $location = 'sidebar.php?a=b'; 23 } elseif ( isset($_POST['save']) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {23 } elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) { 24 24 if ( $_POST['_wp_original_http_referer'] && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post.php') === false && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post-new.php') === false ) 25 25 $location = add_query_arg( '_wp_original_http_referer', urlencode( stripslashes( $_POST['_wp_original_http_referer'] ) ), "post.php?action=edit&post=$post_ID&message=1" ); 26 26 else 27 $location = "post.php?action=edit&post=$post_ID&message= 4";27 $location = "post.php?action=edit&post=$post_ID&message=6"; 28 28 } elseif (isset($_POST['addmeta']) && $_POST['addmeta']) { 29 29 $location = add_query_arg( 'message', 2, wp_get_referer() ); -
branches/crazyhorse/wp-admin/wp-admin.css
r8335 r8371 986 986 987 987 .submitbox { 988 margin: 1em 0; 988 /* margin: 1em 0; */ 989 989 } 990 990 … … 1252 1252 margin-bottom: 8px; 1253 1253 margin-right: 3px; 1254 padding: 6px 4px; 1255 border: none; 1254 padding: 6px; 1256 1255 } 1257 1256 … … 1378 1377 1379 1378 p#post-search { 1380 1381 1382 1383 1379 position: absolute; 1380 right: 0; 1381 top: -64px; 1382 margin: 0; 1384 1383 } 1385 1384 … … 1653 1652 padding: 1em .5em; 1654 1653 } 1654 1655 .hndle { 1656 cursor:move; 1657 padding:6px 10px 6px 0pt; 1658 } 1659 1660 a.togbox { 1661 cursor: pointer; 1662 } 1663 1664 1665 /* fixed bottom bar */ 1666 .postarea h3 label { 1667 float:none; 1668 } 1669 1670 #fixedbar { 1671 bottom:0pt; 1672 height:80px; 1673 position:fixed; 1674 width:100%; 1675 z-index: 100; 1676 } 1677 1678 #fixedbar #submitpost { 1679 width: 690px; 1680 } 1681 1682 #fixedbar .submit { 1683 padding-top: 10px; 1684 } 1685 1686 #fixedbar .button { 1687 border: 1px solid #464646; 1688 } 1689 1690 #fixedbar .button:hover { 1691 border: 1px solid #000; 1692 } 1693 1694 #fixedbar #publish { 1695 font-weight:bold; 1696 width:160px; 1697 } 1698 1699 #fixedbar #save-post { 1700 width:80px; 1701 font-weight:normal; 1702 } 1703 1704 #fixedbar .submitbox { 1705 padding: 14px 18px; 1706 border-left: 1px solid #aaa; 1707 } 1708 1709 #fixedbar #post-time-info { 1710 margin-top: 17px; 1711 } 1712 1713 #fixedbar #timestampdiv input, 1714 #fixedbar #timestampdiv select { 1715 background-color:#464646; 1716 border:1px solid #777777; 1717 color:#CCCCCC; 1718 padding:2px; 1719 } 1720 1721 #fixedbar-wrap { 1722 width: 100%; 1723 } 1724 1725 #preview-link { 1726 text-align: right; 1727 } 1728 1729 #preview-link a { 1730 padding-right:10px; 1731 } 1732 1733 p#post-search-prep { 1734 margin:0pt; 1735 position:absolute; 1736 right:20px; 1737 top:50px; 1738 } 1739 1740 #jj, #hh, #mn { 1741 width: 1.5em; 1742 } 1743 1744 #aa { 1745 width: 2.7em; 1746 } 1747 1748 1749 1750 1751 1752 1753
Note: See TracChangeset
for help on using the changeset viewer.