mediawiki-extensions-Visual.../modules/ve/init/mw/tours/vegendersurvey.js
Matthew Flaschen 3b4b0c3c89 Add GuidedTour survey about user gender
Disabled by default, enabled with $wgVisualEditorEnableGenderSurvey.

Change-Id: I2b4aba6a95a33474c3e68423d478aa78e57d86ad
2013-07-02 00:13:38 +02:00

31 lines
896 B
JavaScript

/*global mw */
( function ( $, gt ) {
gt.defineTour( {
name: 'vegendersurvey',
isSinglePage: true,
// shouldLog tells GuidedTour to provide additional logging (step impressions, etc.)
shouldLog: true,
steps: [ {
titlemsg: 'guidedtour-tour-vegendersurvey-title',
descriptionmsg: 'guidedtour-tour-vegendersurvey-description',
allowAutomaticOkay: false,
overlay: true,
buttons: [ {
namemsg: 'guidedtour-tour-vegendersurvey-male',
onclick: function () {
ve.init.mw.genderSurvey.logAndEndTour( 'male' );
}
}, {
namemsg: 'guidedtour-tour-vegendersurvey-female',
onclick: function () {
ve.init.mw.genderSurvey.logAndEndTour( 'female' );
}
}, {
namemsg: 'guidedtour-tour-vegendersurvey-optout',
onclick: function () {
ve.init.mw.genderSurvey.logAndEndTour( 'opt-out' );
}
} ]
} ]
} );
} ( jQuery, mw.guidedTour ) );