Fix Screen Options toggles accidentally broken in [9662]

git-svn-id: https://develop.svn.wordpress.org/trunk@9277 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2008-10-22 06:52:06 +00:00
parent bf0fa494cd
commit d6b8d7128b
2 changed files with 15 additions and 2 deletions

View File

@ -2659,7 +2659,7 @@ function meta_box_prefs($page) {
continue;
$box_id = $box['id'];
echo '<label for="' . $box_id . '-hide">';
echo '<input name="' . $box_id . '-hide" type="checkbox" id="' . $box_id . '-hide" value="' . $box_id . '"' . (! in_array($box_id, $hidden) ? ' checked="checked"' : '') . ' />';
echo '<input class="hide-postbox-tog" name="' . $box_id . '-hide" type="checkbox" id="' . $box_id . '-hide" value="' . $box_id . '"' . (! in_array($box_id, $hidden) ? ' checked="checked"' : '') . ' />';
echo "{$box['title']}</label>\n";
}
}

View File

@ -4,11 +4,24 @@
$('.postbox h3').click( function() {
$($(this).parent().get(0)).toggleClass('closed');
postboxes.save_state(page);
});
} );
$('.postbox h3 a').click( function(e) {
e.stopPropagation();
} );
$('.hide-postbox-tog').click( function() {
var box = jQuery(this).val();
if ( jQuery(this).attr('checked') ) {
jQuery('#' + box).show();
if ( $.isFunction( postboxes.onShow ) ) {
postboxes.onShow( box );
}
} else {
jQuery('#' + box).hide();
}
postboxes.save_state(page);
} );
if ( $.browser.msie ) {
$('#side-sortables').append( '<div id="make-it-tall"></div>' );
} else {