I'm having problems with excess newlines using an Ajax updater.
I've posted a screen shot:
http://groups.google.com/group/pylons-discuss/web/newlineexample.pdf
You can see from the screen shots that when I click on "expand" (used
to show the action's children) it loads the thing with way too many
newlines. Yet, it's using the same template to generate the page both
times.
I have action.mtl which includes action_guts.mtl. Action.mtl is
essentially a <div> container with an id that allows it to be updated
via [- h.link_to_remote("expand", dict(update="%s"%action.id,
url=h.url_for(action='setpref', name="expand", id=action.id),
method='post'))-]
I have not explained sufficiently; I'm sorry. Please help me
understand if there's some extra formatting that the Ajax.update
function does. Thanks,
Matt
I've trimmed down my template files
Here's action.mtl:
<div id="[- action.id -]">
[[ include action_guts.mtl action=action ]]
</div>
Here's action_guts.mtl:
<span class="name" id="[-"name_%s"%action.id-]">
[- action.name -]
</span>
(
<span class="assignedto" id="[-"assignedto_%s"%action.id-]">
[- d.assignedto -]
</span>
|
<span class="duedate" id="[-"duedate_%s"%action.id-]">
[- d.duedate | date -]
|
history
|
subaction
|
[- h.link_to_remote("expand", dict(update="%s"%action.id,
url=h.url_for(action='setpref', name="expand", id=action.id),
method='post'))-]
|
delete
)
<div class="notes" id="[-"description_%s"%action.id-]">
[- d.description -]
</div>
<div class="actions" id="[- "actions_%s"%action.id-]">
[[ if session['getterdoner_expanded'][action.id] ]]
[[ for subact in action.subactions ]]
[[ lazy-include action.mtl action=subact ]]
[[ /for ]]
[[ /if ]]
</div>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---