jenkins-bot has submitted this change and it was merged.

Change subject: Show guiders on hover over question mark too
......................................................................


Show guiders on hover over question mark too

Change-Id: Ic8eb82e220e5b04ca38e2a0a1966d8eace72eccf
---
M resources/ext.gettingstarted.js
1 file changed, 22 insertions(+), 14 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  Swalling: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/resources/ext.gettingstarted.js b/resources/ext.gettingstarted.js
index 5dc461d..e956a0e 100644
--- a/resources/ext.gettingstarted.js
+++ b/resources/ext.gettingstarted.js
@@ -53,6 +53,22 @@
                } );
        }
 
+       function launchTaskGuider() {
+               var $ancestorLi, stepNumber, tourId;
+               $ancestorLi = $( this ).closest( 'li' );
+               stepNumber = $ancestorLi.index() + 1;
+               tourId = gt.makeTourId( {
+                       name: 'gettingstartedpage',
+                       step: stepNumber
+               } );
+
+               // Wait until the event is over before showing it, so the
+               // event doesn't propagate up and hide the guider we just 
showed.
+               window.setTimeout( function () {
+                       mw.libs.guiders.resume( tourId );
+               }, 0 );
+       }
+
        /**
         * Sends them to their intended article, after setting a tour cookie.
         */
@@ -68,23 +84,15 @@
        }
 
        $( function () {
+               var $taskLis = $('#onboarding-tasks li');
+
                // Show the appropriate step from the gettingstartedpage tour 
when the user clicks a
                // question mark help icon.
-               $( '.onboarding-help' ).on( 'click', function ( evt ) {
-                       var $ancestorLi, stepNumber, tourId;
-                       $ancestorLi = $( this ).closest( 'li' );
-                       stepNumber = $ancestorLi.index() + 1;
-                       tourId = gt.makeTourId( {
-                               name: 'gettingstartedpage',
-                               step: stepNumber
+               $taskLis.find( '.onboarding-help' ).click( launchTaskGuider )
+                       .mouseenter( launchTaskGuider )
+                       .mouseleave( function() {
+                               gt.hideAll();
                        } );
-
-                       // Wait until the click event is over before showing 
it, so the
-                       // event doesn't propagate up and hide the guider we 
just showed.
-                       window.setTimeout( function () {
-                               mw.libs.guiders.resume( tourId );
-                       }, 0 );
-               } );
 
                if ( shouldStartTour ) {
                        $( '.onboarding-article-list' ).on( 'click', 'a', 
prepareToSendOnTour);

-- 
To view, visit https://gerrit.wikimedia.org/r/49952
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8eb82e220e5b04ca38e2a0a1966d8eace72eccf
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: feature/gettingstartedv2
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: Massaf <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Spage <[email protected]>
Gerrit-Reviewer: Swalling <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to