wp/wp-includes/js/wp-pointer.js
changeset 5 5e2f62d02dcd
parent 0 d970ebf37754
child 7 cf61fcea0001
--- a/wp/wp-includes/js/wp-pointer.js	Mon Jun 08 16:11:51 2015 +0000
+++ b/wp/wp-includes/js/wp-pointer.js	Tue Jun 09 03:35:32 2015 +0200
@@ -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++ );
 		},