Make WordPress Core

Changeset 26195


Ignore:
Timestamp:
11/15/2013 04:41:51 AM (10 years ago)
Author:
nacin
Message:

Fix JSHint errors in six files.

props mdbitz.
fixes ##26011, #26012, #26013, #26014, #26038, #26039.

Location:
trunk/src/wp-includes/js
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/comment-reply.js

    r21592 r26195  
    1 
    2 addComment = {
     1var addComment = {
    32    moveForm : function(commId, parentId, respondId, postId) {
    43        var t = this, div, comm = t.I(commId), respond = t.I(respondId), cancel = t.I('cancel-comment-reply-link'), parent = t.I('comment_parent'), post = t.I('comment_post_ID');
     
    3534            this.onclick = null;
    3635            return false;
    37         }
     36        };
    3837
    3938        try { t.I('comment').focus(); }
     
    4645        return document.getElementById(e);
    4746    }
    48 }
     47};
  • trunk/src/wp-includes/js/customize-base.js

    r22798 r26195  
    130130        },
    131131
    132         bind: function( id, callback ) {
     132        bind: function( id ) {
    133133            this.topics = this.topics || {};
    134134            this.topics[ id ] = this.topics[ id ] || $.Callbacks();
     
    137137        },
    138138
    139         unbind: function( id, callback ) {
     139        unbind: function( id ) {
    140140            if ( this.topics && this.topics[ id ] )
    141141                this.topics[ id ].remove.apply( this.topics[ id ], slice.call( arguments, 1 ) );
     
    210210        },
    211211
    212         bind: function( callback ) {
     212        bind: function() {
    213213            this.callbacks.add.apply( this.callbacks, arguments );
    214214            return this;
    215215        },
    216216
    217         unbind: function( callback ) {
     217        unbind: function() {
    218218            this.callbacks.remove.apply( this.callbacks, arguments );
    219219            return this;
  • trunk/src/wp-includes/js/tinymce/mark_loaded_src.js

    r19996 r26195  
     1/* global tinyMCEPreInit, tinymce */
    12(function(){
    23    if ( typeof tinyMCEPreInit === 'undefined' )
     
    1516            markDone( baseurl+'/plugins/'+plugin+'/editor_plugin'+suffix+'.js' );
    1617            markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'.js' );
    17             markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'_dlg.js' )
     18            markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'_dlg.js' );
    1819        }
    1920    });
  • trunk/src/wp-includes/js/wp-auth-check.js

    r24738 r26195  
     1/* global adminpage */
    12// Interim login dialog
    23(function($){
    3     var wrap, check, next;
     4    var wrap, next;
    45
    56    function show() {
     
    1314
    1415            frame = $('<iframe id="wp-auth-check-frame" frameborder="0">').attr( 'title', noframe.text() );
    15             frame.load( function(e) {
     16            frame.load( function() {
    1617                var height, body;
    1718
     
    6869
    6970        // When on the Edit Post screen, speed up heartbeat after the user logs in to quickly refresh nonces
    70         if ( typeof adminpage != 'undefined' && ( adminpage == 'post-php' || adminpage == 'post-new-php' )
    71              && typeof wp != 'undefined' && wp.heartbeat ) {
     71        if ( typeof adminpage != 'undefined' && ( adminpage == 'post-php' || adminpage == 'post-new-php' ) &&
     72            typeof wp != 'undefined' && wp.heartbeat ) {
    7273
    7374            wp.heartbeat.interval( 'fast', 1 );
     
    99100        schedule();
    100101        wrap = $('#wp-auth-check-wrap');
    101         wrap.find('.wp-auth-check-close').on( 'click', function(e) {
     102        wrap.find('.wp-auth-check-close').on( 'click', function() {
    102103            hide();
    103104        });
  • trunk/src/wp-includes/js/wp-lists.js

    r25546 r26195  
     1/* global ajaxurl, wpAjax */
    12(function($) {
    23var fs = {add:'ajaxAdd',del:'ajaxDel',dim:'ajaxDim',process:'process',recolor:'recolor'}, wpList;
  • trunk/src/wp-includes/js/wp-pointer.js

    r22798 r26195  
     1/* global wpPointerL10n */
    12/**
    23 * Pointer jQuery widget.
     
    67        zindex = 9999;
    78
    8     $.widget("wp.pointer", {
     9    $.widget('wp.pointer', {
    910        options: {
    1011            pointerClass: 'wp-pointer',
    1112            pointerWidth: 320,
    12             content: function( respond, event, t ) {
     13            content: function() {
    1314                return $(this).text();
    1415            },
     
    6162
    6263            // Handle document transfer
    63             if ( key === "document" && value !== o.document ) {
     64            if ( key === 'document' && value !== o.document ) {
    6465                tip.detach().appendTo( value.body );
    6566
    6667            // Handle class change
    67             } else if ( key === "pointerClass" ) {
     68            } else if ( key === 'pointerClass' ) {
    6869                tip.removeClass( o.pointerClass ).addClass( value );
    6970            }
     
    7374
    7475            // Reposition automatically
    75             if ( key === "position" ) {
     76            if ( key === 'position' ) {
    7677                this.reposition();
    7778
    7879            // Update content automatically if pointer is open
    79             } else if ( key === "content" && this.active ) {
     80            } else if ( key === 'content' && this.active ) {
    8081                this.update();
    8182            }
     
    102103            dfd.done( function( content ) {
    103104                self._update( event, content );
    104             })
     105            });
    105106
    106107            // Either o.content is a string...
     
    236237            this.active = true;
    237238
    238             this._trigger( "open", event, this._handoff() );
    239 
    240             this._trigger( "show", event, this._handoff({
     239            this._trigger( 'open', event, this._handoff() );
     240
     241            this._trigger( 'show', event, this._handoff({
    241242                opened: function() {
    242                     self._trigger( "opened", event, self._handoff() );
     243                    self._trigger( 'opened', event, self._handoff() );
    243244                }
    244245            }));
     
    252253            this.active = false;
    253254
    254             this._trigger( "close", event, this._handoff() );
    255             this._trigger( "hide", event, this._handoff({
     255            this._trigger( 'close', event, this._handoff() );
     256            this._trigger( 'hide', event, this._handoff({
    256257                closed: function() {
    257                     self._trigger( "closed", event, self._handoff() );
     258                    self._trigger( 'closed', event, self._handoff() );
    258259                }
    259260            }));
    260261        },
    261262
    262         sendToTop: function( event ) {
     263        sendToTop: function() {
    263264            if ( this.active )
    264265                this.pointer.css( 'z-index', zindex++ );
Note: See TracChangeset for help on using the changeset viewer.