Changeset 20164
- Timestamp:
- 03/09/2012 01:30:11 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/colors-classic.dev.css
r20149 r20164 288 288 } 289 289 290 .submit { 291 border-color: #DFDFDF; 290 .submit, 291 #commentsdiv #add-new-comment { 292 border-color: #dfdfdf; 292 293 } 293 294 -
trunk/wp-admin/css/colors-fresh.dev.css
r20149 r20164 296 296 } 297 297 298 .submit { 299 border-color: #DFDFDF; 298 .submit, 299 #commentsdiv #add-new-comment { 300 border-color: #dfdfdf; 300 301 } 301 302 … … 1534 1535 1535 1536 div.widgets-sortables, 1536 #widgets-left .inactive { 1537 background-color: #fcfcfc; 1538 border-color: #dfdfdf; 1539 } 1540 1537 #widgets-left .inactive, 1541 1538 #available-widgets .widget-holder { 1542 1539 background-color: #fcfcfc; … … 1665 1662 } 1666 1663 1667 .list-container { 1668 border-color: #DFDFDF; 1669 } 1670 1664 .list-container, 1671 1665 .menu-item-handle { 1672 1666 border-color: #dfdfdf; -
trunk/wp-admin/css/wp-admin.dev.css
r20140 r20164 2401 2401 } 2402 2402 2403 #commentsdiv .fixed .column-author,2404 2403 #comments-form .fixed .column-author { 2405 2404 width: 20%; … … 2411 2410 } 2412 2411 2413 #commentsdiv .postbox.inside .row-actions {2412 #commentsdiv .inside .row-actions { 2414 2413 line-height:18px; 2415 2414 } 2416 2415 2417 #commentsdiv.postbox .inside td { 2418 padding:1em 10px; 2419 } 2420 2421 #commentsdiv.postbox .inside .column-author { 2422 width:33%; 2423 } 2424 2425 #commentsdiv.postbox .inside p { 2426 margin:6px 10px 8px; 2427 } 2428 2429 #commentsdiv.postbox .column-comment p { 2430 margin:0.6em 0; 2431 } 2432 2433 #commentsdiv.postbox #replyrow td { 2434 padding:0; 2416 #commentsdiv .inside .column-author { 2417 width: 25%; 2418 } 2419 2420 #commentsdiv .column-comment p { 2421 margin: 0.6em 0; 2422 padding: 0; 2423 } 2424 2425 #commentsdiv #replyrow td { 2426 padding: 0; 2427 } 2428 2429 #commentsdiv p { 2430 padding: 8px 10px; 2431 margin: 0; 2432 } 2433 2434 #commentsdiv #add-new-comment { 2435 border-width: 0 0 1px; 2436 border-style: none none solid; 2437 } 2438 2439 #commentsdiv .comments-box { 2440 border: 0 none; 2441 } 2442 2443 #commentsdiv .comments-box thead th { 2444 background: transparent; 2445 padding: 0 7px 4px; 2446 font-style: italic; 2447 } 2448 2449 #commentsdiv .comments-box tr:last-child td { 2450 border-bottom: 0 none; 2451 } 2452 2453 #commentsdiv img.waiting { 2454 padding-left: 5px; 2435 2455 } 2436 2456 … … 3113 3133 float: none; 3114 3134 margin: 0; 3115 padding: 3px 7px;3135 padding: 0 7px 5px; 3116 3136 } 3117 3137 … … 3127 3147 } 3128 3148 3129 #side-sortables .comments-box,3130 #normal-sortables .comments-box {3131 border: 0 none;3132 }3133 3134 3149 ul.category-tabs, 3135 3150 ul.add-menu-item-tabs, 3136 3151 ul.wp-tab-bar { 3137 3152 margin-top: 12px; 3138 }3139 3140 #side-sortables .comments-box thead th,3141 #normal-sortables .comments-box thead th {3142 background: transparent;3143 padding: 0 7px 4px;3144 font-style: italic;3145 3153 } 3146 3154 … … 3150 3158 border-style: solid solid none; 3151 3159 border-width: 1px 1px 0; 3152 }3153 3154 #commentsdiv img.waiting {3155 padding-left: 5px;3156 3160 } 3157 3161 -
trunk/wp-admin/includes/meta-boxes.php
r20077 r20164 472 472 global $wpdb, $post_ID; 473 473 474 wp_nonce_field( 'get-comments', 'add_comment_nonce', false ); 475 ?> 476 <p class="hide-if-no-js" id="add-new-comment"><a href="#commentstatusdiv" onclick="commentReply.addcomment(<?php echo $post_ID; ?>);return false;"><?php _e('Add comment'); ?></a></p> 477 <?php 478 474 479 $total = $wpdb->get_var($wpdb->prepare("SELECT count(1) FROM $wpdb->comments WHERE comment_post_ID = '%d' AND ( comment_approved = '0' OR comment_approved = '1')", $post_ID)); 475 476 if ( 1 > $total ) {477 echo '<p>' . __('No comments yet.') . '</p>';478 return;479 }480 481 wp_nonce_field( 'get-comments', 'add_comment_nonce', false );482 483 480 $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); 484 481 $wp_list_table->display( true ); 485 ?> 486 <p class="hide-if-no-js"><a href="#commentstatusdiv" id="show-comments" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /></p> 487 <?php 488 $hidden = get_hidden_meta_boxes('post'); 489 if ( ! in_array('commentsdiv', $hidden) ) { ?> 490 <script type="text/javascript">jQuery(document).ready(function(){commentsBox.get(<?php echo $total; ?>, 10);});</script> 491 <?php 482 483 if ( 1 > $total ) { 484 echo '<p id="no-comments">' . __('No comments yet.') . '</p>'; 485 } else { 486 $hidden = get_hidden_meta_boxes('post'); 487 if ( ! in_array('commentsdiv', $hidden) ) { 488 ?> 489 <script type="text/javascript">jQuery(document).ready(function(){commentsBox.get(<?php echo $total; ?>, 10);});</script> 490 <?php 491 } 492 492 } 493 494 ?> 495 <p class="hide-if-no-js hidden" id="show-comments"><a href="#commentstatusdiv" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /></p> 496 <?php 497 493 498 wp_comment_trashnotice(); 494 499 } -
trunk/wp-admin/includes/template.php
r19929 r20164 315 315 <?php endif; ?> 316 316 <div id="replyhead" style="display:none;"><h5><?php _e( 'Reply to Comment' ); ?></h5></div> 317 317 <div id="addhead" style="display:none;"><h5><?php _e('Add new Comment'); ?></h5></div> 318 318 <div id="edithead" style="display:none;"> 319 319 <div class="inside"> … … 344 344 <a href="#comments-form" class="cancel button-secondary alignleft" tabindex="106"><?php _e('Cancel'); ?></a> 345 345 <a href="#comments-form" class="save button-primary alignright" tabindex="104"> 346 <span id="addbtn" style="display:none;"><?php _e('Add Comment'); ?></span> 346 347 <span id="savebtn" style="display:none;"><?php _e('Update Comment'); ?></span> 347 348 <span id="replybtn" style="display:none;"><?php _e('Submit Reply'); ?></span></a> -
trunk/wp-admin/js/edit-comments.dev.js
r19895 r20164 346 346 347 347 close : function() { 348 var c; 349 350 if ( this.cid ) { 348 var c, replyrow = $('#replyrow'); 349 350 // replyrow is not showing? 351 if ( replyrow.parent().is('#com-reply') ) 352 return; 353 354 if ( this.cid && this.act == 'edit-comment' ) { 351 355 c = $('#comment-' + this.cid); 352 353 if ( typeof QTags != 'undefined' )354 QTags.closeAllTags('replycontent'); 355 356 if ( this.act == 'edit-comment' )357 c.fadeIn(300, function(){ c.show() }).css('backgroundColor', '');358 359 $('#replyrow').hide();360 $('#com-reply').append( $('#replyrow') ); 361 $('#replycontent').val('');362 $('input', '#edithead').val('');363 $('.error', '#replysubmit').html('').hide();364 $('.waiting', '#replysubmit').hide();365 $('#replycontent').css('height', '');366 367 this.cid = ''; 368 }369 }, 370 371 open : function( id, p, a) {372 var t = this, editRow, rowData, act, c = $('#comment-' + id), h = c.height(), replyButton;356 c.fadeIn(300, function(){ c.show() }).css('backgroundColor', ''); 357 } 358 359 // reset the Quicktags buttons 360 if ( typeof QTags != 'undefined' ) 361 QTags.closeAllTags('replycontent'); 362 363 $('#add-new-comment').css('display', ''); 364 365 replyrow.hide(); 366 $('#com-reply').append( replyrow ); 367 $('#replycontent').css('height', '').val(''); 368 $('#edithead input').val(''); 369 $('.error', replyrow).html('').hide(); 370 $('.waiting', replyrow).hide(); 371 372 this.cid = ''; 373 }, 374 375 open : function(comment_id, post_id, action) { 376 var t = this, editRow, rowData, act, c = $('#comment-' + comment_id), h = c.height(), replyButton; 373 377 374 378 t.close(); 375 t.cid = id;379 t.cid = comment_id; 376 380 377 381 editRow = $('#replyrow'); 378 rowData = $('#inline-'+id); 379 act = t.act = (a == 'edit') ? 'edit-comment' : 'replyto-comment'; 382 rowData = $('#inline-'+comment_id); 383 action = action || 'replyto'; 384 act = 'edit' == action ? 'edit' : 'replyto'; 385 act = t.act = act + '-comment'; 380 386 381 387 $('#action', editRow).val(act); 382 $('#comment_post_ID', editRow).val(p );383 $('#comment_ID', editRow).val( id);388 $('#comment_post_ID', editRow).val(post_id); 389 $('#comment_ID', editRow).val(comment_id); 384 390 385 391 if ( h > 120 ) 386 392 $('#replycontent', editRow).css('height', (35+h) + 'px'); 387 393 388 if ( a == 'edit' ) {394 if ( action == 'edit' ) { 389 395 $('#author', editRow).val( $('div.author', rowData).text() ); 390 396 $('#author-email', editRow).val( $('div.author-email', rowData).text() ); … … 393 399 $('#replycontent', editRow).val( $('textarea.comment', rowData).val() ); 394 400 $('#edithead, #savebtn', editRow).show(); 395 $('#replyhead, #replybtn ', editRow).hide();401 $('#replyhead, #replybtn, #addhead, #addbtn', editRow).hide(); 396 402 397 403 c.after( editRow ).fadeOut('fast', function(){ 398 404 $('#replyrow').fadeIn(300, function(){ $(this).show() }); 399 405 }); 400 } else { 401 replyButton = $('#replybtn', editRow); 402 $('#edithead, #savebtn', editRow).hide(); 406 } else if ( action == 'add' ) { 407 $('#addhead, #addbtn', editRow).show(); 408 $('#replyhead, #replybtn, #edithead, #editbtn', editRow).hide(); 409 $('#the-comment-list').prepend(editRow); 410 $('#replyrow').fadeIn(300); 411 } else { 412 replyButton = $('#replybtn', editRow); 413 $('#edithead, #savebtn, #addhead, #addbtn', editRow).hide(); 403 414 $('#replyhead, #replybtn', editRow).show(); 404 415 c.after(editRow); … … 443 454 444 455 $('#replyrow input').not(':button').each(function() { 445 post[ $(this).attr('name') ] = $(this).val(); 456 var t = $(this); 457 post[ t.attr('name') ] = t.val(); 446 458 }); 447 459 … … 484 496 c = r.data; 485 497 id = '#comment-' + r.id; 498 486 499 if ( 'edit-comment' == t.act ) 487 500 $(id).remove(); … … 528 541 $('#replysubmit .error').html(er).show(); 529 542 543 }, 544 545 addcomment: function(post_id) { 546 var t = this; 547 548 $('#add-new-comment').fadeOut(200, function(){ 549 t.open(0, post_id, 'add'); 550 $('table.comments-box').css('display', ''); 551 $('#no-comments').remove(); 552 }); 530 553 } 531 554 }; -
trunk/wp-admin/js/post.dev.js
r19853 r20164 212 212 $('#show-comments').hide(); 213 213 else 214 $('#show-comments').html(postL10n.showcomm); 214 $('#show-comments').show().children('a').html(postL10n.showcomm); 215 215 216 return; 216 217 } else if ( 1 == r ) { 217 $('#show-comments'). parent().html(postL10n.endcomm);218 $('#show-comments').html(postL10n.endcomm); 218 219 return; 219 220 } -
trunk/wp-includes/css/editor-buttons.dev.css
r19712 r20164 1083 1083 border-top-left-radius: 3px; 1084 1084 padding: 2px 8px 0; 1085 min-height: 30px;1085 min-height: 29px; 1086 1086 } 1087 1087
Note: See TracChangeset
for help on using the changeset viewer.