aboutsummaryrefslogtreecommitdiffstats
path: root/WebContent/openajax/index.html
blob: 222d01b4776c299008f274c79fccf9a9d2a4ae32 (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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
	"http://www.w3.org/TR/html4/loose.dtd">
<!--
/*******************************************************************************
 * HubTest-BasicConformance.html:
 *		Test case for Ajax libraries that verifies whether a given library
 *		supports the most basic requirements from the OpenAjax Hub Specification.
 *
 *		To use this test case against a given Ajax library, this test case
 *		needs to be customized. At a minimum, you will need to replace the
 *		following line:
 *
 *			<script language="JavaScript" type="text/javascript" src="SampleAjaxLibrary.js"></script>
 *
 *		with a <script> element that loads your Ajax library instead of SampleAjaxLibrary.js.
 *
 *		Libraries can make other modifications, but the <div> block
 *		with id=HubTest_BasicConformance" must be left intact.
 *
 *		Other customization instructions are included within the comments in the
 *		various files.
 *
 * Copyright 2007 OpenAjax Alliance
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
 * use this file except in compliance with the License. You may obtain a copy 
 * of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless 
 * required by applicable law or agreed to in writing, software distributed 
 * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the 
 * specific language governing permissions and limitations under the License.
 *
 ******************************************************************************/
-->

<!--	****************************************************************************
			The xmlns declarations are included in this test case below because they are required
			by the OpenAjax Hub Specification which is forward looking to when browsers
			support XML/XHTML properly. Note, however, that xmlns declarations generally have 
			no effect with browsers shipping at the time this test case was developed (early 2007).

			The xmlns:SampleAjaxLibrary declaration should be changed such that
				- "SampleAjaxLibrary" is changed to the prefix used by the given library
				- "http://example.com/SampleAjaxLibrary" is changed to the namespaceURI for the library
			(See documentation on OpenAjax.registerLibrary() for more about prefix and namespaceURI.)
			**************************************************************************** -->

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ITMillToolkit40="http://itmill.com/toolkit">
<head>
	<!--	****************************************************************************
				THE CONTENTS OF THE FOLLOWING HEAD ELEMENTS MUST NOT BE CHANGED
				(except it  is OK to change the location of the referenced files). 
				**************************************************************************** -->
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>OpenAjax Hub Basic Conformance Test: IT Mill Toolkit 4</title>
	<link rel="StyleSheet" href="stylesheets/hubtest.css" type="text/css" />

	<!--	****************************************************************************
				THE FOLLOWING SCRIPT ELEMENTS USUALLY NEED TO BE AT THE TOP OF THE HTML FILE.
				HERE IS THE LIST OF CUSTOMIZATIONS YOU MUST OR MAY DO TO THIS SECTION:

				YOU MUST CUSTOMIZE IT AS FOLLOWS.
					- You must change HubTest-BasicConformance-MyPrefix from "SampleAjaxLibrary"
							to the prefix used by your library.

				YOU MAY CUSTOMIZE THE FOLLOWING LOGIC AS FOLLOWS.
					- Your toolkit might include the OpenAjax Hub (i.e., ../../release/OpenAjax.js)
						within your toolkit distribution or might put the Hub source code in a different
						location than ../../release/OpenAjax.js. Therefore, it is OK to change
						the 'src' attribute or remove the SCRIPT tag for OpenAjax.js entirely
						(if you include the Hub within your toolkit).
						(But be aware that if the Hub is part of your toolkit, you probably have to move
						the SCRIPT tag for HubTest-BasicConformance.js such that it is loaded
						after your toolkit because it makes calls into various OpenAjax.* functions.)

					- If you are using a different implementation of the Hub than the 
						Alliance's reference implementation at http://openajaxallianc.sourceforge.net,
						and your library register load event handlers with the Hub,
						you probably need to change the logic within function HubTest_BasicConformance_Verify_Load()
						to look at your implementation's private variables.
				**************************************************************************** -->
	<script language="JavaScript" type="text/javascript" src="OpenAjax.js"></script>

	<script language="JavaScript" type="text/javascript">
			var HubTest_BasicConformance_MyPrefix = "ITMillToolkit40";

			function HubTest_BasicConformance_Verify_Load() {
				if ((OpenAjax._callbacks.load.library && OpenAjax._callbacks.load.library.length) || 
						(OpenAjax._callbacks.load.component && OpenAjax._callbacks.load.component.length)) {
					loadHandlerWorking = true;
				}
			}

			// Invoke HubTest_BasicConformance_Verify_Load as the first thing that happens
			// during OnLoad event processing. (Determine if callback arrays have been set properly.)
			OpenAjax.addOnLoad("HubTest_BasicConformance_Verify_Load", null, "library");
	</script>

	<script language="JavaScript" type="text/javascript" src="HubTest-BasicConformance.js"></script>

	<!--	****************************************************************************
				YOU MUST REMOVE/REPLACE THE FOLLOWING SCRIPT ELEMENT.
				The <script> tag below that references SampleAjaxLibrary.js must be removed and 
				instead you will need to have your own Ajax library loaded instead.
				**************************************************************************** -->
	<link rel="stylesheet" href="../features/RES/base/css/base-ajax.css" type="text/css" />
	<link rel="stylesheet" href="../features/RES/base/css/calendar-default.css" type="text/css" />
	<script src="../features/RES/base/script/ajax-client.js" type="text/javascript"></script>
	<script src="../features/RES/base/script/base-ajax-components.js" type="text/javascript"></script>
	<script src="../features/RES/base/ext/jscalendar/calendar.js" type="text/javascript"></script>
	<script src="../features/RES/base/ext/jscalendar/lang/calendar-en.js" type="text/javascript"></script>
	<script src="../features/RES/base/ext/jscalendar/calendar-setup.js" type="text/javascript"></script>
	<script src="../features/RES/base/ext/firebug/firebug.js" type="text/javascript"></script>
	<link rel="stylesheet" href="../features/RES/corporate/css/corporate-ajax.css" type="text/css" />
	<script src="../features/RES/corporate/script/corporate-ajax-components.js" type="text/javascript"></script>
	<script src="../features/RES/demo/featurebrowser/components.js" type="text/javascript"></script>
	<link rel="stylesheet" href="../features/RES/demo/featurebrowser/featurebrowser.css" type="text/css" />

	<!--	****************************************************************************
				YOU MAY CUSTOMIZE THE FOLLOWING LOGIC.
					- Instead of having the ConformanceChecks() happen at the end of OnLoad processing
						(as the code below does),
						you might want instead to invoke ConformanaceChecks() manually, particularly if your toolkit
						performs some of its initialization after the OnLoad event has completed.
				**************************************************************************** -->
	<script language="JavaScript" type="text/javascript">
			// Invoke ConformanceChecks so that they happen at the end of OnLoad processing.
			OpenAjax.addOnLoad("ConformanceChecks");
	</script>


</head>

<body class="itmtk">
	<div id="hubtestwin"  style="position:absolute; z-index: 40000; background-color: white; border: 4px ridge gray; margin: 80px;">
	<div style="position: absolute; width: 16px; height: 16px; padding-top: 4px; text-align: center; top: 0; right: 0; background-color: red; border: 1px outset red; cursor: pointer; " onclick="document.getElementById('hubtestwin').style.display='none';">X</div>


	<!--	****************************************************************************
				THE CONTENTS OF THE FOLLOWING DIV BLOCK MUST NOT BE CHANGED.
				(But it's OK if your library needs to move this block elsewhere
				within the document hierarchy and OK if you need to add other
				elements to the BODY.)
				**************************************************************************** -->
	<div id="HubTest_BasicConformance">
		<p id="OpenAjaxBanner" class="imageContainer">
			<a href="http://www.openajax.org">
				<img id="OpenAjaxBanner" src="images/OpenAjaxAllianceBanner.jpg" border="0" width="846px" alt="OpenAjax Alliance banner"/>
			</a>
		</p>
		<h1 class="HubTestTitle">OpenAjax Hub Basic Conformance Test</h1>
		<p id="LibraryName">For library: (unknown)</p>
		<table id="HubTestResults" class="HubTestResults">
			<tbody>
				<tr>
					<td class="HubTestNumber">1</td>
					<td class="HubTestLabel">OpenAjax Conformance Requirement (Libraries): Library Registration</td>
					<td class="HubTestResult" id="registerLibraryResult"><span style="color:red">TEST NOT SUCCESSFUL</span></td>
				</tr>
				<tr>
					<td class="HubTestNumber">2</td>
					<td class="HubTestLabel">OpenAjax Conformance Requirement (Libraries): Globals Registration</td>
					<td class="HubTestResult" id="registerGlobalsResult"><span style="color:red">TEST NOT SUCCESSFUL</span></td>
				</tr>
				<tr>
					<td class="HubTestNumber">3</td>
					<td class="HubTestLabel">OpenAjax Conformance Requirement (Libraries): Load/Unload Handlers Registered Indirectly Through the Hub</td>
					<td class="HubTestResult" id="addOnLoadResult"><span style="color:blue">TEST NOT APPLICABLE</span></td>
				</tr>
				<tr>
					<td class="HubTestNumber">4</td>
					<td class="HubTestLabel">OpenAjax Hub Publish/Subscribe Test</td>
					<td class="HubTestResult" id="PublishSubscribeResult"><span style="color:red">TEST NOT SUCCESSFUL</span></td>
				</tr>
				<tr>
					<td class="HubTestNumber">5</td>
					<td class="HubTestLabel">OpenAjax Hub Markup Scanner Test</td>
					<td class="HubTestResult" id="MarkupScannerResult"><span style="color:red">TEST NOT SUCCESSFUL</span></td>
				</tr>
			</tbody>
		</table>
		<p>Notes:</p>
		<ul>
			<li>A library completely passes this test if all boxes say TEST SUCCEEDED.</li>
			<li>Some toolkits do not initialize themselves during 'load' event processing.
					Because of these situations, it is OK if the load/unload test case says TEST NOT APPLICABLE.</li>
		</ul>
	</div>
	
	
	</div>

	<!--	****************************************************************************
				Extra credit: A library developer might want to include a snippet of content that uses
				his Ajax library to include extra graphical content in order spice up the 
				visual result from the test.
				**************************************************************************** -->

<div id="ajax-wait">Loading...</div>
<div id="ajax-window"></div>
<script language="JavaScript">
	// Initialize client part of the IT Mill Toolkit and start it
	function ITMillToolkit_Start () {
		var client = new itmill.Client(document.getElementById('ajax-window'),"../features/UIDL/","../features/RES/base/client/",document.getElementById('ajax-wait'));
		(new itmill.themes.Demo("../features/RES/demo/")).registerTo(client);
		client.start();
	}
	OpenAjax.addOnLoad("ITMillToolkit_Start", null, "library");
</script>

</body>
</html>