Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
javascript
javascript
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
width50%

Access to the default panels would be made easy through a "flavour" of uiOptions (similar to flavours of Reorderer):

Code Block
javascript
javascript

fluid.uiOptionsWithDefaultPanels(container, {
    pathToTemplates: "my/sites/lib/infusion/templates/",
    pathToTocTemplate: "my/sites/",
// filename

would
 
be
 
in
 
a
 
separate option
siteThemeClassName: "foofer-doodle-theme"
});
Column

which would be equivalent to

Code Block
javascript
javascript

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
javascript
javascript
fluid.pageEnhancer({
    gradeNames: [<grade names for desired settings>],
    pathToTocTemplate: "my/sites/", // filename would be in a separate option
    siteThemeClassName: "foofer-doodle-theme"
});
Section
Column
width50%

Access to the default setting would be made easy through a "flavour" of enhancer (similar to flavours of Reorderer):

Code Block
javascript
javascript

fluid.pageEnhancerWithDefaultSetting({
    pathToTocTemplate: "my/sites/", // filename would be in a separate option
    siteThemeClassName: "foofer-doodle-theme"
});
Column

which would be equivalent to

Code Block
javascript
javascript

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
javascript
javascript
// 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
width50%
Code Block
javascript
javascript

// 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
javascript
javascript

// 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
javascript
javascript
// 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"]

});

...