/
auxiliarySchema.js
123 lines (115 loc) · 4.08 KB
/
auxiliarySchema.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
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
/*
Copyright 2013 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
*/
// Declare dependencies
/*global demo:true, fluid, jQuery*/
// JSLint options
/*jslint white: true, funcinvoke: true, undef: true, newcap: true, nomen: true, regexp: true, bitwise: true, browser: true, forin: true, maxerr: 100, indent: 4 */
var demo = demo || {};
(function ($, fluid) {
/**
* Auxiliary Schema
*/
fluid.defaults("demo.auxSchema", {
gradeNames: ["fluid.prefs.auxSchema", "autoInit"],
auxiliarySchema: {
template: "html/prefsEditor.html",
message: "%prefix/prefsEditor.json",
groups: {
speakIncrease: {
"container": ".mpe-speakIncrease",
"template": "%prefix/speakIncrease.html",
"message": "%prefix/speakIncrease.json",
"type": "demo.panels.speakIncrease",
"panels": {
"always": ["speak", "incSize"],
"demo.speakText": ["vol", "wpm"],
"demo.increaseSize": ["cursor", "magFactor", "magPos"]
}
}
},
speak: {
type: "demo.speakText",
enactor: {
type: "demo.enactors.speak"
},
panel: {
type: "demo.panels.speak",
container: ".mpe-speaking-onOff",
template: "%prefix/speak-template.html"
}
},
vol: {
type: "demo.volume",
enactor: {
type: "demo.enactors.vol"
},
panel: {
type: "demo.panels.vol",
container: ".mpe-speaking-vol",
template: "%prefix/slider-template.html"
}
},
wpm: {
type: "demo.wordsPerMinute",
enactor: {
type: "demo.enactors.wpm"
},
panel: {
type: "demo.panels.wpm",
container: ".mpe-speaking-wpm",
template: "%prefix/slider-template.html"
}
},
incSize: {
type: "demo.increaseSize",
enactor: {
type: "demo.enactors.incSize"
},
panel: {
type: "demo.panels.incSize",
container: ".mpe-increasing-onOff",
template: "%prefix/incSize-template.html"
}
},
cursor: {
type: "demo.cursorSize",
enactor: {
type: "demo.enactors.cursor"
},
panel: {
type: "demo.panels.cursor",
container: ".mpe-increasing-cursor",
template: "%prefix/slider-template.html"
}
},
magFactor: {
type: "demo.magnification",
enactor: {
type: "demo.enactors.magFactor"
},
panel: {
type: "demo.panels.magFactor",
container: ".mpe-increasing-magFactor",
template: "%prefix/slider-template.html"
}
},
magPos: {
type: "demo.magnifierPosition",
enactor: {
type: "demo.enactors.magPos"
},
panel: {
type: "demo.panels.magPos",
container: ".mpe-increasing-magPos",
template: "%prefix/radioButton-template.html"
}
}
}
});
})(jQuery, fluid);