Fix JSHint errors in six files.

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

Built from https://develop.svn.wordpress.org/trunk@26195


git-svn-id: http://core.svn.wordpress.org/trunk@26103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-11-15 04:42:09 +00:00
parent 99245534a5
commit a87fec4616
7 changed files with 32 additions and 29 deletions

View File

@ -1,5 +1,4 @@
addComment = {
var addComment = {
moveForm : function(commId, parentId, respondId, postId) {
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');
@ -34,7 +33,7 @@ addComment = {
this.style.display = 'none';
this.onclick = null;
return false;
}
};
try { t.I('comment').focus(); }
catch(e) {}
@ -45,4 +44,4 @@ addComment = {
I : function(e) {
return document.getElementById(e);
}
}
};

View File

@ -1 +1 @@
addComment={moveForm:function(a,b,c,d){var e,f=this,g=f.I(a),h=f.I(c),i=f.I("cancel-comment-reply-link"),j=f.I("comment_parent"),k=f.I("comment_post_ID");if(g&&h&&i&&j){f.respondId=c,d=d||!1,f.I("wp-temp-form-div")||(e=document.createElement("div"),e.id="wp-temp-form-div",e.style.display="none",h.parentNode.insertBefore(e,h)),g.parentNode.insertBefore(h,g.nextSibling),k&&d&&(k.value=d),j.value=b,i.style.display="",i.onclick=function(){var a=addComment,b=a.I("wp-temp-form-div"),c=a.I(a.respondId);if(b&&c)return a.I("comment_parent").value="0",b.parentNode.insertBefore(c,b),b.parentNode.removeChild(b),this.style.display="none",this.onclick=null,!1};try{f.I("comment").focus()}catch(l){}return!1}},I:function(a){return document.getElementById(a)}};
var addComment={moveForm:function(a,b,c,d){var e,f=this,g=f.I(a),h=f.I(c),i=f.I("cancel-comment-reply-link"),j=f.I("comment_parent"),k=f.I("comment_post_ID");if(g&&h&&i&&j){f.respondId=c,d=d||!1,f.I("wp-temp-form-div")||(e=document.createElement("div"),e.id="wp-temp-form-div",e.style.display="none",h.parentNode.insertBefore(e,h)),g.parentNode.insertBefore(h,g.nextSibling),k&&d&&(k.value=d),j.value=b,i.style.display="",i.onclick=function(){var a=addComment,b=a.I("wp-temp-form-div"),c=a.I(a.respondId);if(b&&c)return a.I("comment_parent").value="0",b.parentNode.insertBefore(c,b),b.parentNode.removeChild(b),this.style.display="none",this.onclick=null,!1};try{f.I("comment").focus()}catch(l){}return!1}},I:function(a){return document.getElementById(a)}};

View File

@ -129,14 +129,14 @@ window.wp = window.wp || {};
return this;
},
bind: function( id, callback ) {
bind: function( id ) {
this.topics = this.topics || {};
this.topics[ id ] = this.topics[ id ] || $.Callbacks();
this.topics[ id ].add.apply( this.topics[ id ], slice.call( arguments, 1 ) );
return this;
},
unbind: function( id, callback ) {
unbind: function( id ) {
if ( this.topics && this.topics[ id ] )
this.topics[ id ].remove.apply( this.topics[ id ], slice.call( arguments, 1 ) );
return this;
@ -209,12 +209,12 @@ window.wp = window.wp || {};
return value;
},
bind: function( callback ) {
bind: function() {
this.callbacks.add.apply( this.callbacks, arguments );
return this;
},
unbind: function( callback ) {
unbind: function() {
this.callbacks.remove.apply( this.callbacks, arguments );
return this;
},

View File

@ -1,3 +1,4 @@
/* global tinyMCEPreInit, tinymce */
(function(){
if ( typeof tinyMCEPreInit === 'undefined' )
return;
@ -14,7 +15,7 @@
if ( plugin && plugin.charAt(0) != '-' ) {
markDone( baseurl+'/plugins/'+plugin+'/editor_plugin'+suffix+'.js' );
markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'.js' );
markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'_dlg.js' )
markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'_dlg.js' );
}
});
})();

View File

@ -1,6 +1,7 @@
/* global adminpage */
// Interim login dialog
(function($){
var wrap, check, next;
var wrap, next;
function show() {
var parent = $('#wp-auth-check'), form = $('#wp-auth-check-form'), noframe = wrap.find('.wp-auth-fallback-expired'), frame, loaded = false;
@ -12,7 +13,7 @@
});
frame = $('<iframe id="wp-auth-check-frame" frameborder="0">').attr( 'title', noframe.text() );
frame.load( function(e) {
frame.load( function() {
var height, body;
loaded = true;
@ -67,8 +68,8 @@
$(window).off( 'beforeunload.wp-auth-check' );
// When on the Edit Post screen, speed up heartbeat after the user logs in to quickly refresh nonces
if ( typeof adminpage != 'undefined' && ( adminpage == 'post-php' || adminpage == 'post-new-php' )
&& typeof wp != 'undefined' && wp.heartbeat ) {
if ( typeof adminpage != 'undefined' && ( adminpage == 'post-php' || adminpage == 'post-new-php' ) &&
typeof wp != 'undefined' && wp.heartbeat ) {
wp.heartbeat.interval( 'fast', 1 );
}
@ -98,7 +99,7 @@
}).ready( function() {
schedule();
wrap = $('#wp-auth-check-wrap');
wrap.find('.wp-auth-check-close').on( 'click', function(e) {
wrap.find('.wp-auth-check-close').on( 'click', function() {
hide();
});
});

View File

@ -1,3 +1,4 @@
/* global ajaxurl, wpAjax */
(function($) {
var fs = {add:'ajaxAdd',del:'ajaxDel',dim:'ajaxDim',process:'process',recolor:'recolor'}, wpList;

View File

@ -1,3 +1,4 @@
/* global wpPointerL10n */
/**
* Pointer jQuery widget.
*/
@ -5,11 +6,11 @@
var identifier = 0,
zindex = 9999;
$.widget("wp.pointer", {
$.widget('wp.pointer', {
options: {
pointerClass: 'wp-pointer',
pointerWidth: 320,
content: function( respond, event, t ) {
content: function() {
return $(this).text();
},
buttons: function( event, t ) {
@ -60,11 +61,11 @@
tip = this.pointer;
// Handle document transfer
if ( key === "document" && value !== o.document ) {
if ( key === 'document' && value !== o.document ) {
tip.detach().appendTo( value.body );
// Handle class change
} else if ( key === "pointerClass" ) {
} else if ( key === 'pointerClass' ) {
tip.removeClass( o.pointerClass ).addClass( value );
}
@ -72,11 +73,11 @@
$.Widget.prototype._setOption.apply( this, arguments );
// Reposition automatically
if ( key === "position" ) {
if ( key === 'position' ) {
this.reposition();
// Update content automatically if pointer is open
} else if ( key === "content" && this.active ) {
} else if ( key === 'content' && this.active ) {
this.update();
}
},
@ -101,7 +102,7 @@
dfd.done( function( content ) {
self._update( event, content );
})
});
// Either o.content is a string...
if ( typeof o.content === 'string' ) {
@ -235,11 +236,11 @@
this.active = true;
this._trigger( "open", event, this._handoff() );
this._trigger( 'open', event, this._handoff() );
this._trigger( "show", event, this._handoff({
this._trigger( 'show', event, this._handoff({
opened: function() {
self._trigger( "opened", event, self._handoff() );
self._trigger( 'opened', event, self._handoff() );
}
}));
},
@ -251,15 +252,15 @@
var self = this;
this.active = false;
this._trigger( "close", event, this._handoff() );
this._trigger( "hide", event, this._handoff({
this._trigger( 'close', event, this._handoff() );
this._trigger( 'hide', event, this._handoff({
closed: function() {
self._trigger( "closed", event, self._handoff() );
self._trigger( 'closed', event, self._handoff() );
}
}));
},
sendToTop: function( event ) {
sendToTop: function() {
if ( this.active )
this.pointer.css( 'z-index', zindex++ );
},