Fix JSHint errors in six files.
props mdbitz. fixes ##26011, #26012, #26013, #26014, #26038, #26039. git-svn-id: https://develop.svn.wordpress.org/trunk@26195 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
895e8edada
commit
caf4f48e31
@ -1,5 +1,4 @@
|
|||||||
|
var addComment = {
|
||||||
addComment = {
|
|
||||||
moveForm : function(commId, parentId, respondId, postId) {
|
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');
|
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.style.display = 'none';
|
||||||
this.onclick = null;
|
this.onclick = null;
|
||||||
return false;
|
return false;
|
||||||
}
|
};
|
||||||
|
|
||||||
try { t.I('comment').focus(); }
|
try { t.I('comment').focus(); }
|
||||||
catch(e) {}
|
catch(e) {}
|
||||||
@ -45,4 +44,4 @@ addComment = {
|
|||||||
I : function(e) {
|
I : function(e) {
|
||||||
return document.getElementById(e);
|
return document.getElementById(e);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
@ -129,14 +129,14 @@ window.wp = window.wp || {};
|
|||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
bind: function( id, callback ) {
|
bind: function( id ) {
|
||||||
this.topics = this.topics || {};
|
this.topics = this.topics || {};
|
||||||
this.topics[ id ] = this.topics[ id ] || $.Callbacks();
|
this.topics[ id ] = this.topics[ id ] || $.Callbacks();
|
||||||
this.topics[ id ].add.apply( this.topics[ id ], slice.call( arguments, 1 ) );
|
this.topics[ id ].add.apply( this.topics[ id ], slice.call( arguments, 1 ) );
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
unbind: function( id, callback ) {
|
unbind: function( id ) {
|
||||||
if ( this.topics && this.topics[ id ] )
|
if ( this.topics && this.topics[ id ] )
|
||||||
this.topics[ id ].remove.apply( this.topics[ id ], slice.call( arguments, 1 ) );
|
this.topics[ id ].remove.apply( this.topics[ id ], slice.call( arguments, 1 ) );
|
||||||
return this;
|
return this;
|
||||||
@ -209,12 +209,12 @@ window.wp = window.wp || {};
|
|||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
|
|
||||||
bind: function( callback ) {
|
bind: function() {
|
||||||
this.callbacks.add.apply( this.callbacks, arguments );
|
this.callbacks.add.apply( this.callbacks, arguments );
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
unbind: function( callback ) {
|
unbind: function() {
|
||||||
this.callbacks.remove.apply( this.callbacks, arguments );
|
this.callbacks.remove.apply( this.callbacks, arguments );
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* global tinyMCEPreInit, tinymce */
|
||||||
(function(){
|
(function(){
|
||||||
if ( typeof tinyMCEPreInit === 'undefined' )
|
if ( typeof tinyMCEPreInit === 'undefined' )
|
||||||
return;
|
return;
|
||||||
@ -14,7 +15,7 @@
|
|||||||
if ( plugin && plugin.charAt(0) != '-' ) {
|
if ( plugin && plugin.charAt(0) != '-' ) {
|
||||||
markDone( baseurl+'/plugins/'+plugin+'/editor_plugin'+suffix+'.js' );
|
markDone( baseurl+'/plugins/'+plugin+'/editor_plugin'+suffix+'.js' );
|
||||||
markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'.js' );
|
markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'.js' );
|
||||||
markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'_dlg.js' )
|
markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'_dlg.js' );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
/* global adminpage */
|
||||||
// Interim login dialog
|
// Interim login dialog
|
||||||
(function($){
|
(function($){
|
||||||
var wrap, check, next;
|
var wrap, next;
|
||||||
|
|
||||||
function show() {
|
function show() {
|
||||||
var parent = $('#wp-auth-check'), form = $('#wp-auth-check-form'), noframe = wrap.find('.wp-auth-fallback-expired'), frame, loaded = false;
|
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 = $('<iframe id="wp-auth-check-frame" frameborder="0">').attr( 'title', noframe.text() );
|
||||||
frame.load( function(e) {
|
frame.load( function() {
|
||||||
var height, body;
|
var height, body;
|
||||||
|
|
||||||
loaded = true;
|
loaded = true;
|
||||||
@ -67,8 +68,8 @@
|
|||||||
$(window).off( 'beforeunload.wp-auth-check' );
|
$(window).off( 'beforeunload.wp-auth-check' );
|
||||||
|
|
||||||
// When on the Edit Post screen, speed up heartbeat after the user logs in to quickly refresh nonces
|
// 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' )
|
if ( typeof adminpage != 'undefined' && ( adminpage == 'post-php' || adminpage == 'post-new-php' ) &&
|
||||||
&& typeof wp != 'undefined' && wp.heartbeat ) {
|
typeof wp != 'undefined' && wp.heartbeat ) {
|
||||||
|
|
||||||
wp.heartbeat.interval( 'fast', 1 );
|
wp.heartbeat.interval( 'fast', 1 );
|
||||||
}
|
}
|
||||||
@ -98,7 +99,7 @@
|
|||||||
}).ready( function() {
|
}).ready( function() {
|
||||||
schedule();
|
schedule();
|
||||||
wrap = $('#wp-auth-check-wrap');
|
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();
|
hide();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* global ajaxurl, wpAjax */
|
||||||
(function($) {
|
(function($) {
|
||||||
var fs = {add:'ajaxAdd',del:'ajaxDel',dim:'ajaxDim',process:'process',recolor:'recolor'}, wpList;
|
var fs = {add:'ajaxAdd',del:'ajaxDel',dim:'ajaxDim',process:'process',recolor:'recolor'}, wpList;
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* global wpPointerL10n */
|
||||||
/**
|
/**
|
||||||
* Pointer jQuery widget.
|
* Pointer jQuery widget.
|
||||||
*/
|
*/
|
||||||
@ -5,11 +6,11 @@
|
|||||||
var identifier = 0,
|
var identifier = 0,
|
||||||
zindex = 9999;
|
zindex = 9999;
|
||||||
|
|
||||||
$.widget("wp.pointer", {
|
$.widget('wp.pointer', {
|
||||||
options: {
|
options: {
|
||||||
pointerClass: 'wp-pointer',
|
pointerClass: 'wp-pointer',
|
||||||
pointerWidth: 320,
|
pointerWidth: 320,
|
||||||
content: function( respond, event, t ) {
|
content: function() {
|
||||||
return $(this).text();
|
return $(this).text();
|
||||||
},
|
},
|
||||||
buttons: function( event, t ) {
|
buttons: function( event, t ) {
|
||||||
@ -60,11 +61,11 @@
|
|||||||
tip = this.pointer;
|
tip = this.pointer;
|
||||||
|
|
||||||
// Handle document transfer
|
// Handle document transfer
|
||||||
if ( key === "document" && value !== o.document ) {
|
if ( key === 'document' && value !== o.document ) {
|
||||||
tip.detach().appendTo( value.body );
|
tip.detach().appendTo( value.body );
|
||||||
|
|
||||||
// Handle class change
|
// Handle class change
|
||||||
} else if ( key === "pointerClass" ) {
|
} else if ( key === 'pointerClass' ) {
|
||||||
tip.removeClass( o.pointerClass ).addClass( value );
|
tip.removeClass( o.pointerClass ).addClass( value );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,11 +73,11 @@
|
|||||||
$.Widget.prototype._setOption.apply( this, arguments );
|
$.Widget.prototype._setOption.apply( this, arguments );
|
||||||
|
|
||||||
// Reposition automatically
|
// Reposition automatically
|
||||||
if ( key === "position" ) {
|
if ( key === 'position' ) {
|
||||||
this.reposition();
|
this.reposition();
|
||||||
|
|
||||||
// Update content automatically if pointer is open
|
// Update content automatically if pointer is open
|
||||||
} else if ( key === "content" && this.active ) {
|
} else if ( key === 'content' && this.active ) {
|
||||||
this.update();
|
this.update();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -101,7 +102,7 @@
|
|||||||
|
|
||||||
dfd.done( function( content ) {
|
dfd.done( function( content ) {
|
||||||
self._update( event, content );
|
self._update( event, content );
|
||||||
})
|
});
|
||||||
|
|
||||||
// Either o.content is a string...
|
// Either o.content is a string...
|
||||||
if ( typeof o.content === 'string' ) {
|
if ( typeof o.content === 'string' ) {
|
||||||
@ -235,11 +236,11 @@
|
|||||||
|
|
||||||
this.active = true;
|
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() {
|
opened: function() {
|
||||||
self._trigger( "opened", event, self._handoff() );
|
self._trigger( 'opened', event, self._handoff() );
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
@ -251,15 +252,15 @@
|
|||||||
var self = this;
|
var self = this;
|
||||||
this.active = false;
|
this.active = false;
|
||||||
|
|
||||||
this._trigger( "close", event, this._handoff() );
|
this._trigger( 'close', event, this._handoff() );
|
||||||
this._trigger( "hide", event, this._handoff({
|
this._trigger( 'hide', event, this._handoff({
|
||||||
closed: function() {
|
closed: function() {
|
||||||
self._trigger( "closed", event, self._handoff() );
|
self._trigger( 'closed', event, self._handoff() );
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
sendToTop: function( event ) {
|
sendToTop: function() {
|
||||||
if ( this.active )
|
if ( this.active )
|
||||||
this.pointer.css( 'z-index', zindex++ );
|
this.pointer.css( 'z-index', zindex++ );
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user