appy.gen: first Ploneless version.
This commit is contained in:
parent
5672c81553
commit
d0cbe7e573
360 changed files with 1003 additions and 1017 deletions
37
gen/ui/widgets/computed.pt
Normal file
37
gen/ui/widgets/computed.pt
Normal file
|
@ -0,0 +1,37 @@
|
|||
<tal:comment replace="nothing">View macro for a Computed.</tal:comment>
|
||||
<metal:view define-macro="view">
|
||||
<tal:sync condition="sync">
|
||||
<span tal:condition="widget/plainText" tal:replace="value"/>
|
||||
<span tal:condition="not: widget/plainText" tal:replace="structure value"/>
|
||||
</tal:sync>
|
||||
<tal:async condition="not: sync">
|
||||
<div tal:define= "ajaxHookId python: contextObj.UID() + name"
|
||||
tal:attributes = "id ajaxHookId">
|
||||
<script language="javascript"
|
||||
tal:content="python: 'askComputedField(\'%s\',\'%s\',\'%s\')' % (ajaxHookId, contextObj.absolute_url(), name)">
|
||||
</script>
|
||||
</div>
|
||||
</tal:async>
|
||||
</metal:view>
|
||||
|
||||
<tal:comment replace="nothing">Ajax-called view content of a non sync Computed field.</tal:comment>
|
||||
<metal:view define-macro="viewContent"
|
||||
tal:define="name request/fieldName;
|
||||
widget python: contextObj.getAppyType(name, asDict=True);
|
||||
value python: contextObj.getFieldValue(name);
|
||||
sync python:True">
|
||||
<metal:call use-macro="app/ui/widgets/computed/macros/view"/>
|
||||
</metal:view>
|
||||
|
||||
<tal:comment replace="nothing">Edit macro for a Computed.</tal:comment>
|
||||
<metal:edit define-macro="edit">
|
||||
<metal:call use-macro="app/ui/widgets/computed/macros/view"/>
|
||||
</metal:edit>
|
||||
|
||||
<tal:comment replace="nothing">Cell macro for a Computed.</tal:comment>
|
||||
<metal:cell define-macro="cell">
|
||||
<metal:call use-macro="app/ui/widgets/computed/macros/view"/>
|
||||
</metal:cell>
|
||||
|
||||
<tal:comment replace="nothing">Search macro for a Computed.</tal:comment>
|
||||
<metal:search define-macro="search"></metal:search>
|
Loading…
Add table
Add a link
Reference in a new issue