-
Notifications
You must be signed in to change notification settings - Fork 0
/
testFormGenerator.html
76 lines (71 loc) · 2.49 KB
/
testFormGenerator.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Dojo Form Generator</title>
<style type="text/css">
@import "http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/resources/dojo.css";
@import "http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/tundra/tundra.css";
@import "http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojox/grid/resources/Grid.css";
@import "http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojox/grid/resources/claroGrid.css";
@import "http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojox/form/resources/FileInput.css";
@import "FormGenerator.css";
body {
padding: 10px;
}
</style>
<script type="text/javascript">
var djConfig = {
isDebug: false,
parseOnLoad: true,
baseUrl: './',
dojoBlankHtmlUrl: './blank.html',
// map local widget namespaces -> paths relative to baseUrl
modulePaths: {'unc' : '.'}
};
</script>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js"></script>
<script type="text/javascript" src="/libs/uow.js"></script>
<script type="text/javascript" src="/libs/uow/trace.js"></script>
<script src="NamingGameSchema.json"></script>
<script src="Name_That_Animal.json"></script>
<script type="text/javascript">
dojo.require('dojox.json.schema');
dojo.require('unc.FormGenerator');
testSchema = {
title: 'Test Schema',
type: 'object',
properties: {
aSound: {
type: 'string',
title: 'A Sound',
description: 'Sound Input',
format: 'audio'
},
aString: {
type: 'string',
title: 'A String',
description: 'String input'
}
}
};
testSchema = mySchema;
testData = {
aString: 'string value',
aSound: "/Media/Audio/4cd856ac7885446793000035",
};
testData = myData;
dojo.ready(function() {
dojo.connect(dijit.byId('getValue'), 'onClick', function() {
console.log('value');
console.log(myform.get('value'));
});
});
</script>
</head>
<body class="tundra">
<div dojoType="unc.FormGenerator" schema="testSchema", initValue="testData" jsID="myform"></div>
<button id='getValue' dojoType="dijit.form.Button">Value</button>
</body>
</html>