Improved management of indexes; always provide str and not unicode strings as index values; search screen may now include javascripts and css like those required by the date chooser; removed CSS parser, basic XmlUnmarshaller can do it by itself.
This commit is contained in:
parent
2124cffa5e
commit
a30949a621
15 changed files with 213 additions and 132 deletions
|
@ -78,55 +78,71 @@
|
|||
</metal:cell>
|
||||
|
||||
<tal:comment replace="nothing">Search macro for an Date.</tal:comment>
|
||||
<metal:search define-macro="search">
|
||||
<metal:search define-macro="search"
|
||||
tal:define="years python:range(widget['startYear'], widget['endYear']+1)">
|
||||
<label tal:content="python: tool.translate(widget['labelId'])"></label>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tal:comment replace="nothing">From</tal:comment>
|
||||
<tr tal:define="fromName python: '%s*date' % widgetName">
|
||||
<tr tal:define="yearFromName python: '%s*date' % widgetName;
|
||||
monthFromName python: '%s_from_month' % name;
|
||||
dayFromName python: '%s_from_day' % name;
|
||||
dummyFromName python: '_d_ummy_from_%s' % name;">
|
||||
<td width="10px"> </td>
|
||||
<td>
|
||||
<label tal:content="python: tool.translate('search_from')"></label>
|
||||
</td>
|
||||
<td>
|
||||
<select tal:attributes="name fromName">
|
||||
<input type="hidden" tal:attributes="id dummyFromName; name dummyFromName" originalvalue=""/>
|
||||
<select tal:attributes="id dayFromName; name dayFromName">
|
||||
<option value="">--</option>
|
||||
<option tal:repeat="value python:range(widget['startYear'], widget['endYear']+1)"
|
||||
<option tal:repeat="value python: [str(v).zfill(2) for v in range(1, 32)]"
|
||||
tal:content="value" tal:attributes="value value"></option>
|
||||
</select> /
|
||||
<select tal:attributes="name python: '%s_from_month' % name">
|
||||
</select> /
|
||||
<select tal:attributes="id monthFromName; name monthFromName">
|
||||
<option value="">--</option>
|
||||
<option tal:repeat="value python: [str(v).zfill(2) for v in range(1, 13)]"
|
||||
tal:content="python:tool.getMonthName(value)" tal:attributes="value value"></option>
|
||||
</select> /
|
||||
<select tal:attributes="name python: '%s_from_day' % name">
|
||||
<select tal:attributes="id yearFromName; name yearFromName">
|
||||
<option value="">--</option>
|
||||
<option tal:repeat="value python: [str(v).zfill(2) for v in range(1, 32)]"
|
||||
<option tal:repeat="value python:range(widget['startYear'], widget['endYear']+1)"
|
||||
tal:content="value" tal:attributes="value value"></option>
|
||||
</select>
|
||||
<tal:comment replace="nothing">The icon for displaying the calendar (=date chooser)</tal:comment>
|
||||
<a tal:condition="widget/calendar"
|
||||
tal:attributes="onclick python: 'return showJsCalendar(\'%s\', \'%s\', \'%s\', \'%s\', \'%s\', null, null, %d, %d)' % (monthFromName, dummyFromName, yearFromName, monthFromName, dayFromName, years[0], years[-1])">
|
||||
<img tal:attributes="src string: $portal_url/popup_calendar.gif"/></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tal:comment replace="nothing">To</tal:comment>
|
||||
<tr>
|
||||
<tr tal:define="dummyToName python: '_d_ummy_to_%s' % name;
|
||||
yearToName python: '%s_to_year' % name;
|
||||
monthToName python: '%s_to_month' % name;
|
||||
dayToName python: '%s_to_day' % name">
|
||||
<td></td>
|
||||
<td>
|
||||
<label tal:content="python: tool.translate('search_to')"></label>
|
||||
<label tal:content="python: tool.translate('search_to')"></label>
|
||||
</td>
|
||||
<td>
|
||||
<select tal:attributes="name python: '%s_to_year' % name">
|
||||
<td height="20px;">
|
||||
<input type="hidden" tal:attributes="id dummyToName; name dummyToName" originalvalue=""/>
|
||||
<select tal:attributes="id dayToName; name dayToName">
|
||||
<option value="">--</option>
|
||||
<option tal:repeat="value python:range(widget['startYear'], widget['endYear']+1)"
|
||||
tal:content="value" tal:attributes="value value"></option>
|
||||
<option tal:repeat="value python: [str(v).zfill(2) for v in range(1, 32)]"
|
||||
tal:content="value" tal:attributes="value value"></option>
|
||||
</select> /
|
||||
<select tal:attributes="name python: '%s_to_month' % name">
|
||||
<select tal:attributes="id monthToName; name monthToName">
|
||||
<option value="">--</option>
|
||||
<option tal:repeat="value python: [str(v).zfill(2) for v in range(1, 13)]"
|
||||
tal:content="python:tool.getMonthName(value)" tal:attributes="value value"></option>
|
||||
</select> /
|
||||
<select tal:attributes="name python: '%s_to_day' % name">
|
||||
<select tal:attributes="id yearToName; name yearToName">
|
||||
<option value="">--</option>
|
||||
<option tal:repeat="value python: [str(v).zfill(2) for v in range(1, 32)]"
|
||||
tal:content="value" tal:attributes="value value"></option>
|
||||
<option tal:repeat="value python:range(widget['startYear'], widget['endYear']+1)"
|
||||
tal:content="value" tal:attributes="value value"></option>
|
||||
</select>
|
||||
<a tal:condition="widget/calendar"
|
||||
tal:attributes="onclick python: 'return showJsCalendar(\'%s\', \'%s\', \'%s\', \'%s\', \'%s\', null, null, %d, %d)' % (monthToName, dummyToName, yearToName, monthToName, dayToName, years[0], years[-1])">
|
||||
<img tal:attributes="src string: $portal_url/popup_calendar.gif"/></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<table class="no-style-table" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<tal:comment replace="nothing">Arrows for moving objects up or down</tal:comment>
|
||||
<td class="noPadding" tal:condition="python: (len(objs)>1) and member.has_permission('Modify portal content', contextObj)">
|
||||
<td class="noPadding" tal:condition="python: not appyType['isBack'] and (len(objs)>1) and member.has_permission('Modify portal content', contextObj)">
|
||||
<tal:moveRef define="objectIndex python: contextObj.getAppyRefIndex(fieldName, obj);
|
||||
ajaxBaseCall python: navBaseCall.replace('**v**', '\'%s\',\'ChangeRefOrder\', {\'refObjectUid\':\'%s\', \'move\':\'**v**\'}' % (startNumber, obj.UID()))">
|
||||
<tal:comment replace="nothing">Move up</tal:comment>
|
||||
|
@ -49,7 +49,7 @@
|
|||
</td>
|
||||
<tal:comment replace="nothing">Delete the element</tal:comment>
|
||||
<td class="noPadding">
|
||||
<img tal:condition="python: member.has_permission('Delete objects', obj)"
|
||||
<img tal:condition="python: not appyType['isBack'] and member.has_permission('Delete objects', obj) and obj.mayDelete()"
|
||||
title="Delete" i18n:domain="plone" i18n:attributes="title" style="cursor:pointer"
|
||||
tal:attributes="src string: $portal_url/skyn/delete.png;
|
||||
onClick python:'onDeleteObject(\'%s\')' % obj.UID()"/>
|
||||
|
@ -179,19 +179,10 @@
|
|||
tal:attributes="class python:test(innerRef, 'innerAppyTable', '')">
|
||||
<tr valign="bottom"><td>
|
||||
|
||||
<tal:comment replace="nothing">Show backward reference(s)</tal:comment>
|
||||
<table class="no-style-table" cellspacing="0" cellpadding="0"
|
||||
tal:condition="python: appyType['isBack'] and objs">
|
||||
<tr tal:repeat="obj objs">
|
||||
<td><metal:showObjectTitle use-macro="portal/skyn/widgets/ref/macros/objectTitle" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<tal:comment replace="nothing">Show forward reference(s)</tal:comment>
|
||||
<tal:comment replace="nothing">Show forward or backward reference(s)</tal:comment>
|
||||
<table tal:attributes="class python:test(innerRef, '', 'listing nosort');
|
||||
width python:test(innerRef, '100%', appyType['layouts']['view']['width']);"
|
||||
align="right" tal:condition="python: not appyType['isBack'] and objs" cellpadding="0" cellspacing="0">
|
||||
align="right" tal:condition="python: objs" cellpadding="0" cellspacing="0">
|
||||
<tal:widgets define="widgets python: objs[0].getAppyTypesFromNames(appyType['shownInfo'])">
|
||||
<tr tal:condition="appyType/showHeaders">
|
||||
<th tal:repeat="widget widgets">
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
<label tal:attributes="for andName" tal:content="python: tool.translate('search_and')"></label><br/>
|
||||
</tal:operator>
|
||||
<tal:comment replace="nothing">The list of values</tal:comment>
|
||||
<select tal:attributes="name widgetName" multiple="multiple" size="5">
|
||||
<select tal:attributes="name widgetName; size widget/height" multiple="multiple">
|
||||
<option tal:repeat="v python:tool.getPossibleValues(name, withTranslations=True, withBlankValue=False, className=contentType)"
|
||||
tal:attributes="value python:v[0]; title python: v[1]"
|
||||
tal:content="python: tool.truncateValue(v[1], widget)">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue