Ticket #25746: 25746.2.patch
File 25746.2.patch, 1.5 KB (added by , 11 years ago) |
---|
-
src/wp-admin/js/edit-comments.js
382 382 }, 383 383 384 384 open : function(comment_id, post_id, action) { 385 var t = this, editRow, rowData, act, c = $('#comment-' + comment_id), h = c.height(), replyButton; 385 var editRow, rowData, act, replyButton, editHeight, 386 t = this, 387 c = $('#comment-' + comment_id), 388 h = c.height(); 386 389 387 390 t.close(); 388 391 t.cid = comment_id; … … 397 400 $('#comment_post_ID', editRow).val(post_id); 398 401 $('#comment_ID', editRow).val(comment_id); 399 402 400 if ( h > 120 )401 $('#replycontent', editRow).css('height', (35+h) + 'px');402 403 403 if ( action == 'edit' ) { 404 404 $('#author', editRow).val( $('div.author', rowData).text() ); 405 405 $('#author-email', editRow).val( $('div.author-email', rowData).text() ); … … 409 409 $('#edithead, #savebtn', editRow).show(); 410 410 $('#replyhead, #replybtn, #addhead, #addbtn', editRow).hide(); 411 411 412 if ( h > 120 ) { 413 // Limit the maximum height when editing very long comments to make it more manageable. 414 // The textarea is resizable in most browsers, so the user can adjust it if needed. 415 editHeight = h > 500 ? 500 : h; 416 $('#replycontent', editRow).css('height', editHeight + 'px'); 417 } 418 412 419 c.after( editRow ).fadeOut('fast', function(){ 413 420 $('#replyrow').fadeIn(300, function(){ $(this).show(); }); 414 421 });