Add support for radio button elements for inline preferences

VERIFIED FIXED in mozilla8

Status

()

enhancement
VERIFIED FIXED
8 years ago
8 years ago

People

(Reporter: whimboo, Assigned: darktrojan)

Tracking

({dev-doc-complete})

Trunk
mozilla8
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +
in-litmus -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0a1) Gecko/20110630 Firefox/7.0a1

We don't support radio buttons for inline preferences yet. I think that a lot of add-ons would benefit from its availability.
Version: 5 Branch → 7 Branch
Assignee: nobody → geoff
Status: NEW → ASSIGNED
Try run for 64c44d9e8629 is complete.
Detailed breakdown of the results available here:
    http://tbpl.mozilla.org/?tree=Try&rev=64c44d9e8629
Results:
    success: 13
    warnings: 4
Total buildrequests: 17
Builds available at http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/geoff@darktrojan.net-64c44d9e8629
Posted patch patch (obsolete) — Splinter Review
I wanted to do this without requiring a <radiogroup>, but the radio buttons won't work inside anonymous content.

(The try warnings are unrelated.)
Attachment #549058 - Flags: review?(dtownsend)
Posted patch patch with other pref types (obsolete) — Splinter Review
I've changed the logic to also accept bool or char prefs.
Attachment #549058 - Attachment is obsolete: true
Attachment #549556 - Flags: review?(dtownsend)
Attachment #549058 - Flags: review?(dtownsend)
Blocks: 669390
Attachment #549556 - Flags: review?(dtownsend) → review?(bmcbride)
Comment on attachment 549556 [details] [diff] [review]
patch with other pref types

Review of attachment 549556 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/mozapps/extensions/content/setting.xml
@@ +491,5 @@
> +        <![CDATA[
> +          let self = this;
> +          this.radioGroup.addEventListener("command", function() {
> +            self.valueToPreference();
> +          }, false);

If you wanted to, you could instead do:

this.radioGroup.addEventListener("command", this.valueToPreference.bind(this), false);

(I only mention it because its new, few people know about it, and I think it's nicer.)
Attachment #549556 - Flags: review?(bmcbride) → review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/9230c6aa00ea
Flags: in-testsuite+
Flags: in-litmus-
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Posted patch patch v3 (obsolete) — Splinter Review
Attachment #549556 - Attachment is obsolete: true
patching file toolkit/themes/pinstripe/mozapps/extensions/extensions.css
Hunk #1 FAILED at 1092
1 out of 1 hunks FAILED -- saving rejects to file toolkit/themes/pinstripe/mozapps/extensions/extensions.css.rej
patching file toolkit/themes/winstripe/mozapps/extensions/extensions.css
Hunk #1 FAILED at 1114
1 out of 1 hunks FAILED -- saving rejects to file toolkit/themes/winstripe/mozapps/extensions/extensions.css.rej
Keywords: checkin-needed
Posted patch patch v4Splinter Review
Attachment #552309 - Attachment is obsolete: true
Keywords: checkin-needed
http://hg.mozilla.org/integration/mozilla-inbound/rev/d7d667d640b2

Noting the reviewer in your commit message is helpful
Target Milestone: --- → mozilla8
Version: 7 Branch → Trunk
http://hg.mozilla.org/mozilla-central/rev/d7d667d640b2
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Geoff, the example extension you have uploaded lately as attachment to another bug, is it part of the tree? If yes, where can I find it? I would like to have an updated one with all the new features included. Thanks.
I have updated the other example extension meanwhile on my own. And it looks great. Verified fixed on all platforms with builds like Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0a2) Gecko/20110824 Firefox/8.0a2
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.