aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dojox/widget/tests/test_Wizard.html
blob: 5de9f02ac6bd2f06466f67dbd270fe4dbfc83b29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<html>
<head>
<title>Wizard Demo</title>

	<script type="text/javascript" djConfig="isDebug:true,parseOnLoad:true"
		src="../../../dojo/dojo.js"></script>
	<script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script>
	<script type="text/javascript" src="../Wizard.js"></script>

	<script type="text/javascript">
		dojo.require("dojox.widget.Wizard");
	
		function cancel() {
			alert("Wizard Cancelled!");
		}
	    
		function done() {
			alert("Wizard Done!");
		}
	</script>

	<style type="text/css">
		@import "../../../dijit/themes/tundra/tundra.css";
		@import "../../../dijit/tests/css/dijitTests.css"; 
		@import "../Wizard/Wizard.css";
		body {
			font-family : sans-serif;
		}
	</style>
</head>

<body>

	<div style="width:800px; margin:0 auto">

		<h1 class="testTitle">dojox.widget.Wizard tests</h1>

		<p>This example shows a wizard with customized button labels.</p>

		<div id="wizard1" dojoType="dojox.widget.WizardContainer"
			 style="width: 640px; height: 200px;"
			 nextButtonLabel="Go on"
			 >
			<div dojoType="dojox.widget.WizardPane" title="Tab 1">
				<h1>Tab 1</h1>
				<p>Sized content, box one</p>
			</div>
			<div dojoType="dojox.widget.WizardPane">
				<h1>Tab 2</h1>
			</div>
			<div dojoType="dojox.widget.WizardPane" doneFunction="done">
				<h1>Tab 3</h1>
	
				You won't be able to come back, but you can finish now...
			</div>
			<div dojoType="dojox.widget.WizardPane" canGoBack="false">
				<h1>Tab 4</h1>
	
				... and now you can't go back.
			</div>
			<div dojoType="dojox.widget.WizardPane" doneFunction="done">
				<h1>Tab 5</h1>
				... and now you can finish up.
			</div>
		</div>
	
		<p>The next shows the option to hide the inactive buttons, with a smaller width...</p>
	
		<div id="wizard2" dojoType="dojox.widget.WizardContainer" hideDisabled="true" style="width: 50%; height: 200px;">
			<div dojoType="dojox.widget.WizardPane">
				<h1>Step 1 of 3</h1>
				<p>Lorem ipsum dolor sit amet</p>
			</div>
			<div dojoType="dojox.widget.WizardPane">
				<h1>Step 2 of 3</h1>
				<p>consectetur adipisicing elit</p>
			</div>
			<div dojoType="dojox.widget.WizardPane">
				<h1>Step 3 of 3</h1>
				<p>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua</p>
			</div>
		</div>
	
		<p>The next shows blocking moving to the next step with a JS function...</p>
	
		<script>
			function checkAgreement() {
				var frm = document.forms['acceptAgreement'];
				var accept = frm.accept;
				if (!accept.checked) {
					return "You must agree to the terms before continuing.";
				}
			}
		</script>
		<div id="wizard3" dojoType="dojox.widget.WizardContainer" style="width: 600px; height: 400px; margin:0 auto;">
			<div dojoType="dojox.widget.WizardPane" id="Agreement1" passFunction="checkAgreement">
				<h1>Agreement Terms</h1>
	
				<div dojoType="dijit.layout.ContentPane" style="width:400px; border:1px solid #b7b7b7; background:#fff; padding:8px; margin:0 auto; height:200px; overflow:auto; "
					href="../../../dojo/LICENSE"></div>
	
				<form action="#" name="acceptAgreement">
					<p>
					<input type="checkbox" name="accept" value="true"/> I accept the terms of this agreement.
					</p>
				</form>
			</div>
			<div dojoType="dojox.widget.WizardPane" canGoBack="false">
				<h1>Complete</h1>
				<p>The license has been accepted.</p>
			</div>
		</div>
	</div>

</body>
</html>