...
This page presents a proposal for a new API for User Interface Options. It lays out what we would like to expect of an integrator.
Use Case: Out-of-the-box, default settings, no customization (2nd parties)
Guiding Principles
Setting UIO up out-of-the-box – using default panels, with no customizations – should be simple:
...
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
...
To create UIO and a page enhancer using out-of-the-box schema for default panels:
...
Code Block | ||||
---|---|---|---|---|
| ||||
// A grade defining 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 } } } }); // Add the grade to UIOptions fluid.demands("fluid.uiOptions", "my.integration", { gradeNames: ["my.extra.settings"] }); // 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"] }); |
Once schemas are being used
...
To create UIO and a page enhancer using out-of-the-box schema for default panels:
...