Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Warning

DRAFT, still incomplete

Div
stylemax-width: 30%;
classfloatRight
Panel
titleOn This Page

Table of Contents
maxLevel5

Panel
titleSee Also

...

Subpanels are defined with the regular the fluid.prefs.panel grade, the same grade used for defining regular panels.

Code Block
linenumberstrue
fluid.defaults("my.panels.subanel", {
    gradeNames: ["fluid.prefs.panel

...

", "autoInit"],
    ...
});

Composite Panel Definition

...

In the code block above, the panels list on line 7 is an array of string subpanel names used as names. These are derived from the keys in the auxiliary schema to define the subpanelsthat associate panels with preferences.

Templates

A composite panel and its subpanels each have their own HTML template. The composite panel template must contain elements that will serve as containers for the subpanels.

...

Section
Column

Composite panel HTML template:

Code Block
linenumberstrue
<div class="my-composite-panel">
    <div class="subpanel-1-container"></div>
    <div class="subpanel-12-container"></div>
</div>
Column

Auxiliary schema section defining panels:

Code Block
linenumberstrue
preference1: {
    "type": "fluid.prefs.preference1",
    "panel": {
        "type": "fluid.prefs.panel.subpanel1",
        // Reference to the selector defined in the composite panel template for subpanel1
        "container": ".subpanel-1-container",
        "template": "%prefix/subpanel1.html",
        "message": "%prefix/subpanel1.json"
    }
},
preference2: {
    "type": "fluid.prefs.preference2",
    "panel": {
        "type": "fluid.prefs.panel.subpanel2",
        // Reference to the selector defined in the composite panel template for this subpanel2
        "container": ".subpanel-2-container",
        "template": "%prefix/subpanel2.html",
        "message": "%prefix/subpanel2.json"
    }
},
groups: {
    composite1: {
        "container": ".my-composite-1",
        "template": "%prefix/composite1.html",
        "message": "%prefix/composite1.json",
        "type": "fluid.prefs.panel.composite1",
        "panels": ["preference1", "preference2"]
    }
}

...