2008-02-08 20:57:50 +01:00
|
|
|
function add_postbox_toggles(page) {
|
2008-01-28 22:34:42 +01:00
|
|
|
jQuery('.postbox h3').prepend('<a class="togbox">+</a> ');
|
2008-03-14 09:43:00 +01:00
|
|
|
jQuery('.postbox h3').click( function() { jQuery(jQuery(this).parent().get(0)).toggleClass('closed'); save_postboxes_state(page); } );
|
2008-01-28 22:34:42 +01:00
|
|
|
}
|
|
|
|
|
2008-02-08 20:57:50 +01:00
|
|
|
function save_postboxes_state(page) {
|
2008-01-28 22:34:42 +01:00
|
|
|
var closed = jQuery('.postbox').filter('.closed').map(function() { return this.id; }).get().join(',');
|
2008-02-02 21:31:56 +01:00
|
|
|
jQuery.post(postboxL10n.requestFile, {
|
2008-01-28 22:34:42 +01:00
|
|
|
action: 'closed-postboxes',
|
|
|
|
closed: closed,
|
2008-02-08 20:57:50 +01:00
|
|
|
closedpostboxesnonce: jQuery('#closedpostboxesnonce').val(),
|
|
|
|
page: page
|
|
|
|
});
|
|
|
|
}
|