[Infusion-users] Multiple inline dropdown boxes?

Laurel A. Williams laurel.williams at utoronto.ca
Tue Sep 15 16:45:26 UTC 2009


Hi Eli,

Actually, I was looking at Jeremy's code from the pastebin. There was a 
single #draftOrder, with multiple inline edit dropdowns within it, 
identified by the flc-inlineEditable class. So I believe Jeremy's use of 
id was correct in this context.

Laurel

Eli Cochran wrote:
> 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
>
>
> _______________________________________________
> Infusion-users mailing list
> Infusion-users at fluidproject.org
> http://fluidproject.org/mailman/listinfo/infusion-users
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: laurel_williams.vcf
Type: text/x-vcard
Size: 269 bytes
Desc: not available
URL: <http://fluidproject.org/pipermail/infusion-users/attachments/20090915/32079fa8/attachment.vcf>


More information about the Infusion-users mailing list