mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-22 20:24:36 +00:00
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:
@@ -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++ );
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user