mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-17 08:05:21 +01:00
f85b8d6eb8
git-svn-id: http://svn.automattic.com/wordpress/trunk@7290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
15 lines
549 B
JavaScript
15 lines
549 B
JavaScript
function add_postbox_toggles(page) {
|
|
jQuery('.postbox h3').prepend('<a class="togbox">+</a> ');
|
|
jQuery('.postbox h3').click( function() { jQuery(jQuery(this).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
|
|
});
|
|
}
|