Repository navigation
Expand file tree
/
Copy pathuio.js
More file actions
72 lines (66 loc) · 2.69 KB
/
Copy pathuio.js
File metadata and controls
72 lines (66 loc) · 2.69 KB
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
/**
* Copyright 2015–2019 OCAD University
*
* Licensed under the Educational Community License (ECL), Version 2.0 or the New
* BSD license. You may not use this file except in compliance with one these
* Licenses.
*
* You may obtain a copy of the ECL 2.0 License and BSD License at
* https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
*
* @package User_Interface_Options
*/
jQuery(document).ready(function ($) {
var tocPlaceholder = "<div class='flc-toc-tocContainer toc'> </div>";
var uioTemplateSpec = {
uioTemplate : {
url : uioData.pluginUrl + "template.html"
}
};
// Fetch the template text, and when we have it, proceed
fluid.fetchResources(uioTemplateSpec, function (spec) {
// Add the sliding panel template to the page
$(uioData.uioTemplateSelector).prepend(spec.uioTemplate.resourceText);
// Add the table of contents placeholder to the page
$(uioData.uioTocSelector).prepend(tocPlaceholder);
// Create the prefs editor
fluid.uiOptions(".flc-prefsEditor-separatedPanel", {
preferences: [
"fluid.prefs.textSize",
"fluid.prefs.lineSpace",
"fluid.prefs.textFont",
"fluid.prefs.contrast",
"fluid.prefs.tableOfContents",
"fluid.prefs.enhanceInputs",
"fluid.prefs.letterSpace",
"fluid.prefs.wordSpace",
"fluid.prefs.syllabification",
],
auxiliarySchema: {
terms: {
templatePrefix: uioData.pluginUrl + "lib/infusion/src/framework/preferences/html",
messagePrefix: uioData.pluginUrl + "lib/infusion/src/framework/preferences/messages",
},
"fluid.prefs.tableOfContents": {
enactor: {
tocTemplate: uioData.pluginUrl + "lib/infusion/src/components/tableOfContents/html/TableOfContents.html",
tocMessage: uioData.pluginUrl + "lib/infusion/src/framework/preferences/messages/tableOfContents-enactor.json",
ignoreForToC: {
overviewPanel: ".flc-overviewPanel",
},
}
},
"fluid.prefs.syllabification": {
enactor: {
terms: {
patternPrefix: uioData.pluginUrl + "lib/infusion/src/lib/hypher/patterns"
}
}
}
},
prefsEditorLoader: {
lazyLoad: true,
},
});
});
});