]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/wp-pointer.js
WordPress 3.8
[autoinstalls/wordpress.git] / wp-includes / js / wp-pointer.js
index 23b0e43dfe293bbd2a14fb58539bd62e2f309b68..4cea390efa388ed7ae1d7445623db3dedd518d53 100644 (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 ) {
                                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 );
                        }
 
                        $.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();
                        }
                },
 
                        dfd.done( function( content ) {
                                self._update( event, content );
-                       })
+                       });
 
                        // Either o.content is a string...
                        if ( typeof o.content === 'string' ) {
 
                        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() );
                                }
                        }));
                },
                        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++ );
                },