...
Code Block |
---|
|
fluid.uiOptions(container, {
gradeNames: [<gradenames of desired panels>],
pathToTemplates: "my/sites/lib/infusion/templates/",
pathToTocTemplate: "my/sites/", // filename would be in a separate option
siteThemeClassName: "foofer-doodle-theme"
});
|
Section |
---|
Column |
---|
| Access to the default panels would be made easy through a "flavour" of uiOptions (similar to flavours of Reorderer): Code Block |
---|
|
fluid.uiOptionsWithDefaultPanels(container, {
pathToTemplates: "my/sites/lib/infusion/templates/",
pathToTocTemplate: "my/sites/", |
| // filenamewouldbeinaseparate option
siteThemeClassName: "foofer-doodle-theme"
});
|
|
Column |
---|
which would be equivalent to Code Block |
---|
|
fluid.uiOptions(container, {
gradeNames: ["fluid.uiOptions.defaultPanels"],
pathToTemplates: "my/sites/lib/infusion/templates/",
pathToTocTemplate: "my/sites/", |
| // filename would be in a separate option
siteThemeClassName: "foofer-doodle-theme"
});
|
|
|
To create only a page enhancer:
Code Block |
---|
|
fluid.pageEnhancer({
gradeNames: [<grade names for desired settings>],
pathToTocTemplate: "my/sites/", // filename would be in a separate option
siteThemeClassName: "foofer-doodle-theme"
});
|
Section |
---|
Column |
---|
| Access to the default setting would be made easy through a "flavour" of enhancer (similar to flavours of Reorderer): Code Block |
---|
|
fluid.pageEnhancerWithDefaultSetting({
pathToTocTemplate: "my/sites/", // filename would be in a separate option
siteThemeClassName: "foofer-doodle-theme"
});
|
|
Column |
---|
which would be equivalent to Code Block |
---|
|
fluid.pageEnhancer({
gradeNames: ["fluid.uiOptions.defaultSettings"],
pathToTocTemplate: "my/sites/", // filename would be in a separate option
siteThemeClassName: "foofer-doodle-theme"
});
|
|
|
Once schemas are being used
...
Code Block |
---|
|
// Define Aa grade definingwith the extra panels and their default settings
fluid.defaults("my.extra.panels", {
defaultSiteSettings: {
foofer: 7,
doodle: true
},
components: {
foofer: {
funcName: "my.integration.fooferPanel",
options: {
template: "myFooferPanel.html" // why can't panels load their own templates?
// if necessary
}
},
doodle: {
funcName: "my.integration.doodlePanel",
options: {
template: "myDoodlePanel.html"
// if necessary
}
}
}
});
|
To add the grade to UIO, use one of the following:
Section |
---|
Column |
---|
| Code Block |
---|
|
// Add the grade to UIOptions as part of creation
fluid.uiOptions(container, {
gradeNames: ["fluid.uiOptions.defaultPanels", "my.extra.panels"],
pathToTemplates: "my/sites/lib/infusion/templates/",
pathToTocTemplate: "my/sites/", // filename would be in a separate option
siteThemeClassName: "foofer-doodle-theme"
});
|
|
Column |
---|
Code Block |
---|
|
// Add the grade to UIOptionsfluid.demands("fluid.uiOptions", "my.integration", {
gradeNames: ["my.extra. |
| settings"]
});
panels"]
});
// create UIO
fluid.uiOptions(container, {
gradeNames: ["fluid.uiOptions.defaultPanels"],
pathToTemplates: "my/sites/lib/infusion/templates/",
pathToTocTemplate: "my/sites/", // filename would be in a separate option
siteThemeClassName: "foofer-doodle-theme"
});
|
|
|
Code Block |
---|
|
// A grade defining the extra enactors and their default settings
fluid.defaults("my.extra.settings", {
defaultSiteSettings: {
foofer: 7,
doodle: true
},
components: {
foofer: {
funcName: "my.integration.fooferEnactor",
options: {
// if necessary
}
},
doodle: {
funcName: "my.integration.doodleEnactor",
options: {
// if necessary
}
}
}
});
// Add the grade to UIEnhancer
fluid.demands("fluid.uiEnhancer", "my.integration", {
gradeNames: ["my.extra.settings"]
});
|
...