name |
string
|
|
|
Step name. This identifier is not displayed to
the end user. but can be used as a reference to a step |
title |
string
|
|
|
Title of guider. Used only
for on-wiki tours |
titlemsg |
string
|
|
|
Message key for title of
guider. Used only for extension-defined tours |
description |
string
|
mw.guidedTour.WikitextDescription
|
mw.Title
|
|
|
Description of guider. A string is treated as HTML, except that for
backwards compatibility, if onShow is gt.parseDescription or
gt.getPageAsDescription, the string is interpreted as described in onShow. |
descriptionmsg |
string
|
|
|
Message key for
description of guider. Used only for extension-defined tours. |
position |
string
|
Object
|
|
|
A positional string specifying
what part of the element the guider attaches to. One of 'topLeft',
'top', 'topRight', 'rightTop', 'right', 'rightBottom', 'bottomRight',
'bottom', 'bottomLeft', 'leftBottom', 'left', 'leftTop'
Or:
{
fallback: 'defaultPosition'
particularSkin: 'otherPosition',
anotherSkin: 'anotherPosition'
}
particularSkin should be replaced with a MediaWiki skin name, such as
monobook. There can be entries for any number of skins.
'defaultPosition' is used if there is no custom value for a skin.
The position is automatically horizontally flipped if needed (LTR/RTL
interfaces). |
attachTo |
string
|
Object
|
jQuery
|
|
|
The selector for an element to
attach to, a jQuery-wrapped node, or an object for that purpose with the same
format as position. The values within the structure can also be selectors or
jQuery-wrapped nodes. |
width |
number
|
optional
|
400
|
Width, in pixels. |
onShow |
function
|
optional
|
|
Function to execute immediately
before the guider is shown. Using this for gt.parseDescription or
gt.getPageAsDescription is deprecated. However, a string value of description
is interpreted as follows:
- gt.parseDescription - Treat description as wikitext
- gt.getPageAsDescription - Treat description as the name of a description
page on the wiki
|
allowAutomaticOkay |
boolean
|
optional
|
true
|
By default, if
you do not specify an Okay or Next button, an Okay button will be generated.
To suppress this, set allowAutomaticOkay to false for the step. |
allowAutomaticNext |
boolean
|
optional
|
true
|
By default, if
you call .next() and do not specify a Next button a next button will be
generated automatically.
To suppress this, set allowAutomaticNext to false for the step. |
autoFocus |
boolean
|
optional
|
true
|
By default, the browser will scroll
to make the guider visible.
To avoid this, set autoFocus to false for the step. |
closeOnEscape |
boolean
|
optional
|
true
|
Close the guider
when the user presses the Escape key |
closeOnClickOutside |
boolean
|
optional
|
true
|
Close the
guider when the user clicks elsewhere on screen |
buttons |
Array
|
|
|
Buttons for step. See also above
regarding button behavior and defaults. Each button can have:
Properties:
| Name |
Type |
Attributes |
Description |
name |
string
|
|
Text of button. Used only
for on-wiki tours |
namemsg |
string
|
|
Message key for text of
button. Used only for extension-defined tours |
onclick |
function
|
|
Function to execute
when button is clicked |
action |
string
|
|
Action keyword. For actions listed below, you do not need to manually
specify button name and onclick.
Instead, you can pass a defined action as part of the buttons array. The
actions currently supported are:
-
next - Goes to the next step. Requires mw.guidedTour.StepBuilder#next
also be called, to specify how the next step is determined.
-
back - Goes back specified step. Requires mw.guidedTour.StepBuilder#back
also be called, to specify how the step is determined.
-
okay - An arbitrary function is used for okay button. This must have
an accompanying 'onclick':
{
action: 'okay',
onclick: function () {
// Do something...
}
}
-
end - Ends the tour.
-
wikiLink - links to a page on the same wiki
-
externalLink - links to an external page
A button action with no parameters looks like:
{
action: 'next'
}
Multiple action fields for a single button are not possible. |
page |
string
|
|
Page to link to, only for
the wikiLink action |
url |
string
|
|
URL to link to, only for the
externalLink action |
type |
string
|
|
string to add button type
class. Currently supports: progressive, destructive. |
classString |
string
|
optional
|
Space-separated list of
additional class names |
|