-
Notifications
You must be signed in to change notification settings - Fork 97
/
assortedContent.js
86 lines (76 loc) · 3.14 KB
/
assortedContent.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
/*
Copyright 2011 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
*/
/* global fluid */
var assortedContent = assortedContent || {};
(function ($, fluid) {
"use strict";
/* Our demo script */
assortedContent.slidingPrefsEditor = function () {
// First, start up Settings Store and Page Enhancer
fluid.prefs.globalSettingsStore();
fluid.pageEnhancer({
uiEnhancer: {
gradeNames: ["fluid.uiEnhancer.starterEnactors"],
classnameMap: {
theme: {
"default": "assortedContent-theme-basic"
}
},
tocTemplate: "../../../../../src/components/tableOfContents/html/TableOfContents.html"
}
});
fluid.defaults("fluid.assortedContent.native", {
iframeRenderer: {
markupProps: {
src: "../../../../../src/framework/preferences/html/SeparatedPanelPrefsEditorFrame-nativeHTML.html"
}
}
});
fluid.defaults("fluid.assortedContent.jQueryUI", {
iframeRenderer: {
markupProps: {
src: "../../../../../src/framework/preferences/html/SeparatedPanelPrefsEditorFrame-jQueryUI.html"
}
}
});
// Next, start up Preferences Editor
fluid.prefs.separatedPanel(".flc-prefsEditor-separatedPanel", {
gradeNames: ["fluid.prefs.transformDefaultPanelsOptions", "fluid.prefs.initialModel.starter", "fluid.contextAware"],
terms: {
templatePrefix: "../../../../../src/framework/preferences/html/",
messagePrefix: "../../../../../src/framework/preferences/messages/"
},
messageLoader: {
gradeNames: ["fluid.prefs.starterMessageLoader"]
},
templateLoader: {
gradeNames: ["fluid.prefs.starterSeparatedPanelTemplateLoader"]
},
prefsEditor: {
gradeNames: ["fluid.prefs.starterPanels", "fluid.prefs.uiEnhancerRelay"]
},
contextAwareness: {
sliderVariety: {
checks: {
nativeHTML: {
contextValue: "{fluid.prefsWidgetType}",
equals: "nativeHTML",
gradeNames: "fluid.assortedContent.native"
},
jQueryUI: {
contextValue: "{fluid.prefsWidgetType}",
equals: "jQueryUI",
gradeNames: "fluid.assortedContent.jQueryUI"
}
}
}
}
});
};
})(jQuery, fluid);