Ticket #26006: 26006.1.diff
File 26006.1.diff, 1.7 KB (added by , 11 years ago) |
---|
-
src/wp-admin/js/postbox.js
1 /* global ajaxurl */ 2 1 3 var postboxes; 2 4 3 5 (function($) { … … 30 32 e.stopPropagation(); 31 33 }); 32 34 33 $( '.postbox a.dismiss').bind('click.postboxes', function(e) {35 $( '.postbox a.dismiss' ).bind( 'click.postboxes', function() { 34 36 var hide_id = $(this).parents('.postbox').attr('id') + '-hide'; 35 37 $( '#' + hide_id ).prop('checked', false).triggerHandler('click'); 36 38 return false; … … 79 81 forcePlaceholderSize: true, 80 82 helper: 'clone', 81 83 opacity: 0.65, 82 stop: function( e,ui) {84 stop: function() { 83 85 if ( $(this).find('#dashboard_browser_nag').is(':visible') && 'dashboard_browser_nag' != this.firstChild.id ) { 84 86 $(this).sortable('cancel'); 85 87 return; … … 124 126 _ajax_nonce: $('#meta-box-order-nonce').val(), 125 127 page_columns: page_columns, 126 128 page: page 127 } 129 }; 128 130 $('.meta-box-sortables').each( function() { 129 postVars[ "order[" + this.id.split('-')[0] + "]"] = $(this).sortable( 'toArray' ).join(',');131 postVars[ 'order[' + this.id.split( '-' )[0] + ']' ] = $( this ).sortable( 'toArray' ).join( ',' ); 130 132 } ); 131 133 $.post( ajaxurl, postVars ); 132 134 }, … … 134 136 _mark_area : function() { 135 137 var visible = $('div.postbox:visible').length, side = $('#post-body #side-sortables'); 136 138 137 $( '#dashboard-widgets .meta-box-sortables:visible').each(function(n, el){139 $( '#dashboard-widgets .meta-box-sortables:visible' ).each( function() { 138 140 var t = $(this); 139 141 140 142 if ( visible == 1 || t.children('.postbox:visible').length )