mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Introduce WP_List_Table::get_column_count() and take care of update notice <tr>. Props ocean90 for initial patch. Fixes #15318
git-svn-id: https://develop.svn.wordpress.org/trunk@16368 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -147,10 +147,12 @@ columns = {
|
||||
|
||||
checked : function(column) {
|
||||
$('.column-' + column).show();
|
||||
this.colSpanChange(+1);
|
||||
},
|
||||
|
||||
unchecked : function(column) {
|
||||
$('.column-' + column).hide();
|
||||
this.colSpanChange(-1);
|
||||
},
|
||||
|
||||
hidden : function() {
|
||||
@@ -164,6 +166,14 @@ columns = {
|
||||
return id.substring( id, id.length - 5 );
|
||||
}).get().join(',');
|
||||
};
|
||||
},
|
||||
|
||||
colSpanChange : function(diff) {
|
||||
var $t = $('table').find('.colspanchange');
|
||||
if ( !$t.length )
|
||||
return;
|
||||
var n = parseInt( $t.attr('colspan'), 10 ) + diff;
|
||||
$t.attr('colspan', n.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user