Make WordPress Core

Changeset 26206


Ignore:
Timestamp:
11/15/2013 06:07:21 AM (12 years ago)
Author:
nacin
Message:

Fix JSHint errors in customize-controls.js.

props jorbin.
fixes #25917.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/customize-controls.js

    r26081 r26206  
    99    api.Setting = api.Value.extend({
    1010        initialize: function( id, value, options ) {
    11             var element;
    12 
    1311            api.Value.prototype.initialize.call( this, value, options );
    1412
     
    8684
    8785        dropdownInit: function() {
    88             var control  = this,
    89                 statuses = this.container.find('.dropdown-status'),
    90                 params   = this.params,
    91                 update   = function( to ) {
    92                     if ( typeof to === 'string' && params.statuses && params.statuses[ to ] )
     86            var control      = this,
     87                statuses     = this.container.find('.dropdown-status'),
     88                params       = this.params,
     89                toggleFreeze = false,
     90                update       = function( to ) {
     91                    if ( typeof to === 'string' && params.statuses && params.statuses[ to ] )
    9392                        statuses.html( params.statuses[ to ] ).show();
    9493                    else
    9594                        statuses.hide();
    9695                };
    97 
    98             var toggleFreeze = false;
    9996
    10097            // Support the .dropdown class to open/close complex elements
     
    129126
    130127            picker.val( control.setting() ).wpColorPicker({
    131                 change: function( event, options ) {
     128                change: function() {
    132129                    control.setting.set( picker.wpColorPicker('color') );
    133                 },
    134                 clear: function() {
    135                     control.setting.set( false );
    136                 }
     130                },
     131                clear: function() {
     132                    control.setting.set( false );
     133                }
    137134            });
    138135        }
     
    198195
    199196            this.uploader = {
    200                 init: function( up ) {
     197                init: function() {
    201198                    var fallback, button;
    202199
     
    320317
    321318        initialize: function( params, options ) {
    322             var deferred = $.Deferred(),
    323                 self     = this;
     319            var deferred = $.Deferred();
    324320
    325321            // This is the promise object.
     
    489485        initialize: function( params, options ) {
    490486            var self = this,
    491                 rscheme = /^https?/,
    492                 url;
     487                rscheme = /^https?/;
    493488
    494489            $.extend( this, options || {} );
     
    707702            return window.location = api.settings.url.fallback;
    708703
    709         var body = $( document.body ),
    710             overlay = body.children('.wp-full-overlay'),
    711             query, previewer, parent;
     704        var previewer, parent, topFocus,
     705            body = $( document.body ),
     706            overlay = body.children('.wp-full-overlay');
    712707
    713708        // Prevent the form from saving when enter is pressed.
     
    734729                return {
    735730                    wp_customize: 'on',
    736                     theme:        api.settings.theme.stylesheet,
    737                     customized:   JSON.stringify( api.get() ),
    738                     nonce:        this.nonce.preview
     731                    theme:      api.settings.theme.stylesheet,
     732                    customized: JSON.stringify( api.get() ),
     733                    nonce:      this.nonce.preview
    739734                };
    740735            },
     
    779774
    780775        // Refresh the nonces if the preview sends updated nonces over.
    781         previewer.bind( 'nonce', function( nonce ) {
    782             $.extend( this.nonce, nonce );
    783         });
     776        previewer.bind( 'nonce', function( nonce ) {
     777            $.extend( this.nonce, nonce );
     778        });
    784779
    785780        $.each( api.settings.settings, function( id, data ) {
     
    921916            'background_image': {
    922917                controls: [ 'background_repeat', 'background_position_x', 'background_attachment' ],
    923                 callback: function( to ) { return !! to }
     918                callback: function( to ) { return !! to; }
    924919            },
    925920            'show_on_front': {
    926921                controls: [ 'page_on_front', 'page_for_posts' ],
    927                 callback: function( to ) { return 'page' === to }
     922                callback: function( to ) { return 'page' === to; }
    928923            },
    929924            'header_textcolor': {
    930925                controls: [ 'header_textcolor' ],
    931                 callback: function( to ) { return 'blank' !== to }
     926                callback: function( to ) { return 'blank' !== to; }
    932927            }
    933928        }, function( settingId, o ) {
     
    974969            });
    975970
    976             control.library.on( 'click', 'a', function( event ) {
     971            control.library.on( 'click', 'a', function() {
    977972                control.settings.data.set( $(this).data('customizeHeaderImageData') );
    978973            });
     
    999994
    1000995        // Make sure left column gets focus
    1001         var topFocus = $('.back');
     996        topFocus = $('.back');
    1002997        topFocus.focus();
    1003998        setTimeout(function () {
Note: See TracChangeset for help on using the changeset viewer.