[Infusion-users] Multiple inline dropdown boxes?

Eli Cochran eli at media.berkeley.edu
Tue Sep 15 16:06:02 UTC 2009


While Michelle's fix is right-on and will work beautifully, the code- 
nut part of me has to point out that ids should only be used for  
unique elements on the page -- elements where there is only one. For  
multiples you should use classes. And while most browsers will  
accommodate multiple elements with the same id, it does cause  
confusion and may result in errors.

So better to change all your id="#draftOrder" attributes to  
class="draftOrder" and change the code to:

	fluid.inlineEdits(".draftOrder");

Oh, and remember, that elements can have multiple classes but only one  
id.

- Eli

On Sep 15, 2009, at 7:43 AM, michelle.dsouza at utoronto.ca wrote:

> Hi Jeremy,
>
> My response is below.
>
>>>
>>>> I'm having some trouble using fluid to render many inline dropdown
>>>> boxes. I can use the normal method to get a single dropdown:
>>>>
>>>>   fluid.inlineEdit.dropdown("#draftOrder");
>
> As you've already discovered, this function will only work for a  
> single dropdown inline edit.
>
>>>>
>>>> But I can't seem to use the ".flc-inlineEditable" class like (I
>>>> think) you're supposed to be able to do with normal text inline  
>>>> edits:
>>>>
>>>>   fluid.inlineEdits("#draftOrder");
>
> This is the correct function to use for multiple dropdown inline  
> edits. The default configuration for 'inlineEdits' creates a simple  
> text inline edit - that is why you are seeing strange behaviour. In  
> order to create multiple drowdown inline edits, you need to pass in  
> some options. Your code may look something like this:
>
>            fluid.inlineEdits("#draftOrder", {
>                applyEditPadding: false,
>                blurHandlerBinder:  
> fluid.inlineEdit.dropdown.blurHandlerBinder,
>                editModeRenderer:  
> fluid.inlineEdit.dropdown.editModeRenderer
>            });
>
>
>>>>
>>>> Is it possible to do something equivalent to:
>>>>
>>>>   fluid.inlineEdits.dropdown("#draftOrder");
>>>>
>
> We don't have this functionality yet but we are planning to revisit  
> the API and behaviour of 'inlineEdits'.
>
> Hope this helps,
>
> Michelle
>
>
>
>
>
> _______________________________________________
> Infusion-users mailing list
> Infusion-users at fluidproject.org
> http://fluidproject.org/mailman/listinfo/infusion-users

. . . . . . . . . . .  .  .   .    .      .         .              .                     .

Eli Cochran
user interaction developer
ETS, UC Berkeley





More information about the Infusion-users mailing list