Show Settings for edit link form. see #7552

git-svn-id: https://develop.svn.wordpress.org/trunk@8753 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-08-27 19:49:08 +00:00
parent 4d741bad16
commit 5dfa1c4922
2 changed files with 34 additions and 1 deletions

View File

@ -302,6 +302,18 @@ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
<div id="poststuff">
<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Show Settings') ?></a>
<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Settings') ?></a></div>
<div id="edit-settings" class="hide-if-js hide-if-no-js">
<div id="edit-settings-wrap">
<h5><?php _e('Show on screen') ?></h5>
<div class="metabox-prefs">
<?php meta_box_prefs('link') ?>
<br class="clear" />
</div></div>
</div>
<div id="side-info-column" class="inner-sidebar">
<?php

View File

@ -1,4 +1,4 @@
jQuery(document).ready( function() {
jQuery(document).ready( function($) {
// close postboxes that should be closed
jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
@ -48,4 +48,25 @@ jQuery(document).ready( function() {
return false;
} );
jQuery('.categorychecklist :checkbox').change( syncChecks ).filter( ':checked' ).change();
// Edit Settings
$('#show-settings-link').click(function () {
$('#edit-settings').slideDown('normal', function(){
$('#show-settings-link').hide();
$('#hide-settings-link').show();
});
$('#show-settings').addClass('show-settings-opened');
return false;
});
$('#hide-settings-link').click(function () {
$('#edit-settings').slideUp('normal', function(){
$('#hide-settings-link').hide();
$('#show-settings-link').show();
$('#show-settings').removeClass('show-settings-opened');
});
return false;
});
});