Make WordPress Core

Ticket #26006: 26006.1.diff

File 26006.1.diff, 1.7 KB (added by atimmer, 11 years ago)
  • src/wp-admin/js/postbox.js

     
     1/* global ajaxurl */
     2
    13var postboxes;
    24
    35(function($) {
     
    3032                                e.stopPropagation();
    3133                        });
    3234
    33                         $('.postbox a.dismiss').bind('click.postboxes', function(e) {
     35                        $( '.postbox a.dismiss' ).bind( 'click.postboxes', function() {
    3436                                var hide_id = $(this).parents('.postbox').attr('id') + '-hide';
    3537                                $( '#' + hide_id ).prop('checked', false).triggerHandler('click');
    3638                                return false;
     
    7981                                forcePlaceholderSize: true,
    8082                                helper: 'clone',
    8183                                opacity: 0.65,
    82                                 stop: function(e,ui) {
     84                                stop: function() {
    8385                                        if ( $(this).find('#dashboard_browser_nag').is(':visible') && 'dashboard_browser_nag' != this.firstChild.id ) {
    8486                                                $(this).sortable('cancel');
    8587                                                return;
     
    124126                                _ajax_nonce: $('#meta-box-order-nonce').val(),
    125127                                page_columns: page_columns,
    126128                                page: page
    127                         }
     129                        };
    128130                        $('.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( ',' );
    130132                        } );
    131133                        $.post( ajaxurl, postVars );
    132134                },
     
    134136                _mark_area : function() {
    135137                        var visible = $('div.postbox:visible').length, side = $('#post-body #side-sortables');
    136138
    137                         $('#dashboard-widgets .meta-box-sortables:visible').each(function(n, el){
     139                        $( '#dashboard-widgets .meta-box-sortables:visible' ).each( function() {
    138140                                var t = $(this);
    139141
    140142                                if ( visible == 1 || t.children('.postbox:visible').length )