web/wp-admin/js/postbox.dev.js
branchwordpress
changeset 132 4d4862461b8d
parent 109 03b0d1493584
equal deleted inserted replaced
131:a4642baaf829 132:4d4862461b8d
   114 		},
   114 		},
   115 
   115 
   116 		save_state : function(page) {
   116 		save_state : function(page) {
   117 			var closed = $('.postbox').filter('.closed').map(function() { return this.id; }).get().join(','),
   117 			var closed = $('.postbox').filter('.closed').map(function() { return this.id; }).get().join(','),
   118 			hidden = $('.postbox').filter(':hidden').map(function() { return this.id; }).get().join(',');
   118 			hidden = $('.postbox').filter(':hidden').map(function() { return this.id; }).get().join(',');
   119 			$.post(postboxL10n.requestFile, {
   119 			$.post(ajaxurl, {
   120 				action: 'closed-postboxes',
   120 				action: 'closed-postboxes',
   121 				closed: closed,
   121 				closed: closed,
   122 				hidden: hidden,
   122 				hidden: hidden,
   123 				closedpostboxesnonce: jQuery('#closedpostboxesnonce').val(),
   123 				closedpostboxesnonce: jQuery('#closedpostboxesnonce').val(),
   124 				page: page
   124 				page: page
   134 				page: page
   134 				page: page
   135 			}
   135 			}
   136 			$('.meta-box-sortables').each( function() {
   136 			$('.meta-box-sortables').each( function() {
   137 				postVars["order[" + this.id.split('-')[0] + "]"] = $(this).sortable( 'toArray' ).join(',');
   137 				postVars["order[" + this.id.split('-')[0] + "]"] = $(this).sortable( 'toArray' ).join(',');
   138 			} );
   138 			} );
   139 			$.post( postboxL10n.requestFile, postVars );
   139 			$.post( ajaxurl, postVars );
   140 		},
   140 		},
   141 
   141 
   142 		/* Callbacks */
   142 		/* Callbacks */
   143 		pbshow : false,
   143 		pbshow : false,
   144 
   144