From: <san...@us...> - 2010-08-12 00:15:56
|
Revision: 11116 http://wonder.svn.sourceforge.net/wonder/?rev=11116&view=rev Author: santoash Date: 2010-08-12 00:15:50 +0000 (Thu, 12 Aug 2010) Log Message: ----------- some bug fixes to Zoomable image component to make it not fail when there is no valid image source Modified Paths: -------------- branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Components/Nonlocalized.lproj/ERD2WDisplayImageWithUrl.wo/ERD2WDisplayImageWithUrl.wod branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Components/Nonlocalized.lproj/ERDZoomableImage.wo/ERDZoomableImage.html branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Components/Nonlocalized.lproj/ERDZoomableImage.wo/ERDZoomableImage.wod branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Sources/er/directtoweb/components/misc/ERDZoomableImage.java Modified: branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Components/Nonlocalized.lproj/ERD2WDisplayImageWithUrl.wo/ERD2WDisplayImageWithUrl.wod =================================================================== --- branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Components/Nonlocalized.lproj/ERD2WDisplayImageWithUrl.wo/ERD2WDisplayImageWithUrl.wod 2010-08-10 13:51:30 UTC (rev 11115) +++ branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Components/Nonlocalized.lproj/ERD2WDisplayImageWithUrl.wo/ERD2WDisplayImageWithUrl.wod 2010-08-12 00:15:50 UTC (rev 11116) @@ -4,4 +4,6 @@ height = d2wContext.imageHeight; zoomWidth = d2wContext.zoomWidth; zoomHeight = d2wContext.zoomHeight; + noImageString = d2wContext.noImageString; + enableZoomForImage = d2wContext.enableZoomForImage; } Modified: branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Components/Nonlocalized.lproj/ERDZoomableImage.wo/ERDZoomableImage.html =================================================================== --- branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Components/Nonlocalized.lproj/ERDZoomableImage.wo/ERDZoomableImage.html 2010-08-10 13:51:30 UTC (rev 11115) +++ branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Components/Nonlocalized.lproj/ERDZoomableImage.wo/ERDZoomableImage.html 2010-08-12 00:15:50 UTC (rev 11116) @@ -37,6 +37,9 @@ </script> </webobject> +<webobject name = "ValidThumbnailSrcExist"> <webobject name="ZoomImageLink"> <webobject name="Thumbnail"></webobject> </webobject> +</webobject> +<webobject name = "ValidThumbnailSrcDoesntExist"><webobject name="NoImageString"></webobject></webobject> Modified: branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Components/Nonlocalized.lproj/ERDZoomableImage.wo/ERDZoomableImage.wod =================================================================== --- branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Components/Nonlocalized.lproj/ERDZoomableImage.wo/ERDZoomableImage.wod 2010-08-10 13:51:30 UTC (rev 11115) +++ branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Components/Nonlocalized.lproj/ERDZoomableImage.wo/ERDZoomableImage.wod 2010-08-12 00:15:50 UTC (rev 11116) @@ -10,8 +10,19 @@ onClick = jsToZoomImage; } +ValidThumbnailSrcExist : WOConditional { + condition = thumbnailSrcNullOrEmpty; + negate = true; +} +ValidThumbnailSrcDoesntExist : WOConditional { + condition = thumbnailSrcNullOrEmpty; +} + Once : ERXOncePerRequestConditional { keyName = "ERDZoomableImage"; } +NoImageString : WOString { + value = noImageString; +} \ No newline at end of file Modified: branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Sources/er/directtoweb/components/misc/ERDZoomableImage.java =================================================================== --- branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Sources/er/directtoweb/components/misc/ERDZoomableImage.java 2010-08-10 13:51:30 UTC (rev 11115) +++ branches/Wonder_2_0_0_Branch/Wonder/Common/Frameworks/ERDirectToWeb/Sources/er/directtoweb/components/misc/ERDZoomableImage.java 2010-08-12 00:15:50 UTC (rev 11116) @@ -88,6 +88,14 @@ } /** + * @return {@link Boolean} true, if {@link ERDZoomableImage#thumnailSrc()} returns an empty or null string + * false, otherwise + */ + public boolean isThumbnailSrcNullOrEmpty() { + return ERXStringUtilities.stringIsNullOrEmpty(thumnailSrc()); + } + + /** * controlled by key: enableZoomForImage * @return {@link Boolean} - true, if zooming is allowed. false, otherwise. */ @@ -107,4 +115,11 @@ return sb.toString(); } + + /** + * @return String to use when imageSrc() turns out to be null + */ + public String noImageString() { + return (String) valueForBinding("noImageString"); + } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |