From: <fg...@us...> - 2007-02-15 22:58:57
|
Revision: 263 http://svn.sourceforge.net/openutils/?rev=263&view=rev Author: fgiust Date: 2007-02-15 14:58:53 -0800 (Thu, 15 Feb 2007) Log Message: ----------- use path in select if name is not set Modified Paths: -------------- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/select.tag Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag 2007-02-14 21:52:07 UTC (rev 262) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/input.tag 2007-02-15 22:58:53 UTC (rev 263) @@ -50,6 +50,11 @@ <c:set var="type" value="text" /> <c:set var="datepicker" value="${true}" /> </c:if> + <c:if test="${su:substringBefore(type, ' ') == 'date'}"> + <c:set var="type" value="text" /> + <c:set var="dateformat" value="${su:substringAfter(type, ' ')}" /> + <c:set var="datepickernew" value="${true}" /> + </c:if> <c:if test="${maxlength ge 256}"> <c:set var="type" value="textarea" /> </c:if> @@ -112,6 +117,22 @@ <![endif]--> <script type="text/javascript">createCalendar('${status.value}', 'divdata${name}', '${name}')</script> </c:if> + <c:if test="${datepickernew}"> + <a title="seleziona" class="calbtn" id="${name}_cal"> + <span>C</span> + </a> + <script type="text/javascript"> + <![CDATA[ + Calendar.setup({ + inputField : "${name}", // id of the input field + ifFormat : "${dateformat}", // format of the input field, es "%Y-%m-%d %H:%M" + button : "${name}_cal", // trigger for the calendar (button ID) + align : "Bl", // alignment (defaults to "Bl") + singleClick : true + }); + ]]> + </script> + </c:if> <div class="clear"><!-- --></div> </div> </c:otherwise> Modified: trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/select.tag =================================================================== --- trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/select.tag 2007-02-14 21:52:07 UTC (rev 262) +++ trunk/openutils-tags-spring/src/main/resources/META-INF/tags/ou/select.tag 2007-02-15 22:58:53 UTC (rev 263) @@ -43,7 +43,10 @@ </c:choose> <c:set var="divclass">formelement</c:set> <c:if test="${empty(name)}"> - <c:set var="name">${su:substringAfter(path, ".")}</c:set> + <c:set var="name" value="${su:substringAfter(path, '.')}" /> + <c:if test="${empty(name)}"> + <c:set var="name" value="${path}" /> + </c:if> </c:if> <c:choose> <c:when test="${!nobind}"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |