-
Notifications
You must be signed in to change notification settings - Fork 97
/
uiOptionsDemo.js
97 lines (84 loc) · 3.42 KB
/
uiOptionsDemo.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
/*
Copyright 2011 OCAD University
Copyright 2011 Lucendo Development Ltd.
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, window*/
// 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) {
demo.initFatPanel = function (container) {
var builder = fluid.uiOptions.builder({
gradeNames: ["fluid.uiOptions.auxSchema.starter"]
});
fluid.invokeGlobalFunction(builder.options.assembledUIOGrade, [".flc-uiOptions-fatPanel"]);
};
// /**
// * The UI Options interface is defined by several HTML templates. The component
// * needs to know where those templates are. This variable will be used by all
// * versions of the component.
// */
// var pathToTemplates = "../../../components/uiOptions/html/";
// var pathToMessages = "../../../components/uiOptions/messages/";
// /**
// * The UI Enhancer's Table of Contents uses a template. This path variable is used by all
// * three versions of the component, as well as by the UI Enhancer present in the Preview
// * itself.
// */
// var pathToTocTemplate = "../../../components/tableOfContents/html/TableOfContents.html";
// /**
// * Initialize a settings store for the page.
// */
// demo.initSettingsStore = function () {
// fluid.globalSettingsStore();
// };
// /**
// * Initialize UI Enhancer for the page. This function is used by the two full-page
// * UI Options pages as well as by the demo page itself.
// */
// demo.initPageEnhancer = function (customThemeName) {
// fluid.pageEnhancer({
// gradeNames: ["fluid.uiEnhancer.starterEnactors"],
// tocTemplate: pathToTocTemplate,
// classnameMap: {
// theme: {
// "default": customThemeName
// }
// }
// });
// };
// var commonOpts = {
// gradeNames: ["fluid.uiOptions.transformDefaultPanelsOptions"],
// // Tell UIOptions where to find all the templates, relative to this path
// templatePrefix: pathToTemplates,
// messagePrefix: pathToMessages,
// templateLoader: {
// options: {
// gradeNames: ["fluid.uiOptions.starterFatPanelTemplateLoader"]
// }
// },
// messageLoader: {
// options: {
// gradeNames: ["fluid.uiOptions.starterMessageLoader"]
// }
// },
// uiOptions: {
// options: {
// gradeNames: ["fluid.uiOptions.starterPanels", "fluid.uiOptions.rootModel.starter", "fluid.uiOptions.uiEnhancerRelay"]
// }
// }
// };
// /**
// * Initialize UI Options on the "Fat Panel" version. This version of UI Options uses the
// * page itself as a live preview.
// */
// demo.initFatPanel = function (container) {
// fluid.uiOptions.fatPanel(container, commonOpts);
// };
})(jQuery, fluid);