Changeset 8913
- Timestamp:
- 09/17/2008 12:50:34 AM (16 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-comment.php
r8697 r8913 21 21 <h2><?php echo $toprow_title; ?></h2> 22 22 23 <div id="previewview">24 <a class="button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View this Comment'); ?></a>25 </div>26 23 <div id="poststuff"> 27 24 <input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" /> … … 30 27 // All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action). 31 28 32 function comment_submit_meta_box($comment) { 29 function comment_submit_meta_box($comment) { // not used, but keeping for a bit longer in case it's needed 33 30 ?> 34 31 <div class="submitbox" id="submitcomment"> … … 39 36 <select name='comment_status' id='comment_status'> 40 37 <option<?php selected( $comment->comment_approved, '1' ); ?> value='1'><?php _e('Approved') ?></option> 41 <option<?php selected( $comment->comment_approved, '0' ); ?> value='0'><?php _e(' Moderated') ?></option>38 <option<?php selected( $comment->comment_approved, '0' ); ?> value='0'><?php _e('Awaiting Moderation') ?></option> 42 39 <option<?php selected( $comment->comment_approved, 'spam' ); ?> value='spam'><?php _e('Spam') ?></option> 43 40 </select> 44 41 </p> 42 43 <div class="insidebox" id="deletebutton"> 44 <?php 45 echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&c=$comment->comment_ID&_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>"; ?> 46 </div> 45 47 46 48 <?php … … 49 51 $time = mysql2date(get_option('time_format'), $comment->comment_date); 50 52 ?> 51 <p class="curtime"><?php printf($stamp, $date, $time); ?> 52 <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><?php _e('Edit') ?></a></p> 53 54 <div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div> 53 <div class="insidebox curtime"><span id="timestamp"><?php printf($stamp, $date, $time); ?></span> 54 <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> 55 <div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div></div> 55 56 56 57 </div> … … 58 59 <p class="submit"> 59 60 <input type="submit" name="save" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" /> 60 <?php 61 echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&c=$comment->comment_ID&_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>"; 62 ?> 61 <a class="preview button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View Comment'); ?></a> 63 62 </p> 64 63 </div> 65 64 <?php 66 65 } 67 add_meta_box('submitdiv', __('Save'), 'comment_submit_meta_box', 'comment', 'side', 'core');66 // add_meta_box('submitdiv', __('Save'), 'comment_submit_meta_box', 'comment', 'side', 'core'); 68 67 ?> 69 68 70 69 <div id="side-info-column" class="inner-sidebar"> 70 <div id="submitdiv" class="stuffbox" > 71 <h3><span class='hndle'>Save</span></h3> 71 72 72 <?php $side_meta_boxes = do_meta_boxes('comment', 'side', $comment); ?> 73 <div class="submitbox" id="submitcomment"> 74 <div class="inside-submitbox"> 73 75 76 <div class="insidebox"><strong><label for='comment_status'><?php _e('This comment is') ?></label></strong><br /> 77 <select name='comment_status' id='comment_status'> 78 <option<?php selected( $comment->comment_approved, '1' ); ?> value='1'><?php _e('Approved') ?></option> 79 <option<?php selected( $comment->comment_approved, '0' ); ?> value='0'><?php _e('Awaiting Moderation') ?></option> 80 <option<?php selected( $comment->comment_approved, 'spam' ); ?> value='spam'><?php _e('Spam') ?></option> 81 </select> 82 </div> 83 84 <div class="insidebox" id="deletebutton"> 85 <?php 86 echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&c=$comment->comment_ID&_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>"; ?> 87 </div> 88 89 <?php 90 $stamp = __('%1$s at %2$s'); 91 $date = mysql2date(get_option('date_format'), $comment->comment_date); 92 $time = mysql2date(get_option('time_format'), $comment->comment_date); 93 ?> 94 <div class="insidebox curtime"><span id="timestamp"><?php printf($stamp, $date, $time); ?></span> <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> 95 <div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div></div> 96 97 </div> 98 99 <p class="submit"> 100 <input type="submit" name="save" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" /> 101 <a class="preview button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View Comment'); ?></a> 102 </p> 103 </div> 104 105 </div> 74 106 </div> 75 107 -
trunk/wp-admin/js/comment.js
r8691 r8913 1 jQuery(document).ready( function( ) {1 jQuery(document).ready( function($) { 2 2 postboxes.add_postbox_toggles('comment'); 3 3 … … 9 9 jQuery('.hide-if-js').hide(); 10 10 11 jQuery('.edit-timestamp').click(function () { 12 if (jQuery('#timestampdiv').is(":hidden")) { 13 jQuery('#curtime').slideUp("normal"); 14 jQuery('#timestampdiv').slideDown("normal"); 15 } else { 16 jQuery('#timestampdiv').slideUp("normal"); 17 jQuery('#mm').val(jQuery('#hidden_mm').val()); 18 jQuery('#jj').val(jQuery('#hidden_jj').val()); 19 jQuery('#aa').val(jQuery('#hidden_aa').val()); 20 jQuery('#hh').val(jQuery('#hidden_hh').val()); 21 jQuery('#mn').val(jQuery('#hidden_mn').val()); 22 jQuery('#curtime').slideDown("normal"); 11 var stamp = $('#timestamp').html(); 12 $('.edit-timestamp').click(function () { 13 if ($('#timestampdiv').is(":hidden")) { 14 $('#timestampdiv').slideDown("normal"); 15 $('.edit-timestamp').hide(); 23 16 } 17 24 18 return false; 25 19 }); 26 20 27 jQuery('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels 28 jQuery('#timestampdiv').hide(); 29 var link = jQuery('.timestamp a').clone( true ); 30 jQuery('.timestamp').show().html( 31 jQuery( '#mm option[value=' + jQuery('#mm').val() + ']' ).text() + ' ' + 32 jQuery('#jj').val() + ',' + 33 jQuery('#aa').val() + '@' + 34 jQuery('#hh').val() + ':' + 35 jQuery('#mn').val() + ' ' 36 ).append( link ); 37 jQuery('#curtime').slideDown("normal"); 21 $('.cancel-timestamp').click(function() { 22 $('#timestampdiv').slideUp("normal"); 23 $('#mm').val($('#hidden_mm').val()); 24 $('#jj').val($('#hidden_jj').val()); 25 $('#aa').val($('#hidden_aa').val()); 26 $('#hh').val($('#hidden_hh').val()); 27 $('#mn').val($('#hidden_mn').val()); 28 $('#timestamp').html(stamp); 29 $('.edit-timestamp').show(); 30 31 return false; 32 }); 33 34 $('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels 35 $('#timestampdiv').slideUp("normal"); 36 $('.edit-timestamp').show(); 37 $('#timestamp').html( 38 $( '#mm option[value=' + $('#mm').val() + ']' ).text() + ' ' + 39 $('#jj').val() + ', ' + 40 $('#aa').val() + ' @ ' + 41 $('#hh').val() + ':' + 42 $('#mn').val() + ' ' 43 ); 44 38 45 return false; 39 46 }); -
trunk/wp-admin/wp-admin.css
r8909 r8913 1098 1098 } 1099 1099 1100 #side-sortables .inside-submitbox .insidebox { 1100 #side-sortables .inside-submitbox .insidebox, 1101 .stuffbox .insidebox { 1101 1102 margin: 11px 0; 1102 1103 }
Note: See TracChangeset
for help on using the changeset viewer.