Changeset 9098
- Timestamp:
- 10/08/2008 01:18:16 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r9083 r9098 445 445 $comment_author_email = $wpdb->escape($user->user_email); 446 446 $comment_author_url = $wpdb->escape($user->user_url); 447 $comment_content = trim($_POST['co mment']);447 $comment_content = trim($_POST['content']); 448 448 if ( current_user_can('unfiltered_html') ) { 449 449 if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) { … … 482 482 $x->add( array( 483 483 'what' => 'comment', 484 'id' => $comment->comment_ID, 485 'data' => $comment_list_item, 486 'position' => $position 487 )); 488 489 $x->send(); 490 break; 491 case 'edit-comment' : 492 check_ajax_referer( 'replyto-comment' ); 493 494 $comment_post_ID = (int) $_POST['comment_post_ID']; 495 if ( ! current_user_can( 'edit_post', $comment_post_ID ) ) 496 die('-1'); 497 498 if ( '' == $_POST['content'] ) 499 die( __('Error: please type a comment.') ); 500 501 $comment_id = (int) $_POST['comment_ID']; 502 $_POST['comment_status'] = $_POST['status']; 503 edit_comment(); 504 505 $mode = ( isset($_POST['mode']) && 'single' == $_POST['mode'] ) ? 'single' : 'detail'; 506 $position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1'; 507 $checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0; 508 509 if ( get_option('show_avatars') && 'single' != $mode ) 510 add_filter( 'comment_author', 'floated_admin_avatar' ); 511 512 $x = new WP_Ajax_Response(); 513 514 ob_start(); 515 _wp_comment_row( $comment_id, $mode, false, $checkbox ); 516 $comment_list_item = ob_get_contents(); 517 ob_end_clean(); 518 519 $x->add( array( 520 'what' => 'edit_comment', 484 521 'id' => $comment->comment_ID, 485 522 'data' => $comment_list_item, -
trunk/wp-admin/css/colors-classic.css
r9063 r9098 27 27 div#current-widgets, #postcustomstuff table, #your-profile fieldset, 28 28 a.page-numbers, #rightnow, div.dashboard-widget, 29 #dashboard-widgets p.dashboard-widget-links, .widefat { 29 #dashboard-widgets p.dashboard-widget-links, .widefat, 30 #replyrow #ed_reply_toolbar input { 30 31 border-color: #ccc; 31 32 } … … 64 65 .form-table tr, #poststuff h3, #replyhandle, 65 66 .login form, h3.info-box-title, #post-status-info, #edit-settings-wrap, 66 #wpbody-content .describe tr {67 #wpbody-content .describe tr, #edithead, #replyhead { 67 68 background-color: #cfebf7; 68 69 } … … 861 862 /* inline editor */ 862 863 .inline-editor input, 863 .inline-editor textarea { 864 .inline-editor textarea, 865 #replyrow input { 864 866 border-color: #ddd; 865 867 } … … 881 883 background-color: #CFEBF7; 882 884 } 885 886 #replyrow #ed_reply_toolbar input:hover { 887 border-color: #aaa; 888 background: #ddd; 889 } -
trunk/wp-admin/css/colors-fresh.css
r9063 r9098 27 27 div#current-widgets, #postcustomstuff table, #your-profile fieldset, 28 28 a.page-numbers, #rightnow, div.dashboard-widget, 29 #dashboard-widgets p.dashboard-widget-links, .widefat { 29 #dashboard-widgets p.dashboard-widget-links, .widefat, 30 #replyrow #ed_reply_toolbar input { 30 31 border-color: #ccc; 31 32 } … … 64 65 .form-table tr, #poststuff h3, #replyhandle, 65 66 .login form, h3.info-box-title, #post-status-info, #edit-settings-wrap, 66 #wpbody-content .describe tr {67 #wpbody-content .describe tr, #edithead, #replyhead { 67 68 background-color: #eaf3fa; 68 69 } … … 840 841 /* inline editor */ 841 842 .inline-editor input, 842 .inline-editor textarea { 843 .inline-editor textarea, 844 #replyrow input { 843 845 border-color: #ddd; 844 846 } … … 860 862 background-color: #EAF3FA; 861 863 } 864 865 #replyrow #ed_reply_toolbar input:hover { 866 border-color: #aaa; 867 background: #ddd; 868 } -
trunk/wp-admin/includes/template.php
r9083 r9098 192 192 * 193 193 * @since 2.7 194 * 194 * 195 195 * Outputs the HTML for the hidden table rows used in Categories, Link Caregories and Tags quick edit. 196 196 * 197 197 * @param string $type "tag", "category" or "link-category" 198 * @return 198 * @return 199 199 */ 200 200 function inline_edit_term_row($type) { … … 260 260 <a accesskey="c" href="#inline-edit" title="<?php _e('Cancel'); ?>" class="button-secondary cancel"><?php _e('Cancel'); ?></a> 261 261 <a accesskey="s" href="#inline-edit" title="<?php _e('Save'); ?>" class="button-secondary save"><?php _e('Save'); ?></a> 262 <span class="hidden error"></span> 262 <img class="waiting" style="display:none;" src="images/loading.gif" alt="" /> 263 <span class="error" style="display:none;"></span> 263 264 <?php wp_nonce_field( 'taxinlineeditnonce', '_inline_edit', false ); ?> 264 265 </div> … … 893 894 * {@internal Missing Short Description}} 894 895 * 895 * Outputs the quick edit and bulk edit table rows 896 * 896 * Outputs the quick edit and bulk edit table rows for posts and pages 897 * 897 898 * @since 2.7 898 899 * … … 1130 1131 <a accesskey="c" href="#inline-edit" title="<?php _e('Cancel'); ?>" class="button-secondary cancel"><?php _e('Cancel'); ?></a> 1131 1132 <a accesskey="s" href="#inline-edit" title="<?php _e('Save'); ?>" class="button-secondary save"><?php _e('Save'); ?></a> 1132 <?php if ( ! $bulk ) wp_nonce_field( 'inlineeditnonce', '_inline_edit', false ); ?> 1133 <?php if ( ! $bulk ) { 1134 wp_nonce_field( 'inlineeditnonce', '_inline_edit', false ); ?> 1135 <img class="waiting" style="display:none;" src="images/loading.gif" alt="" /> 1136 <?php } ?> 1133 1137 <input type="hidden" name="post_view" value="<?php echo $m; ?>" /> 1134 1138 </div> … … 1141 1145 } 1142 1146 1143 // adds hidden fields with the data for use in the inline editor 1147 // adds hidden fields with the data for use in the inline editor for posts and pages 1144 1148 /** 1145 1149 * {@internal Missing Short Description}} … … 1970 1974 case 'comment': 1971 1975 echo "<td $attributes>"; 1972 if ( 'detail' == $mode || 'single' == $mode ) comment_text(); 1973 1976 if ( 'detail' == $mode || 'single' == $mode ) comment_text(); ?> 1977 <div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden"> 1978 <textarea class="comment"><?php echo $comment->comment_content; ?></textarea> 1979 <div class="author-email"><?php echo attribute_escape( $comment->comment_author_email ); ?></div> 1980 <div class="author"><?php echo attribute_escape( $comment->comment_author ); ?></div> 1981 <div class="author-url"><?php echo attribute_escape( $comment->comment_author_url ); ?></div> 1982 <div class="comment_status"><?php echo $comment->comment_approved; ?></div> 1983 </div> 1984 <?php 1974 1985 $actions = array(); 1975 1986 … … 1990 2001 $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>'; 1991 2002 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>'; 2003 $actions['quickedit'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',\'edit\');return false;" class="vim-q" title="'.__('Quick Edit').'" href="#">' . __('Quick Edit') . '</a>'; 1992 2004 if ( 'spam' != $the_comment_status ) 1993 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\' ,this);return false;" class="vim-r" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';2005 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\');return false;" class="vim-r" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; 1994 2006 1995 2007 $actions = apply_filters( 'comment_row_actions', $actions, $comment ); 1996 2008 1997 $action_count = count($actions);1998 2009 $i = 0; 1999 2010 foreach ( $actions as $action => $link ) { 2000 2011 ++$i; 2001 ( $i == $action_count ) ? $sep = '' : $sep = ' | '; 2002 // The action before reply shouldn't output a sep 2003 if ( 'edit' == $action ) 2004 $sep = ''; 2005 // Reply needs a hide-if-no-js span 2006 if ( 'reply' == $action ) 2007 echo "<span class='$action'><span class='hide-if-no-js'> | $link</span>$sep</span>"; 2008 else 2009 echo "<span class='$action'>$link$sep</span>"; 2012 ( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | '; 2013 2014 // Reply and quickedit need a hide-if-no-js span 2015 if ( 'reply' == $action || 'quickedit' == $action ) 2016 $action .= ' hide-if-no-js'; 2017 2018 echo "<span class='$action'>$sep$link</span>"; 2010 2019 } 2011 2020 } … … 2054 2063 2055 2064 // allow plugin to replace the popup content 2056 $content = apply_filters( 'wp_comment_reply', '', array('position' =>$position, 'checkbox'=>$checkbox, 'mode'=>$mode) );2065 $content = apply_filters( 'wp_comment_reply', '', array('position' => $position, 'checkbox' => $checkbox, 'mode' => $mode) ); 2057 2066 2058 2067 if ( ! empty($content) ) { … … 2061 2070 } 2062 2071 ?> 2063 <div id="replyerror" style="display:none;"> 2064 <img src="images/logo.gif" /> 2065 <h3 class="info-box-title"><?php _e('Comment Reply Error'); ?></h3> 2066 <p id="replyerrtext"></p> 2067 <p class="submit"><button id="close-button" onclick="commentReply.close();" class="button"><?php _e('Close'); ?></button> 2068 <button id="back-button" onclick="commentReply.back();" class="button"><?php _e('Go back'); ?></button></p> 2072 <form method="get" action=""><table style="display:none;"><tbody id="com-reply"> 2073 <tr id="replyrow"><td colspan="6"> 2074 <div id="replyhead" style="display:none;"><?php _e('Reply to Comment'); ?></div> 2075 2076 <div id="edithead" style="display:none;"> 2077 <div id="edittitle"><?php _e('Edit Comment'); ?></div> 2078 2079 <div class="inside"> 2080 <label for="author"><?php _e('Name') ?></label> 2081 <input type="text" name="newcomment_author" size="50" value="" tabindex="101" id="author" /> 2082 </div> 2083 2084 <div class="inside"> 2085 <label for="author-email"><?php _e('E-mail') ?></label> 2086 <input type="text" name="newcomment_author_email" size="50" value="" tabindex="102" id="author-email" /> 2087 </div> 2088 2089 <div class="inside"> 2090 <label for="author-url"><?php _e('URL') ?></label> 2091 <input type="text" id="author-url" name="newcomment_author_url" size="103" value="" tabindex="103" /> 2092 </div> 2093 <div style="clear:both;"></div> 2069 2094 </div> 2070 2095 2071 <div id="replydiv" style="display:none;"> 2072 <p id="replyhandle"><?php _e('Reply'); ?></p> 2073 <form action="" method="post" id="replyform"> 2096 <div id="replycontainer"><textarea rows="8" cols="40" name="replycontent" tabindex="104" id="replycontent"></textarea></div> 2097 2098 <p id="replysubmit"> 2099 <a href="#comments-form" class="cancel button" tabindex="106"><?php _e('Cancel'); ?></a> 2100 <a href="#comments-form" class="save button" tabindex="105"> 2101 <span id="savebtn" style="display:none;"><?php _e('Save'); ?></span> 2102 <span id="replybtn" style="display:none;"><?php _e('Submit Reply'); ?></span></a> 2103 <img class="waiting" style="display:none;" src="images/loading.gif" alt="" /> 2104 <span class="error" style="display:none;"></span> 2105 </p> 2106 2074 2107 <input type="hidden" name="user_ID" id="user_ID" value="<?php echo $current_user->ID; ?>" /> 2075 <input type="hidden" name="action" value="replyto-comment" />2108 <input type="hidden" name="action" id="action" value="" /> 2076 2109 <input type="hidden" name="comment_ID" id="comment_ID" value="" /> 2077 2110 <input type="hidden" name="comment_post_ID" id="comment_post_ID" value="" /> 2111 <input type="hidden" name="status" id="status" value="" /> 2078 2112 <input type="hidden" name="position" id="position" value="<?php echo $position; ?>" /> 2079 2113 <input type="hidden" name="checkbox" id="checkbox" value="<?php echo $checkbox ? 1 : 0; ?>" /> … … 2081 2115 <?php wp_nonce_field( 'replyto-comment', '_ajax_nonce', false ); ?> 2082 2116 <?php wp_comment_form_unfiltered_html_nonce(); ?> 2083 2084 <?php echo apply_filters( 'wp_comment_reply_content', ' 2085 <div id="replycontainer"><textarea rows="5" cols="40" name="replycontent" tabindex="1000" id="replycontent"></textarea></div> 2086 '); ?> 2087 2088 <p id="replysubmit"><input type="button" onclick="commentReply.close();" class="button" tabindex="1002" value="<?php _e('Cancel'); ?>" /> 2089 <input type="button" onclick="commentReply.send();" class="button" tabindex="1001" value="<?php _e('Submit Reply'); ?>" /></p> 2090 </form> 2091 </div> 2117 </td></tr> 2118 </tbody></table></form> 2092 2119 <?php 2093 2120 } … … 2987 3014 /** 2988 3015 * Display the post password. 2989 * 3016 * 2990 3017 * The password is passed through {@link attribute_escape()} to ensure that it 2991 3018 * is safe for placing in an html attribute. … … 3024 3051 /** 3025 3052 * Get the post title. 3026 * 3053 * 3027 3054 * The post title is fetched and if it is blank then a default string is 3028 3055 * returned. … … 3030 3057 * @since 2.7.0 3031 3058 * @param int $id The post id. If not supplied the global $post is used. 3032 * 3059 * 3033 3060 */ 3034 3061 function _draft_or_post_title($post_id = 0) … … 3042 3069 /** 3043 3070 * Display the search query. 3044 * 3071 * 3045 3072 * A simple wrapper to display the "s" parameter in a GET URI. This function 3046 3073 * should only be used when {@link the_search_query()} cannot. … … 3048 3075 * @uses attribute_escape 3049 3076 * @since 2.7.0 3050 * 3077 * 3051 3078 */ 3052 3079 function _admin_search_query() { -
trunk/wp-admin/js/edit-comments.js
r8988 r9098 30 30 }); 31 31 }; 32 32 33 33 var delAfter = function( r, settings ) { 34 34 $('li span.comment-count').each( function() { … … 68 68 a.html( n.toString() ); 69 69 }); 70 70 71 71 if ( theExtraList.size() == 0 || theExtraList.children().size() == 0 ) { 72 72 return; 73 73 } 74 74 75 75 theList.get(0).wpList.add( theExtraList.children(':eq(0)').remove().clone() ); 76 76 $('#get-extra-comments').submit(); … … 79 79 theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } ); 80 80 theList = $('#the-comment-list').wpList( { alt: '', dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } ); 81 81 82 }; 82 83 … … 87 88 commentReply = { 88 89 89 open : function(c, p) { 90 var d = $('#comment-'+c).offset(), H = $('#replydiv').height(), top = 200, left = 100, h = 120; 91 92 if ( d && H ) { 93 top = (d.top - H) < 10 ? 10 : d.top - H - 5; 94 left = d.left; 95 } 96 97 $('#replydiv #comment_post_ID').val(p); 98 $('#replydiv #comment_ID').val(c); 99 100 $('#replydiv').draggable({ 101 handle : '#replyhandle', 102 containment : '#wpwrap' 103 }).resizable({ 104 handles : 'se', 105 minHeight : 200, 106 minWidth : 400, 107 containment : '#wpwrap', 108 resize : function(e,o) { 109 h = o.size.height - 80 - $('#ed_reply_qtags').height(); 110 $('#replycontainer').height(h); 111 }, 112 stop : function(e,o) { 90 init : function() { 91 this.rows = $('#the-comment-list tr'); 92 var row = $('#replyrow'); 93 94 $('a.cancel', row).click(function() { return commentReply.revert(); }); 95 $('a.save', row).click(function() { return commentReply.send(this); }); 96 97 // add events 98 this.addEvents(this.rows); 99 100 $('#doaction, #doaction2, #post-query-submit').click(function(e){ 101 if ( $('#the-comment-list #replyrow').length > 0 ) 102 t.close(); 103 }); 104 105 }, 106 107 addEvents : function(r) { 108 r.each(function() { 109 $(this).dblclick(function(){ 110 commentReply.toggle(this); 111 }); 112 }); 113 }, 114 115 toggle : function(el) { 116 if ( $(el).css('display') != 'none' ) 117 $(el).find('a.vim-q').click(); 118 }, 119 120 revert : function() { 121 122 if ( $('#the-comment-list #replyrow').length < 1 ) 123 return false; 124 125 $('#replyrow').fadeOut('fast', function(){ 126 commentReply.close(); 127 }); 128 129 return false; 130 }, 131 132 close : function() { 133 $(this.o).fadeIn('fast').css('backgroundColor', ''); 134 $('#com-reply').append( $('#replyrow') ); 135 $('#replycontent').val(''); 136 $('#edithead input').val(''); 137 $('#replysubmit .error').html('').hide(); 138 $('#replysubmit .waiting').hide(); 139 if ( $.browser.msie ) 140 $('#replycontainer, #replycontent').css('height', '120px'); 141 else 142 $('#replycontainer').resizable('destroy').css('height', '120px'); 143 }, 144 145 open : function(id, p, a) { 146 var t = this; 147 t.close(); 148 t.o = '#comment-'+id; 149 150 $('#replyrow td').attr('colspan', $('.widefat tfoot th:visible').length); 151 var editRow = $('#replyrow'), rowData = $('#inline-'+id); 152 var act = t.act = (a == 'edit') ? 'edit-comment' : 'replyto-comment'; 153 154 $('#action', editRow).val(act); 155 $('#comment_post_ID', editRow).val(p); 156 $('#comment_ID', editRow).val(id); 157 158 if ( a == 'edit' ) { 159 $('#author', editRow).val( $('div.author', rowData).text() ); 160 $('#author-email', editRow).val( $('div.author-email', rowData).text() ); 161 $('#author-url', editRow).val( $('div.author-url', rowData).text() ); 162 $('#status', editRow).val( $('div.comment_status', rowData).text() ); 163 $('#replycontent', editRow).val( $('textarea.comment', rowData).val() ); 164 $('#edithead, #savebtn', editRow).show(); 165 $('#replyhead, #replybtn', editRow).hide(); 166 167 var h = $(t.o).height(); 168 if ( h > 220 ) 113 169 if ( $.browser.msie ) 114 $('#replycontent').height(h); 115 } 116 }); 117 118 $('.ui-resizable-se').css({ 119 border: '0 none', 120 width: '11px', 121 height: '12px', 122 background: 'transparent url(images/se.png) no-repeat scroll 0 0' 123 }); 124 125 $('#replydiv').css({ 126 'position' : 'absolute', 127 'top' : top, 128 'left' : left 129 }).show(); 130 131 $('#replycontent').focus().keyup(function(e){ 132 if (e.which == 27) commentReply.close(); // close on Escape 133 }); 134 135 // emulate the Safari/Opera scrollIntoView 136 var to = $('#replydiv').offset(); 137 var scr = document.documentElement.scrollTop ? document.documentElement.scrollTop : 0; 138 139 if ( scr - 20 > to.top ) 140 window.scroll(0, to.top - 100); 141 }, 142 143 close : function() { 144 $('#replycontent').val(''); 145 $('#replyerror').hide(); 146 147 $('#replydiv').draggable('destroy').resizable('destroy').css('position','relative'); 148 $('#replydiv').hide(); 170 $('#replycontainer, #replycontent', editRow).height(h-105); 171 else 172 $('#replycontainer', editRow).height(h-105); 173 174 $(t.o).after(editRow.hide()).fadeOut('fast', function(){ 175 $('#replyrow').fadeIn('fast'); 176 }); 177 } else { 178 $('#edithead, #savebtn', editRow).hide(); 179 $('#replyhead, #replybtn', editRow).show(); 180 $(t.o).after(editRow).animate( { backgroundColor: '#eefee7' }, 800); 181 $('#replyrow').hide().fadeIn('fast'); 182 } 183 184 if ( ! $.browser.msie ) 185 $('#replycontainer').resizable({ 186 handles : 's', 187 axis : 'y', 188 minHeight : 80, 189 stop : function() { 190 $('#replycontainer').width('auto'); 191 } 192 }); 193 194 setTimeout(function() { 195 var rtop = $('#replyrow').offset().top; 196 var rbottom = rtop + $('#replyrow').height(); 197 var scrollTop = window.pageYOffset || document.documentElement.scrollTop; 198 var vp = document.documentElement.clientHeight || self.innerHeight || 0; 199 var scrollBottom = scrollTop + vp; 200 201 if ( scrollBottom - 20 < rbottom ) 202 window.scroll(0, rbottom - vp + 35); 203 else if ( rtop - 20 < scrollTop ) 204 window.scroll(0, rtop - 35); 205 206 $('#replycontent').focus().keyup(function(e){ 207 if (e.which == 27) commentReply.revert(); // close on Escape 208 }); 209 }, 600); 210 149 211 return false; 150 212 }, … … 153 215 var post = {}; 154 216 155 $('#replyform input').each(function() { 217 $('#replysubmit .waiting').show(); 218 219 $('#replyrow input').each(function() { 156 220 post[ $(this).attr('name') ] = $(this).val(); 157 221 }); 158 222 159 post.co mment = $('#replycontent').val();223 post.content = $('#replycontent').val(); 160 224 post.id = post.comment_post_ID; 161 225 … … 167 231 error : function(r) { commentReply.error(r); } 168 232 }); 233 234 return false; 169 235 }, 170 236 … … 173 239 if ( typeof(xml) == 'string' ) { 174 240 this.error({'responseText': xml}); 175 return ;241 return false; 176 242 } 177 243 178 244 var r = wpAjax.parseAjaxResponse(xml); 179 if ( r.errors ) 245 if ( r.errors ) { 180 246 this.error({'responseText': wpAjax.broken}); 247 return false; 248 } 249 250 if ( 'edit-comment' == this.act ) 251 $(this.o).remove(); 181 252 182 253 r = r.responses[0]; 183 this.close(); 184 // var scr1 = $('#the-comment-list').offset(), scr2 = $('#the-comment-list').height(); 185 186 if ( r.position == -1 ) { 187 // window.scroll(0, scr1.top - 100); // Scroll to the new comment? Seems annoing.. 188 $('#the-comment-list').prepend(r.data); 189 } else { 190 // window.scroll(0, scr1.top + scr2 + 200); 191 $('#the-comment-list').append(r.data); 192 } 193 194 $('#comment-'+r.id+' .hide-if-no-js').removeClass('hide-if-no-js'); 195 196 $('#comment-'+r.id) 254 var c = r.data; 255 256 $(c).hide() 257 $('#replyrow').after(c); 258 this.o = id = '#comment-'+r.id; 259 $(id+' .hide-if-no-js').removeClass('hide-if-no-js'); 260 this.revert(); 261 this.addEvents($(id)); 262 263 $(id) 197 264 .animate( { backgroundColor:"#CCEEBB" }, 600 ) 198 265 .animate( { backgroundColor:"transparent" }, 600 ); 199 266 267 theList = theExtraList = null; 268 $("#get-extra-comments, a[className*=':']").unbind(); 200 269 setCommentsList(); 270 201 271 }, 202 272 … … 204 274 var er = r.statusText; 205 275 276 $('#replysubmit .waiting').hide(); 277 206 278 if ( r.responseText ) 207 279 er = r.responseText.replace( /<.[^<>]*?>/g, '' ); 208 280 209 if ( er ) { 210 var o = $('#replydiv').offset(); 211 $('#replydiv').hide(); 212 213 $('#replyerror').css({ 214 'top' : o.top + 60 + 'px', 215 'left' : o.left + 'px' 216 }).show().draggable(); 217 218 $('#replyerrtext').html(er) 219 $('#close-button').css('outline','none').focus().keyup(function(e) { 220 if (e.which == 27) commentReply.close(); // close on Escape 221 }); 222 } 223 }, 224 225 back : function() { 226 if ( $('#replydiv').is(':hidden') && $('#replyerror').is(':visible') ) { 227 $('#replyerror').hide(); 228 $('#replydiv').show(); 229 } 281 if ( er ) 282 $('#replysubmit .error').html(er).show(); 283 230 284 } 231 285 }; … … 233 287 $(document).ready(function(){ 234 288 columns.init('comment'); 289 commentReply.init(); 235 290 236 291 if ( typeof QTags != 'undefined' ) … … 240 295 var make_hotkeys_redirect = function(which) { 241 296 return function() { 242 var first_last = 'next' == which? 'first' : 'last'; 297 var first_last = 'next' == which? 'first' : 'last'; 243 298 var l=$('.'+which+'.page-numbers'); 244 299 if (l.length) … … 260 315 } 261 316 }; 262 $.table_hotkeys($('table.widefat'),['a', 'u', 's', 'd', 'r', ['e', edit_comment],317 $.table_hotkeys($('table.widefat'),['a', 'u', 's', 'd', 'r', 'q', ['e', edit_comment], 263 318 ['shift+a', make_bulk('approve')], ['shift+s', make_bulk('markspam')], 264 319 ['shift+d', make_bulk('delete')], ['shift+x', toggle_all]], -
trunk/wp-admin/js/inline-edit-post.js
r9083 r9098 187 187 id = this.getId(id); 188 188 189 $(' #edit-'+id+'.quick-edit-save').append('<img style="padding:0 15px;" src="images/loading.gif" alt="" />');189 $('table.widefat .quick-edit-save .waiting').show(); 190 190 191 191 var params = { … … 226 226 227 227 if ( id = $('table.widefat tr.inline-editor').attr('id') ) { 228 $('table.widefat .quick-edit-save .waiting').hide(); 229 228 230 if ( 'bulk-edit' == id ) { 229 231 $('table.widefat #bulk-edit').removeClass('inline-editor').hide(); -
trunk/wp-admin/js/inline-edit-tax.js
r9083 r9098 91 91 id = this.getId(id); 92 92 93 $(' #edit-'+id+'.quick-edit-save').append('<img style="padding:0 15px;" src="images/loading.gif" alt="" />');93 $('table.widefat .quick-edit-save .waiting').show(); 94 94 95 95 var params = { … … 127 127 128 128 if ( id ) { 129 $('table.widefat .quick-edit-save .waiting').hide(); 129 130 $('#'+id).remove(); 130 131 id = id.substr( id.lastIndexOf('-') + 1 ); -
trunk/wp-admin/wp-admin.css
r9083 r9098 330 330 } 331 331 332 #ed_toolbar input, 333 #ed_reply_toolbar input { 332 #ed_toolbar input { 334 333 margin: 3px 2px 2px; 335 334 padding: 2px 4px; … … 513 512 .column-comment p { 514 513 margin-top: 0; 515 }516 517 .column-comment {518 width: 50%;519 }520 521 .column-author,522 .column-response {523 width: 20%;524 514 } 525 515 … … 1961 1951 1962 1952 /* reply to comments */ 1963 #replydiv { 1964 width: 700px; 1953 #replyrow { 1954 font-size: 11px; 1955 } 1956 1957 #replyrow input { 1965 1958 border-width: 1px; 1966 1959 border-style: solid; 1960 } 1961 1962 #replyrow td { 1967 1963 padding: 2px; 1968 left: 20px; 1969 top: 200px; 1970 z-index: 100; 1971 } 1972 1973 #replydiv #editorcontainer { 1964 } 1965 1966 #replyrow #editorcontainer { 1974 1967 border: 0 none; 1975 1968 } … … 1977 1970 #replysubmit { 1978 1971 margin: 0; 1979 padding: 3px5px;1972 padding: 5px; 1980 1973 border-top-width: 1px; 1981 1974 border-top-style: solid; 1982 1975 } 1983 1976 1984 #replysubmit .button, 1985 #replyerror .button { 1977 #replysubmit img.waiting, 1978 .quick-edit-save img.waiting { 1979 padding: 0 10px; 1980 vertical-align: top; 1981 } 1982 1983 #replysubmit .button { 1986 1984 margin-right: 5px; 1987 1985 } 1988 1986 1989 #reply div#editor-toolbar {1987 #replyrow #editor-toolbar { 1990 1988 display: none; 1991 1989 } 1992 1990 1993 #replydiv #replyhandle { 1994 cursor: move; 1995 margin: 0; 1996 font-size: 14px; 1991 #replyhead { 1992 font-size: 12px; 1997 1993 font-weight: bold; 1998 padding: 7px; 1994 padding: 2px 10px 4px; 1995 } 1996 1997 #edithead #edittitle { 1998 float: left; 1999 font-size: 12px; 2000 font-weight: bold; 2001 height: 20px; 2002 line-height: 19px; 2003 margin: 0 4px 0 0; 2004 padding: 4px 10px; 2005 } 2006 2007 #edithead .inside { 2008 float: left; 2009 margin: 0 4px 2px 0; 2010 padding: 3px 0 2px; 2011 text-align: center; 2012 width: 260px; 2013 font-size: 11px; 2014 } 2015 2016 #edithead .inside input { 2017 width: 200px; 2018 font-size: 11px; 2019 } 2020 2021 #edithead label { 2022 padding: 2px; 1999 2023 } 2000 2024 2001 2025 #replycontainer { 2002 padding: 6px;2026 padding: 5px; 2003 2027 border: 0 none; 2004 height: 1 00%;2028 height: 120px; 2005 2029 overflow: hidden; 2030 position: relative; 2006 2031 } 2007 2032 … … 2015 2040 border: 0 none; 2016 2041 outline: none; 2017 } 2018 2019 #ed_reply_toolbar { 2020 margin: 0; 2021 padding: 2px 4px; 2022 } 2023 2024 #replyerror { 2025 border-width: 5px; 2026 border-style: solid; 2027 position: absolute; 2028 padding: 15px 15px 10px; 2029 width: 500px; 2030 z-index: 1000; 2031 display: none; 2032 } 2033 2034 #replyerror img { 2035 float: right; 2036 margin: 15px; 2037 } 2038 2039 #replyerror p.submit { 2040 padding: 10px 0 0; 2041 } 2042 2043 #replyerror .error { 2044 margin: 15px 0 0; 2042 font-size: 12px; 2043 } 2044 2045 #replyrow #ed_reply_toolbar { 2046 margin: 0; 2047 padding: 2px 3px; 2048 } 2049 2050 #replyrow #ed_reply_toolbar input { 2051 margin: 1px 2px 1px 1px; 2052 min-width: 26px; 2053 padding: 3px 4px; 2054 font-size: 12px; 2055 -moz-border-radius: 3px; 2056 -khtml-border-radius: 3px; 2057 -webkit-border-radius: 3px; 2058 border-radius: 3px; 2045 2059 } 2046 2060 -
trunk/wp-includes/js/jquery/jquery.table-hotkeys.js
r9048 r9098 66 66 }; 67 67 var first_row = get_first_row(); 68 if (!first_row.length) return; 68 if (!first_row.length) return; 69 69 if (opts.highlight_first) 70 70 set_current_row(first_row); … … 84 84 } 85 85 }); 86 86 87 87 }; 88 88 $.table_hotkeys.current_row = null; -
trunk/wp-includes/script-loader.php
r9083 r9098 159 159 'strong' => __('Strong') 160 160 ) ); 161 $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui- draggable', 'jquery-ui-resizable', 'quicktags', 'columns', 'settings-box'), '20080925' );161 $scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'columns', 'settings-box'), '20081007' ); 162 162 $scripts->localize( 'admin-comments', 'adminCommentsL10n', array( 163 163 'pending' => __('%i% pending'), // must look like: "# blah blah" … … 243 243 $scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'jquery' ), '20080625' ); 244 244 245 $scripts->add( 'inline-edit-post', '/wp-admin/js/inline-edit-post.js', array( 'jquery', 'jquery-form', 'suggest' ), '2008 0930' );245 $scripts->add( 'inline-edit-post', '/wp-admin/js/inline-edit-post.js', array( 'jquery', 'jquery-form', 'suggest' ), '20081007' ); 246 246 $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array( 247 'edit' => __('Double-click to edit') 248 ) ); 249 250 $scripts->add( 'inline-edit-tax', '/wp-admin/js/inline-edit-tax.js', array( 'jquery', 'jquery-form' ), '20081003' ); 247 'edit' => __('Double-click to edit'), 248 'error' => __('Error while saving the changes.') 249 ) ); 250 251 $scripts->add( 'inline-edit-tax', '/wp-admin/js/inline-edit-tax.js', array( 'jquery', 'jquery-form' ), '20081007' ); 251 252 $scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array( 252 253 'edit' => __('Double-click to edit'),
Note: See TracChangeset
for help on using the changeset viewer.