mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 10:22:23 +01:00
45ebbd5bb8
git-svn-id: http://svn.automattic.com/wordpress/trunk@6713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
12 lines
489 B
JavaScript
12 lines
489 B
JavaScript
function add_postbox_toggles() {
|
|
jQuery('.postbox h3').prepend('<a class="togbox">+</a> ');
|
|
jQuery('.togbox').click( function() { jQuery(jQuery(this).parent().parent().get(0)).toggleClass('closed'); save_postboxes_state(); } );
|
|
}
|
|
|
|
function save_postboxes_state() {
|
|
var closed = jQuery('.postbox').filter('.closed').map(function() { return this.id; }).get().join(',');
|
|
jQuery.post(postboxL10n.requestFile, {
|
|
action: 'closed-postboxes',
|
|
closed: closed,
|
|
cookie: document.cookie});
|
|
} |