Versions Compared

Key

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

...

  • A conditional subpanel must contain ONLY ONE adjuster.
  • A controlling preference MUST be a boolean.
  • The pref.name keys MUST refer to a preference referenced in the always property.
  • Note Not every always panel must control a conditional subpanel.
  • Panel definitions are the same for controlling panels or conditional panelssubpanels, conditional subpanels and regular subpanels; there is no difference.

Examples

Code Block
titleAuxiliary shema schema for one controlling preference with two conditional preferences
linenumberstrue
auxiliarySchema: {
    template: "%prefix/prefsEditor.html",
    message: "%prefix/prefsEditor.json",
    groups: {
        speaking: {
            "container": ".mpe-speaking",
            "template": "%prefix/speaking.html",
            "message": "%prefix/speaking.json",
            "type": "demo.panels.speaking",
            "panels": {
				// the 'speak' subpanel will always be displayed
                "always": ["speak"],
				// the volume and words-per-minute subpanels will only display when 'speak' is true
                "demo.speakText": ["vol", "wpm"]
            }
        }
    },
    speak: {
        type: "demo.speakText",
        enactor: {
            type: "demo.enactors.speak"
        },
        panel: {
            type: "demo.panels.speak",
            container: ".mpe-speaking-onOff",
            template: "%prefix/speak-template.html"
        }
    },
    vol: {
        type: "demo.volume",
        enactor: {
            type: "demo.enactors.vol"
        },
        panel: {
            type: "demo.panels.vol",
            container: ".mpe-speaking-vol",
            template: "%prefix/slider-template.html"
        }
    },
    wpm: {
        type: "demo.wordsPerMinute",
        enactor: {
            type: "demo.enactors.wpm"
        },
        panel: {
            type: "demo.panels.wpm",
            container: ".mpe-speaking-wpm",
            template: "%prefix/slider-template.html"
        }
    }
} 

...