4c6d9571f9
git-svn-id: https://develop.svn.wordpress.org/trunk@6761 602fd350-edb4-49c9-b593-d223f7449a82
15 lines
554 B
JavaScript
15 lines
554 B
JavaScript
function add_postbox_toggles(page) {
|
|
jQuery('.postbox h3').prepend('<a class="togbox">+</a> ');
|
|
jQuery('.togbox').click( function() { jQuery(jQuery(this).parent().parent().get(0)).toggleClass('closed'); save_postboxes_state(page); } );
|
|
}
|
|
|
|
function save_postboxes_state(page) {
|
|
var closed = jQuery('.postbox').filter('.closed').map(function() { return this.id; }).get().join(',');
|
|
jQuery.post(postboxL10n.requestFile, {
|
|
action: 'closed-postboxes',
|
|
closed: closed,
|
|
closedpostboxesnonce: jQuery('#closedpostboxesnonce').val(),
|
|
page: page
|
|
});
|
|
}
|