From 6130ea5a0b2d6e864b0b92bc8d98063f361e10af Mon Sep 17 00:00:00 2001 From: Helen Hou-Sandi Date: Wed, 1 Jul 2015 01:05:29 +0000 Subject: [PATCH] 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 --- src/wp-admin/js/inline-edit-post.js | 4 ++-- src/wp-admin/js/inline-edit-tax.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/js/inline-edit-post.js b/src/wp-admin/js/inline-edit-post.js index 7d47a2f5c5..ad83d7e20c 100644 --- a/src/wp-admin/js/inline-edit-post.js +++ b/src/wp-admin/js/inline-edit-post.js @@ -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(''); $('#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(''); diff --git a/src/wp-admin/js/inline-edit-tax.js b/src/wp-admin/js/inline-edit-tax.js index e1746462f5..99bfca4632 100644 --- a/src/wp-admin/js/inline-edit-tax.js +++ b/src/wp-admin/js/inline-edit-tax.js @@ -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('');