MediaWiki:Guidedtour-tour-wwiiarchtour.js: Difference between revisions

From WWII Archives

(Created page with "// HTML and CSS pokey demonstration. // // Note well that you should run this tour on an editable page with at least // one section. ( function ( gt ) { gt.defineTour( { name: 'wwiiarchtour', steps: [ { title: 'Up', description: '', attachTo: '#ca-edit', position: 'bottom', buttons: [ { action: 'next' } ] }, { title: 'Right', description: '', attachTo: '#ca-edit', position: 'left', buttons: [ { action: 'next' } ] }, {...")
 
No edit summary
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
// HTML and CSS pokey demonstration.
/*
//
* Guided Tour to test guided tour features.
// Note well that you should run this tour on an editable page with at least
*/
// one section.
( function ( gt ) {
( function ( gt ) {
// XXX (mattflaschen, 2012-01-02): See GuidedTourHooks.php
var tour, launchTourButtons,
pageName = mw.config.get( 'wgGuidedTourHelpGuiderUrl' );


gt.defineTour( {
// Should match shouldShowForPage from firstedit.js
name: 'wwiiarchtour',
function shouldShowFirstEdit() {
steps: [ {
return ( mw.config.get( 'wgCanonicalNamespace' ) === '' && mw.config.get( 'wgIsProbablyEditable' ) );
title: 'Up',
}
description: '',
attachTo: '#ca-edit',
position: 'bottom',
 
buttons: [ {
tour = new gt.TourBuilder( {
action: 'next'
/*
} ]
* This is the name of the tour.  It must be lowercase, without any hyphen (-) or
}, {
* period (.) characters.
title: 'Right',
*
description: '',
* If this is an on-wiki tour, it should match the MediaWiki page.  For instance,
attachTo: '#ca-edit',
* if this were on-wiki, it would be MediaWiki:Guidedtour-tour-test.js
position: 'left',
*/
buttons: [ {
name: 'wwiiarchtour'
action: 'next'
} ]
}, {
title: 'Down',
description: '',
attachTo: '.mw-editsection',
position: 'top',
buttons: [ {
action: 'next'
} ]
}, {
title: 'Left',
description: '',
attachTo: '#n-mainpage-description',
position: 'right'
} ]
} );
} );


tour.firstStep( {
name: 'firstmsg',
title: 'Welcome to the WWII Archives!',
description: 'Here you will be able to contribute to writing the most detailed articles on any subject from the WWII era. You will be able to digitize documents, interview survivors and vets, among other things. On this tour we will show you how to easily contribute and use the site.',
overlay: true
} )
.next( 'letsgetstarted' );
tour.step( {
/*
* Callout of left menu
*/
name: 'letsgetstarted',
title: 'Let\'s get started!',
description: 'Click the continue button to start',
// attachment
attachTo: '#n-portal a',
position: '3'
} )
.next( 'warning' )
.back( 'firstmsg' );
tour.step( {
name: 'warning',
title: 'Feel like leaving?',
description: 'If you would like to exit out of the tour, click the x. Warning, if you do and would like to come back, you would have to restart the tour. If you need to come back to the tour page, find it under tools here',
attachTo: '#menu-item_3',
// try descriptive position (5'oclock) and use skin-specific value
position: 'left'
} )
.next( 'skip' )
.back( 'letsgetstarted' );
tour.step( {
name: 'skip',
title: 'Want to skip to editing and uploading?',
description: 'If you want to skip the basic intro to the site and instead want to learn to start editing, you may start by clicking on the link for the editing part of the tour below.',
attachTo: '#n-portal a',
position: '3'
})
.next( 'gotomainpage' )
.back( 'warning' );
tour.step( {
name: 'gotomainpage',
title: 'Go to the Main Page',
description: 'First, go to the Main Archives Page by clicking on it under "Navigation"',
attachTo: '#menu-item_1',
position: 'top',
buttons: [ {
// This makes a button which acts like a wikilink to 'Help:Guided tours/guider'
action: 'wikiLink',
page: 'WWII_Archives:Home',
name: 'Go to Main Page',
// This specifies that the button takes you to the next step of a process,
// which affects its appearance.
type: 'progressive'
} ]
} )
.back( 'warning' );
tour.step ( {
name: 'mainpage',
title: 'Welcome to the Main Page!',
} )
.next( '' )
.back( 'gotomainpage' );
/*.next( pageName ? 'descriptionpage' : 'launchtour' )
.back( 'callout' );*/
}( mw.guidedTour ) );
}( mw.guidedTour ) );

Latest revision as of 13:48, 12 February 2024

/*
 * Guided Tour to test guided tour features.
 */
( function ( gt ) {
	// XXX (mattflaschen, 2012-01-02): See GuidedTourHooks.php
	var tour, launchTourButtons,
		pageName = mw.config.get( 'wgGuidedTourHelpGuiderUrl' );

	// Should match shouldShowForPage from firstedit.js
	function shouldShowFirstEdit() {
		return ( mw.config.get( 'wgCanonicalNamespace' ) === '' && mw.config.get( 'wgIsProbablyEditable' ) );
	}
	
	

	tour = new gt.TourBuilder( {
		/*
		 * This is the name of the tour.  It must be lowercase, without any hyphen (-) or
		 * period (.) characters.
		 *
		 * If this is an on-wiki tour, it should match the MediaWiki page.  For instance,
		 * if this were on-wiki, it would be MediaWiki:Guidedtour-tour-test.js
		 */
		name: 'wwiiarchtour'
	} );

	tour.firstStep( {
		name: 'firstmsg',
		title: 'Welcome to the WWII Archives!',
		description: 'Here you will be able to contribute to writing the most detailed articles on any subject from the WWII era. You will be able to digitize documents, interview survivors and vets, among other things. On this tour we will show you how to easily contribute and use the site.',
		overlay: true
	} )
		.next( 'letsgetstarted' );

	tour.step( {
		/*
		 * Callout of left menu
		 */
		name: 'letsgetstarted',
		title: 'Let\'s get started!',
		description: 'Click the continue button to start',
		// attachment
		attachTo: '#n-portal a',
		position: '3'
	} )
		.next( 'warning' )
		.back( 'firstmsg' );

	tour.step( {
		name: 'warning',
		title: 'Feel like leaving?',
		description: 'If you would like to exit out of the tour, click the x. Warning, if you do and would like to come back, you would have to restart the tour. If you need to come back to the tour page, find it under tools here',
		attachTo: '#menu-item_3',
		// try descriptive position (5'oclock) and use skin-specific value
		position: 'left'
	} )
		.next( 'skip' )
		.back( 'letsgetstarted' );
		
	tour.step( {
		name: 'skip',
		title: 'Want to skip to editing and uploading?',
		description: 'If you want to skip the basic intro to the site and instead want to learn to start editing, you may start by clicking on the link for the editing part of the tour below.',
		attachTo: '#n-portal a',
		position: '3'
	})
		.next( 'gotomainpage' )
		.back( 'warning' );
		
	tour.step( {
		name: 'gotomainpage',
		title: 'Go to the Main Page',
		description: 'First, go to the Main Archives Page by clicking on it under "Navigation"',
		attachTo: '#menu-item_1',
		position: 'top',
		buttons: [ {
			// This makes a button which acts like a wikilink to 'Help:Guided tours/guider'
			action: 'wikiLink',
			page: 'WWII_Archives:Home',
			name: 'Go to Main Page',
			// This specifies that the button takes you to the next step of a process,
			// which affects its appearance.
			type: 'progressive'
		} ]
		
	} )
	
		.back( 'warning' );
		
		
	tour.step ( {
		name: 'mainpage',
		title: 'Welcome to the Main Page!',
		
	} )
	.next( '' )
	.back( 'gotomainpage' );
	
	
		/*.next( pageName ? 'descriptionpage' : 'launchtour' )
		.back( 'callout' );*/
}( mw.guidedTour ) );