-
Notifications
You must be signed in to change notification settings - Fork 3
/
schema.js
executable file
·66 lines (45 loc) · 1.27 KB
/
schema.js
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
require([
"config/paths",
"submodules/fenix-ui-menu/js/paths",
"submodules/fenix-ui-common/js/Compiler"
], function(compilerConfig, menuConfig, Compiler) {
menuConfig.baseUrl = "submodules/fenix-ui-menu/js";
Compiler.resolve([menuConfig], compilerConfig);
require(['jquery','underscore','bootstrap','handlebars','bootstrap-btn','amplify',
'schemas/contact',
'schemas/definitions',
'config/services',
'i18n!nls/questions'
], function ($, _, bootstrap, Handlebars, bootstrapBtn, Amplify,
schemaContact,
schemaDefs,
Config,
Quests
) {
var SCHEMAPDF = {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"definitions": {},
"properties": {}
},
$l = $('#loader'),
$t = $("#schemaPdf").show();
SCHEMAPDF.definitions = schemaDefs;
$l.append('definitions.js ');
var paths = _.map(Config.sections, function(id) {
return SCHEMAPDF.properties[id] = Config.dirSchema + id;
});
require(paths, function() {
var schemas = arguments;
for(var i = 0; i < schemas.length; i++) {
var id = Config.sections[i];
SCHEMAPDF.properties[id] = schemas[i];
$l.append(id+'.js ');
}
$t.text( JSON.stringify(SCHEMAPDF, null, 4) );
});
$t.on('click', function(e) {
$(this).select();
})
});
});