A modal window that serves as a UI for the Preferences Gadget example.
Extends
Requires
- module:explorer/widgets/controlgroups/BooleanControlGroup
- module:explorer/widgets/controlgroups/StringControlGroup
- module:explorer/widgets/controlgroups/EnumControlGroup
- module:explorer/widgets/controlgroups/ListControlGroup
Methods
-
addPrefsChangedListener(listener)
-
Adds a listener function to the instance variable prefsChangedListeners.
Parameters:
Name Type Description listener
Function A callback function that updates the prefs and rerenders the gadget. -
addPrefsToUI()
-
Adds the prefs gadget's metadata to the modal.
-
addPrefToUI()
-
Adds each pref in prefs to the modal.
-
destroy()
-
Destroys the PreferencesDialog.
-
getPrefs() → {Object}
-
Gets the prefs from the control groups.
Returns:
The prefs object assembled from the control groups.- Type
- Object
-
isValid() → {Boolean}
-
Checks whether the prefs' fields are valid (has values).
Returns:
Whether or not the fields are valid.- Type
- Boolean
-
notifyPrefsChangedListeners()
-
Adds each pref in prefs to the modal.
-
postCreate()
-
Called right before widget is added to the dom. See link for more information.
- Source:
- See:
-
setPrefs(prefs)
-
Sets each control group that exists in a spec's prefs.
Parameters:
Name Type Description prefs
Object The prefs object in a gadget's metadata. -
startup()
-
Called right after widget is added to the dom. See link for more information.
- Source:
- See: