[Infusion-users] What syntax for single inlineEdit?

Matt Zumwalt collaborate at yourmediashelf.com
Mon Nov 30 20:32:44 UTC 2009

The funny nesting in the id doesn't have any particular purpose in the DOM itself.  It's so that our save function knows how to submit the values to the app (equivalent to the "name" attribute in html form inputs).  The particular syntax is a rails convention.  

I'm not extremely familiar with jquery.  Are you saying that ids in this format will screw up the jquery #id selector?  I tried using a more ordinary id but it didn't help:

<dd id="foo" class="flc-inlineEditable">
  <span class="flc-inlineEdit-text">Foo</span>

    var singleEdit = fluid.inlineEdit("#foo", {});

... this still fails.

On Nov 30, 2009, at 2:17 PM, Antranig Basman wrote:

> This is problematic:
> <dd id="document[creator_values][1]"
> Javascript expressions are not evaluated from within markup - so all you have done here is created a node with the literal id
> "document[creator_values][1]". In general this kind of global storage within the document is not recommended in any case since it pollutes the global namespace. Giving your markup a genuine concrete id or else identifying it to fluid.inlineEdit using a selector will work better.
> Cheers,
> A.
> Matt Zumwalt wrote:
>> I've got the fluid.inlineEdits (multi-edits) working, but now I want to separately initialize just one additional dom node, but I can't get fluid.inlineEdit (single edit) to work.  What am I doing wrong?
>> Sample HTML:
>> <div id="creator_values">
>>  <dd id="document[creator_values][1]" class="flc-inlineEditable">
>>      <span class="flc-inlineEdit-text">Foo</span>
>>  </dd>
>> </div>
>> I've tried this function on init:
>> jQuery(document).ready(function () {
>>    var singleEdit = fluid.inlineEdit("#document[creator_values][1]", {});
>>    singleEdit.edit();
>> }
>> ... also tried this:
>> jQuery(document).ready(function () {
>>    var singleEdit = fluid.inlineEdit("#document_creator_new_values", {});
>>    singleEdit.edit();
>> }
>> ... neither works, but no errors come up either.
>> ------------------------------------------------------------------------
>> _______________________________________________
>> Infusion-users mailing list
>> Infusion-users at fluidproject.org
>> http://fluidproject.org/mailman/listinfo/infusion-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://fluidproject.org/pipermail/infusion-users/attachments/20091130/1f9555d0/attachment.html>

More information about the Infusion-users mailing list