Closed Bug 732746 Opened 12 years ago Closed 11 years ago

Prompt service should support multiple inputs of the same type

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(blocking-fennec1.0 -)

RESOLVED DUPLICATE of bug 830175
Tracking Status
blocking-fennec1.0 --- -

People

(Reporter: wesj, Unassigned)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
For one of my extensions, I want to menulists in a prompt dialog. We can do that right now, but in the return value, we only return one type of boxes values (i.e. the return looks like: { menulist: "0" }. We should support putting multiple inputs of the same type on a dialog at the same time (I think we luck out with username+password because, while they're both textboxes, one is a password type textbox and the other is normal).
Attachment #602675 - Flags: review?(mark.finkle)
Attachment #602675 - Attachment is patch: true
Comment on attachment 602675 [details] [diff] [review]
Patch


>     private class PromptInput {
>         private String label = "";
>         private String type  = "";
>         private String hint  = "";
>+        private String id    = "";

Remove the extra spaces please (in the other lines too)

Seems like a simple patch. Is this all that's needed?
Attachment #602675 - Flags: review?(mark.finkle) → review+
Yep. With this callers can specify an with the message like:

msg = {
  type: "Prompt:Show",
  inputs: [
    { type: "text" },
    { type: "text", id: "myText2" },
  ]
}

and get back a result like:

{ text: "text1", myText2: "text2" }

if they don't pass in an id they will receive:

{ text: "text2" }
I assume this would work too:

msg = {
  type: "Prompt:Show",
  inputs: [
    { type: "text", id: "myText1" },
    { type: "text", id: "myText2" },
  ]
}
Yep. :) Should at least. I'll double check through my addon before I check in. And start looking at hooking up some Robotium soon too.
blocking-fennec1.0: --- → ?
blocking-fennec1.0: ? → -
I knew I fixed this, but forgot to check it in. kats fixed it in bug 830175 again. Closing.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: