2
* Wizard button controllers.
4
* - less infrastructure is provided here than for dialog buttons, as
5
* - closing is not automatically desirable for many wizards (e.g. profile
6
* - creation) where proper application shutdown is required. thus these
7
* - functions simply pass this responsibility on to the wizard designer.
9
* - Use: Include this JS file in your wizard XUL and the accompanying
10
* - wizardOverlay.xul file as an overlay. Then set the overlay handlers
11
* - with doSetWizardButtons(). It is recommended you use this overlay
12
* - with the WizardManager wizard infrastructure. If you do that, you
13
* - don't need to do anything here. Otherwise, use doSetWizardButtons()
14
* - with false or null passed in as the first parameter, and the names
15
* - of your functions passed in as the remaining parameters, see below.
17
* - Ben Goodger (04/11/99)
20
var doNextFunction = null;
21
var doBackFunction = null;
22
var doFinishFunction = null;
23
var doCancelFunction = null;
25
// call this from dialog onload() to allow buttons to call your code.
26
function doSetWizardButtons( wizardManager, nextFunc, backFunc, finishFunc, cancelFunc )
29
doNextFunction = wizardManager.onNext;
30
doBackFunction = wizardManager.onBack;
31
doFinishFunction = wizardManager.onFinish;
32
doCancelFunction = wizardManager.onCancel;
34
doNextFunction = nextFunc;
35
doBackFunction = backFunc;
36
doFinishFunction = finishFunc;
37
doCancelFunction = cancelFunc;
41
// calls function specified for "next" button click.
42
function doNextButton()
48
// calls function specified for "back" button click.
49
function doBackButton()
55
// calls function specified for "finish" button click.
56
function doFinishButton()
58
if ( doFinishFunction )
62
// calls function specified for "cancel" button click.
63
function doCancelButton()
65
if ( doCancelFunction )