Changeset 26195 for trunk/src/wp-includes/js/wp-pointer.js
- Timestamp:
- 11/15/2013 04:41:51 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/wp-pointer.js
r22798 r26195 1 /* global wpPointerL10n */ 1 2 /** 2 3 * Pointer jQuery widget. … … 6 7 zindex = 9999; 7 8 8 $.widget( "wp.pointer", {9 $.widget('wp.pointer', { 9 10 options: { 10 11 pointerClass: 'wp-pointer', 11 12 pointerWidth: 320, 12 content: function( respond, event, t) {13 content: function() { 13 14 return $(this).text(); 14 15 }, … … 61 62 62 63 // Handle document transfer 63 if ( key === "document"&& value !== o.document ) {64 if ( key === 'document' && value !== o.document ) { 64 65 tip.detach().appendTo( value.body ); 65 66 66 67 // Handle class change 67 } else if ( key === "pointerClass") {68 } else if ( key === 'pointerClass' ) { 68 69 tip.removeClass( o.pointerClass ).addClass( value ); 69 70 } … … 73 74 74 75 // Reposition automatically 75 if ( key === "position") {76 if ( key === 'position' ) { 76 77 this.reposition(); 77 78 78 79 // Update content automatically if pointer is open 79 } else if ( key === "content"&& this.active ) {80 } else if ( key === 'content' && this.active ) { 80 81 this.update(); 81 82 } … … 102 103 dfd.done( function( content ) { 103 104 self._update( event, content ); 104 }) 105 }); 105 106 106 107 // Either o.content is a string... … … 236 237 this.active = true; 237 238 238 this._trigger( "open", event, this._handoff() );239 240 this._trigger( "show", event, this._handoff({239 this._trigger( 'open', event, this._handoff() ); 240 241 this._trigger( 'show', event, this._handoff({ 241 242 opened: function() { 242 self._trigger( "opened", event, self._handoff() );243 self._trigger( 'opened', event, self._handoff() ); 243 244 } 244 245 })); … … 252 253 this.active = false; 253 254 254 this._trigger( "close", event, this._handoff() );255 this._trigger( "hide", event, this._handoff({255 this._trigger( 'close', event, this._handoff() ); 256 this._trigger( 'hide', event, this._handoff({ 256 257 closed: function() { 257 self._trigger( "closed", event, self._handoff() );258 self._trigger( 'closed', event, self._handoff() ); 258 259 } 259 260 })); 260 261 }, 261 262 262 sendToTop: function( event) {263 sendToTop: function() { 263 264 if ( this.active ) 264 265 this.pointer.css( 'z-index', zindex++ );
Note: See TracChangeset
for help on using the changeset viewer.