New icons and a new pod test.
This commit is contained in:
parent
fd775e17a2
commit
f5a92b7cb0
BIN
gen/plone25/skin/funnel.png
Normal file
BIN
gen/plone25/skin/funnel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 719 B |
117
gen/plone25/skin/navigate.pt
Normal file
117
gen/plone25/skin/navigate.pt
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
<div metal:define-macro="appyNavigate" tal:condition="python: totalNumber > batchSize" align="right">
|
||||||
|
<tal:comment replace="nothing">
|
||||||
|
Buttons for navigating among a list of elements (next, back, first, last, etc).
|
||||||
|
</tal:comment>
|
||||||
|
<table cellpadding="0" cellspacing="0" class="appyNav"
|
||||||
|
tal:define="mustSortAndFilter python: ajaxHookId == 'queryResult';
|
||||||
|
sortKey sortKey|python:'';
|
||||||
|
sortOrder sortOrder|python:'';
|
||||||
|
filterKey filterKey|python:'';
|
||||||
|
sortAndFilter python: test(mustSortAndFilter, ',\'%s\',\'%s\',\'%s\'' % (sortKey, sortOrder, filterKey), '')">
|
||||||
|
<tr>
|
||||||
|
<tal:comment replace="nothing">Go to the first page</tal:comment>
|
||||||
|
<td><img style="cursor:pointer" tal:condition="python: (startNumber != 0) and (startNumber != batchSize)"
|
||||||
|
tal:attributes="src string: $portal_url/skyn/arrowLeftDouble.png;
|
||||||
|
title python: tool.translate('goto_first');
|
||||||
|
onClick python: navBaseCall.replace('**v**', '0'+sortAndFilter)"/></td>
|
||||||
|
<tal:comment replace="nothing">Go to the previous page</tal:comment>
|
||||||
|
<td><img style="cursor:pointer" tal:condition="python: startNumber != 0"
|
||||||
|
tal:define="sNumber python: startNumber - batchSize"
|
||||||
|
tal:attributes="src string: $portal_url/skyn/arrowLeftSimple.png;
|
||||||
|
title python: tool.translate('goto_previous');
|
||||||
|
onClick python: navBaseCall.replace('**v**', str(sNumber)+sortAndFilter)"/></td>
|
||||||
|
<tal:comment replace="nothing">Explain which elements are currently shown</tal:comment>
|
||||||
|
<td class="discreet" valign="middle">
|
||||||
|
<span tal:replace="python: startNumber+1"/>
|
||||||
|
<img tal:attributes="src string: $portal_url/skyn/to.png"/>
|
||||||
|
<span tal:replace="python: startNumber+len(objs)"/> <b>//</b>
|
||||||
|
<span tal:replace="python: totalNumber"/>
|
||||||
|
</td>
|
||||||
|
<tal:comment replace="nothing">Go to the next page</tal:comment>
|
||||||
|
<td><img style="cursor:pointer" tal:condition="python: sNumber < totalNumber"
|
||||||
|
tal:define="sNumber python: startNumber + batchSize"
|
||||||
|
tal:attributes="src string: $portal_url/skyn/arrowRightSimple.png;
|
||||||
|
title python: tool.translate('goto_next');
|
||||||
|
onClick python: navBaseCall.replace('**v**', str(sNumber)+sortAndFilter)"/></td>
|
||||||
|
<tal:comment replace="nothing">Go to the last page</tal:comment>
|
||||||
|
<td><img style="cursor:pointer" tal:condition="python: (startNumber != sNumber) and (startNumber != sNumber-batchSize)"
|
||||||
|
tal:define="lastPageIsIncomplete python: totalNumber % batchSize;
|
||||||
|
nbOfCompletePages python: totalNumber/batchSize;
|
||||||
|
nbOfCountedPages python: test(lastPageIsIncomplete, nbOfCompletePages, nbOfCompletePages-1);
|
||||||
|
sNumber python: (nbOfCountedPages*batchSize)"
|
||||||
|
tal:attributes="src string: $portal_url/skyn/arrowRightDouble.png;
|
||||||
|
title python: tool.translate('goto_last');
|
||||||
|
onClick python: navBaseCall.replace('**v**', str(sNumber)+sortAndFilter)"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div metal:define-macro="objectNavigate" tal:condition="request/nav|nothing" align="right">
|
||||||
|
<tal:comment replace="nothing">
|
||||||
|
Buttons for going to next/previous elements if this one is among bunch of referenced or searched objects.
|
||||||
|
currentNumber starts with 1.
|
||||||
|
</tal:comment>
|
||||||
|
<table cellpadding="0" cellspacing="0"
|
||||||
|
tal:define="navInfo tool/getNavigationInfo;
|
||||||
|
currentNumber navInfo/currentNumber;
|
||||||
|
totalNumber navInfo/totalNumber;
|
||||||
|
firstUrl navInfo/firstUrl;
|
||||||
|
previousUrl navInfo/previousUrl;
|
||||||
|
nextUrl navInfo/nextUrl;
|
||||||
|
lastUrl navInfo/lastUrl;
|
||||||
|
sourceUrl navInfo/sourceUrl;
|
||||||
|
backText navInfo/backText">
|
||||||
|
<tr>
|
||||||
|
<tal:comment replace="nothing">Go to the source URL (search or referred object)</tal:comment>
|
||||||
|
<td><a tal:condition="sourceUrl" tal:attributes="href sourceUrl"><img style="cursor:pointer"
|
||||||
|
tal:attributes="src string: $portal_url/skyn/gotoSource.png;
|
||||||
|
title python: backText + ' : ' + tool.translate('goto_source')"/></a></td>
|
||||||
|
<tal:comment replace="nothing">Go to the first page</tal:comment>
|
||||||
|
<td><a tal:condition="firstUrl" tal:attributes="href firstUrl"><img style="cursor:pointer"
|
||||||
|
tal:attributes="src string: $portal_url/skyn/arrowLeftDouble.png;
|
||||||
|
title python: tool.translate('goto_first')"/></a></td>
|
||||||
|
<tal:comment replace="nothing">Go to the previous page</tal:comment>
|
||||||
|
<td><a tal:condition="previousUrl" tal:attributes="href previousUrl"><img style="cursor:pointer"
|
||||||
|
tal:attributes="src string: $portal_url/skyn/arrowLeftSimple.png;
|
||||||
|
title python: tool.translate('goto_previous')"/></a></td>
|
||||||
|
<tal:comment replace="nothing">Explain which element is currently shown</tal:comment>
|
||||||
|
<td class="discreet" valign="middle">
|
||||||
|
<span tal:replace="python: currentNumber"/> <b>//</b>
|
||||||
|
<span tal:replace="python: totalNumber"/>
|
||||||
|
</td>
|
||||||
|
<tal:comment replace="nothing">Go to the next page</tal:comment>
|
||||||
|
<td><a tal:condition="python: nextUrl" tal:attributes="href nextUrl"><img style="cursor:pointer"
|
||||||
|
tal:attributes="src string: $portal_url/skyn/arrowRightSimple.png;
|
||||||
|
title python: tool.translate('goto_next')"/></a></td>
|
||||||
|
<tal:comment replace="nothing">Go to the last page</tal:comment>
|
||||||
|
<td><a tal:condition="lastUrl" tal:attributes="href lastUrl"><img style="cursor:pointer"
|
||||||
|
tal:attributes="src string: $portal_url/skyn/arrowRightDouble.png;
|
||||||
|
title python: tool.translate('goto_last')"/></a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<tal:comment replace="nothing">
|
||||||
|
This macro displays up/down arrows in a table header column for sorting a given column.
|
||||||
|
It requires variables "sortable", 'filterable' and 'fieldName'.
|
||||||
|
</tal:comment>
|
||||||
|
<metal:sortAndFilter define-macro="sortAndFilter">
|
||||||
|
<tal:sort condition="sortable">
|
||||||
|
<img tal:attributes="src string: $portal_url/skyn/sortDown.gif;
|
||||||
|
onClick python: navBaseCall.replace('**v**', '0,\'%s\',\'asc\',\'%s\'' % (fieldName, filterKey))"
|
||||||
|
tal:condition="python: (sortKey != fieldName) or (sortOrder == 'desc')"
|
||||||
|
style="cursor:pointer"/>
|
||||||
|
<img tal:attributes="src string: $portal_url/skyn/sortUp.gif;
|
||||||
|
onClick python: navBaseCall.replace('**v**', '0,\'%s\',\'desc\',\'%s\'' % (fieldName, filterKey))"
|
||||||
|
tal:condition="python: (sortKey != fieldName) or (sortOrder == 'asc')"
|
||||||
|
style="cursor:pointer"/>
|
||||||
|
</tal:sort>
|
||||||
|
<tal:filter condition="filterable">
|
||||||
|
<input type="text" size="7"
|
||||||
|
tal:attributes="id python: '%s_%s' % (ajaxHookId, fieldName);
|
||||||
|
value python: test(filterKey == fieldName, filterValue, '')"/>
|
||||||
|
<img tal:attributes="src string: $portal_url/skyn/funnel.png;
|
||||||
|
onClick python: navBaseCall.replace('**v**', '0,\'%s\',\'%s\',\'%s\'' % (sortKey, sortOrder, fieldName))"
|
||||||
|
style="cursor:pointer"/>
|
||||||
|
</tal:filter>
|
||||||
|
</metal:sortAndFilter>
|
BIN
gen/plone25/skin/sortAsc.png
Normal file
BIN
gen/plone25/skin/sortAsc.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 362 B |
BIN
gen/plone25/skin/sortDesc.png
Normal file
BIN
gen/plone25/skin/sortDesc.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 316 B |
BIN
gen/plone25/skin/sortDown.gif
Executable file
BIN
gen/plone25/skin/sortDown.gif
Executable file
Binary file not shown.
After Width: | Height: | Size: 97 B |
BIN
gen/plone25/skin/sortUp.gif
Executable file
BIN
gen/plone25/skin/sortUp.gif
Executable file
Binary file not shown.
After Width: | Height: | Size: 97 B |
60
pod/test/contexts/XhtmlComplex5.py
Normal file
60
pod/test/contexts/XhtmlComplex5.py
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
xhtmlInput = '''
|
||||||
|
<p>desc 2611-03</p>
|
||||||
|
<p><br /></p>
|
||||||
|
<blockquote>
|
||||||
|
<p>identation 1</p>
|
||||||
|
<p>identation 2</p>
|
||||||
|
<p>identation 3</p>
|
||||||
|
</blockquote>
|
||||||
|
<p><br /></p>
|
||||||
|
<ol><li>point numéroté 1</li>
|
||||||
|
<ol><li>point numéroté 1.1</li><li>point numéroté 1.2</li></ol>
|
||||||
|
<li>point numéroté 2</li>
|
||||||
|
<ol><li>point numéroté 2.1</li><li>point numéroté 2.2</li><li>point numéroté 2.3</li>
|
||||||
|
<ol><li>point numéroté 2.3.1</li><li>point numéroté 2.3.2</li></ol>
|
||||||
|
</ol>
|
||||||
|
<li>point numéroté 3</li></ol>
|
||||||
|
<br />
|
||||||
|
<ul><li>grosse lune niveau 1</li>
|
||||||
|
<ul><li>grosse lune niveau 2</li>
|
||||||
|
<ul><li>grosse lune niveau 3</li>
|
||||||
|
<ul><li>grosse lune niveau 4<br /></li></ul>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<ul>
|
||||||
|
<ul>
|
||||||
|
<ul>
|
||||||
|
<ul><li>grosse lune niveau 5<br /></li>
|
||||||
|
<ul><li>grosse lune niveau 6<br /></li>
|
||||||
|
<ul><li>grosse lune niveau 7</li>
|
||||||
|
<ul><li>grosse lune niveau 8</li>
|
||||||
|
<ul><li>grosse lune niveau 9</li>
|
||||||
|
<ul><li>grosse lune niveau 10</li></ul>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
|
<br /><br />
|
||||||
|
<dl><dt>titre liste 1 </dt><dd>liste 1 </dd><dt>titre liste 2 </dt><dd>liste 2 </dd><dt>titre liste 3 </dt><dd>liste 3 </dd><dt>
|
||||||
|
<div align="center"><b>texte normal<br /></b></div>
|
||||||
|
</dt></dl>
|
||||||
|
<ol type="I"><li>romain maj 1</li><li>romain maj 2</li></ol>
|
||||||
|
<br />
|
||||||
|
<ol type="i"><li>romain 1</li><li>romain 2<br /></li></ol>
|
||||||
|
<dl>
|
||||||
|
<dl><dt><br /></dt></dl>
|
||||||
|
</dl>
|
||||||
|
<ol type="A"><li>alpha maj 1<br /></li><li>alpha maj 2</li></ol>
|
||||||
|
<br />
|
||||||
|
<ol type="a"><li>alpha min 1</li><li>alpha min 2</li></ol>
|
||||||
|
<br />blablabla<br />
|
||||||
|
<dl><dt><br /></dt></dl>
|
||||||
|
'''
|
BIN
pod/test/results/xhtmlComplex5.odt
Normal file
BIN
pod/test/results/xhtmlComplex5.odt
Normal file
Binary file not shown.
Loading…
Reference in a new issue