Bulk/quick edit: Set the correct colspan.

`thead` can contain `td`s now, too.

props afercia.
fixes #31654.


git-svn-id: https://develop.svn.wordpress.org/trunk@33015 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi 2015-07-01 01:05:29 +00:00
parent 016ebf43ed
commit 6130ea5a0b
2 changed files with 3 additions and 3 deletions

View File

@ -81,7 +81,7 @@ inlineEditPost = {
var te = '', type = this.type, tax, c = true;
this.revert();
$('#bulk-edit td').attr('colspan', $('.widefat:first thead th:visible').length);
$( '#bulk-edit td' ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length );
// Insert the editor at the top of the table with an empty row above to maintain zebra striping.
$('table.widefat tbody').prepend( $('#bulk-edit') ).prepend('<tr class="hidden"></tr>');
$('#bulk-edit').addClass('inline-editor').show();
@ -131,7 +131,7 @@ inlineEditPost = {
// add the new edit row with an extra blank row underneath to maintain zebra striping.
editRow = $('#inline-edit').clone(true);
$('td', editRow).attr('colspan', $('.widefat:first thead th:visible').length);
$( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length );
$(t.what+id).hide().after(editRow).after('<tr class="hidden"></tr>');

View File

@ -54,7 +54,7 @@ inlineEditTax = {
}
editRow = $('#inline-edit').clone(true), rowData = $('#inline_'+id);
$('td', editRow).attr('colspan', $('.widefat:first thead th:visible').length);
$( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length );
$(t.what+id).hide().after(editRow).after('<tr class="hidden"></tr>');