[gen] Added params Type.swidth and Type.sheight to allow for different sizes for the search widgets.
This commit is contained in:
parent
24089ef674
commit
f6b2afc423
9 changed files with 59 additions and 50 deletions
|
@ -73,7 +73,7 @@ img { border: 0; vertical-align: middle}
|
|||
background-color: #d7dee4; border-radius: 2px 2px 2px 2px;
|
||||
box-shadow: 0 2px 4px #A9A9A9 }
|
||||
.focus td { padding: 4px 0px 4px 4px }
|
||||
.discreet { font-size: 90%; }
|
||||
.discreet { font-size: 90%; color: grey }
|
||||
.lostPassword a { font-size: 90%; color: white; padding-left: 1em;}
|
||||
.portlet { width: 150px; border-right: 1px solid #5F7983;
|
||||
background-color: #ededed}
|
||||
|
@ -127,7 +127,6 @@ img { border: 0; vertical-align: middle}
|
|||
.history th { font-style: italic; text-align: left; padding: 0 5px 0 5px }
|
||||
.topSpace { margin-top: 15px;}
|
||||
.bottomSpace { margin-bottom: 15px;}
|
||||
.discreet { color: grey}
|
||||
.pageLink { padding-left: 8px }
|
||||
.footer { font-size: 95% }
|
||||
.footer td { background-color: #CBCBC9; border-top: 1px solid grey;
|
||||
|
|
|
@ -23,14 +23,16 @@
|
|||
<label tal:content="python: _(widget['labelId'])"></label><br>
|
||||
<tal:from define="fromName python: '%s*float' % widgetName">
|
||||
<label tal:attributes="for fromName" tal:content="python: _('search_from')"></label>
|
||||
<input type="text" size="4"
|
||||
<input type="text"
|
||||
tal:attributes="name fromName; maxlength maxChars;
|
||||
value python: widget['sdefault'][0]"/>
|
||||
value python: widget['sdefault'][0];
|
||||
size widget/swidth"/>
|
||||
</tal:from>
|
||||
<tal:to define="toName python: '%s_to' % name">
|
||||
<label tal:attributes="for toName" tal:content="python: _('search_to')"></label>
|
||||
<input type="text" size="4"
|
||||
<input type="text"
|
||||
tal:attributes="name toName; maxlength maxChars;
|
||||
value python: widget['sdefault'][1]"/>
|
||||
value python: widget['sdefault'][1];
|
||||
size widget/swidth"/>
|
||||
</tal:to><br/>
|
||||
</metal:search>
|
||||
|
|
|
@ -23,14 +23,16 @@
|
|||
<label tal:content="python: _(widget['labelId'])"></label><br>
|
||||
<tal:from define="fromName python: '%s*int' % widgetName">
|
||||
<label tal:attributes="for fromName" tal:content="python: _('search_from')"></label>
|
||||
<input type="text" size="4"
|
||||
<input type="text"
|
||||
tal:attributes="name fromName; maxlength maxChars;
|
||||
value python: widget['sdefault'][0]"/>
|
||||
value python: widget['sdefault'][0];
|
||||
size widget/swidth"/>
|
||||
</tal:from>
|
||||
<tal:to define="toName python: '%s_to' % name">
|
||||
<label tal:attributes="for toName" tal:content="python: _('search_to')"></label>
|
||||
<input type="text" size="4"
|
||||
<input type="text"
|
||||
tal:attributes="name toName; maxlength maxChars;
|
||||
value python: widget['sdefault'][1]"/>
|
||||
value python: widget['sdefault'][1];
|
||||
size widget/swidth"/>
|
||||
</tal:to><br/>
|
||||
</metal:search>
|
||||
|
|
|
@ -158,7 +158,8 @@
|
|||
<tal:comment replace="nothing">The search icon if field is queryable</tal:comment>
|
||||
<a tal:condition="python: objs and appyType['queryable']"
|
||||
tal:attributes="href python: '%s/ui/search?className=%s&ref=%s:%s' % (tool.absolute_url(), linkedPortalType, contextObj.UID(), appyType['name'])">
|
||||
<img src="search.gif" tal:attributes="title python: _('search_title')"/></a>
|
||||
<img tal:attributes="title python: _('search_title');
|
||||
src string: $appUrl/ui/search.gif"/></a>
|
||||
</div>
|
||||
|
||||
<tal:comment replace="nothing">Appy (top) navigation</tal:comment>
|
||||
|
@ -265,12 +266,12 @@
|
|||
<label tal:attributes="for andName" tal:content="python: _('search_and')"></label><br/>
|
||||
</tal:operator>
|
||||
<tal:comment replace="nothing">The list of values</tal:comment>
|
||||
<select tal:attributes="name widgetName; size widget/height" multiple="multiple">
|
||||
<select tal:attributes="name widgetName; size widget/sheight" multiple="multiple">
|
||||
<tal:option repeat="v python: tool.getSearchValues(name, className)">
|
||||
<option tal:define="uid python: v[0];
|
||||
title python: tool.getReferenceLabel(name, v[1], className)"
|
||||
tal:attributes="value uid; title title"
|
||||
tal:content="python: tool.truncateValue(title, widget)">
|
||||
tal:attributes="value uid; title title"
|
||||
tal:content="python: tool.truncateValue(title, widget['swidth'])">
|
||||
</option>
|
||||
</tal:option>
|
||||
</select>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
tal:attributes="value python: possibleValue[0];
|
||||
selected python:contextObj.fieldValueSelected(name, possibleValue[0], rawValue);
|
||||
title python: possibleValue[1]"
|
||||
tal:content="python:tool.truncateValue(possibleValue[1], widget)"></option>
|
||||
tal:content="python:tool.truncateValue(possibleValue[1], widget['width'])"></option>
|
||||
</select>
|
||||
</tal:choice>
|
||||
<tal:line condition="python: isOneLine and not isSelect">
|
||||
|
@ -94,7 +94,7 @@
|
|||
<tal:simpleSearch condition="not: widget/isSelect">
|
||||
<input type="text" tal:define="maxChars python: test(widget['maxChars'], widget['maxChars'], '')"
|
||||
tal:attributes="name python: '%s*string-%s' % (widgetName, widget['transform']);
|
||||
maxlength maxChars; size widget/width;
|
||||
maxlength maxChars; size widget/swidth;
|
||||
style python: 'text-transform:%s' % widget['transform'];
|
||||
value widget/sdefault"/>
|
||||
</tal:simpleSearch>
|
||||
|
@ -113,11 +113,11 @@
|
|||
</tal:operator>
|
||||
<tal:comment replace="nothing">The list of values</tal:comment>
|
||||
<select tal:define="preSelected widget/sdefault"
|
||||
tal:attributes="name widgetName; size widget/height" multiple="multiple">
|
||||
tal:attributes="name widgetName; size widget/sheight" multiple="multiple">
|
||||
<option tal:repeat="v python:tool.getPossibleValues(name, withTranslations=True, withBlankValue=False, className=className)"
|
||||
tal:attributes="value python:v[0]; title python: v[1];
|
||||
selected python: v[0] in preSelected"
|
||||
tal:content="python: tool.truncateValue(v[1], widget)">
|
||||
tal:content="python: tool.truncateValue(v[1], widget['swidth'])">
|
||||
</option>
|
||||
</select>
|
||||
</tal:selectSearch><br/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue