-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
62 lines (55 loc) · 1.77 KB
/
index.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
<!--
index.html
This page is used to run the CollectionSpace UI with the UC Berkeley Natural History Object Exit
extension plugin, using a local development server.
Use the command: npm run devserver
Then open a browser to: http://localhost:8080
-->
<html>
<head>
<meta charset="UTF-8">
<!--
Load the CollectionSpace UI. This places the cspaceUI function into the global namespace.
A compatible version of cspace-ui is specified as a development dependency of this package
(in package.json), so its distribution bundle will be in node_modules.
-->
<script src="/node_modules/cspace-ui/dist/cspaceUI.js"></script>
<!--
Load the UC Berkeley Natural History Object Exit extension plugin. This places the
cspaceUIPluginExtUCBNHObjectExit function into the global namespace.
webpack dev server generates a JS bundle into memory, and updates it as files are edited.
This bundle is served from the URL /cspaceUIPluginExtUCBNHObjectExit.js, but it does not
exist in the filesystem.
-->
<script src="/cspaceUIPluginExtUCBNHObjectExit.js"></script>
</head>
<body>
<div id="cspace"></div>
<script>
const objectexitCustomizer = configContext => {
const { React } = configContext.lib;
const { Field } = configContext.recordComponents;
const { extensions } = configContext.config;
return {
recordTypes: {
objectexit: {
fields: {
document: {
...extensions['ucbnh-objectexit'].fields,
},
},
},
},
};
};
cspaceUI({
serverUrl: 'http://localhost:8180',
prettyUrls: true,
plugins: [
cspaceUIPluginExtUCBNHObjectExit(),
objectexitCustomizer,
],
});
</script>
</body>
</html>