Fix Screen Options toggles accidentally broken in [9662]
git-svn-id: http://svn.automattic.com/wordpress/trunk@9277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3942c97d46
commit
49847d77f3
|
@ -2659,7 +2659,7 @@ function meta_box_prefs($page) {
|
||||||
continue;
|
continue;
|
||||||
$box_id = $box['id'];
|
$box_id = $box['id'];
|
||||||
echo '<label for="' . $box_id . '-hide">';
|
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";
|
echo "{$box['title']}</label>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,19 @@
|
||||||
e.stopPropagation();
|
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 ) {
|
if ( $.browser.msie ) {
|
||||||
$('#side-sortables').append( '<div id="make-it-tall"></div>' );
|
$('#side-sortables').append( '<div id="make-it-tall"></div>' );
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue