Closed
Bug 953365
Opened 11 years ago
Closed 11 years ago
support checkbox type for simple prefs
Categories
(Add-on SDK Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 710113
People
(Reporter: groovecoder, Unassigned)
Details
Type: checkbox
Description:
Displayed as checkboxes. The type of the stored value is an array.
The options are specified by a mandatory "options" attribute, that is an array of objects with mandatory attributes "label" and "value"
The values of the "value" attributes must be supplied as strings.
Example Specification:
{
"name": "enabled_sites",
"type": "checkbox",
"title": "Enabled Sites",
"options": [
{
"value": "github",
"label": "GitHub",
},
{
"value": "google",
"label": "Google Code Hosting",
}
]
}
Then:
prefs = require('sdk-simple-prefs').prefs;
if (prefs.enabled_sites.indexOf('github') > -1) {
// do the stuff if github is enabled in preferences
}
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•