Begin rework of plugins list table. Props edward mindreantre. See #15318

git-svn-id: https://develop.svn.wordpress.org/trunk@16345 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu
2010-11-13 15:58:23 +00:00
parent 4ffac80fc4
commit da3a486cef
3 changed files with 49 additions and 33 deletions
+12 -7
View File
@@ -123,17 +123,22 @@ $(document).ready(function(){ adminMenu.init(); });
// show/hide/save table columns
columns = {
init : function() {
var that = this;
$('.hide-column-tog', '#adv-settings').click( function() {
var $t = $(this), column = $t.val();
if ( $t.attr('checked') )
that.checked(column);
else
that.unchecked(column);
this.toggleView( $('.hide-column-tog', '#adv-settings').attr('checked'), $('.hide-column-tog', '#adv-settings').val() );
$('.column-name').css("width", "auto"); // Otherwise it only wants 50% column width...
$('.hide-column-tog', '#adv-settings').click( function() {
columns.toggleView( $(this).attr('checked'), $(this).val() );
columns.saveManageColumnsState();
});
},
toggleView : function(checked, column) {
if ( checked )
this.checked(column);
else
this.unchecked(column);
},
saveManageColumnsState : function() {
var hidden = this.hidden();