From: <fg...@us...> - 2010-05-09 11:14:28
|
Revision: 2363 http://openutils.svn.sourceforge.net/openutils/?rev=2363&view=rev Author: fgiust Date: 2010-05-09 11:14:22 +0000 (Sun, 09 May 2010) Log Message: ----------- MEDIA-113 Make the media tag and media selection dialog compatible with existing images added using the file control Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag trunk/openutils-mgnlmedia/src/main/resources/mgnl-files/templates/samples-media/paragraph-mediatag.jsp Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-05-07 08:52:08 UTC (rev 2362) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-05-09 11:14:22 UTC (rev 2363) @@ -155,6 +155,14 @@ </c:when> </c:choose> </c:when> + <c:when test="${!empty property and fn:startsWith(item, '/')}"> + <!-- fn:startsWith() is needed to avoid passing an uuid to cmsu:img. See MAGNOLIA-3196, don't call the image tag with non-binary properties --> + <cmsu:img contentNode="${node}" nodeDataName="${property}" width="${width gt 0 ? width : ''}" height="${height gt 0? height : ''}" /> + <![CDATA[<!-- missing media: ${item} -->]]> + </c:when> + <c:when test="${fn:startsWith(item, '/')}"> + <![CDATA[<img src="${pageContext.request.contextPath}${item}" alt="" width="${width gt 0 ? width : ''}" height="${height gt 0? height : ''}" />]]> + </c:when> <c:otherwise> <![CDATA[<!-- missing media: ${item} -->]]> </c:otherwise> Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-files/templates/samples-media/paragraph-mediatag.jsp =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-files/templates/samples-media/paragraph-mediatag.jsp 2010-05-07 08:52:08 UTC (rev 2362) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-files/templates/samples-media/paragraph-mediatag.jsp 2010-05-09 11:14:22 UTC (rev 2363) @@ -7,11 +7,13 @@ <div> <h3>${mediaNode.description}</h3> <div> - <pre>&lt;media:media item="${content.media}" width="50" height="30" videoImagePreview="true" /></pre> - <media:media item="${content.media}" width="50" height="30" videoImagePreview="true" /> - <pre>&lt;media:media thumbnail="true" /></pre> - <pre>&lt;media:media contentNode="${'$'}{content}" nodeDataName="media" thumbnail="true" /></pre> - <media:media thumbnail="true" /> + <pre>&lt;media:media property="media" width="50" height="30" videoImagePreview="true" /></pre> + <media:media property="media" width="50" height="30" videoImagePreview="true" /> + + <br/> + <pre>&lt;media:media property="media" thumbnail="true" /></pre> + <media:media property="media" thumbnail="true" /> + </div> </div> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |