-
Bug
-
Resolution: Fixed
-
Normal
-
8.5.1.2
-
None
-
Security Level: Jimmy
-
None
-
ZK with Iceblue theme (breeze theme doesn't remove the image either, but the default width / height in breeze are not set so the missing image default to 0px / 0px instead of 20/20px in IceBlue
-
ZK 8.5.2 S1, ZK 8.5.2 S2
-
None
Steps to Reproduce
Run fiddle
http://zkfiddle.org/sample/1gqbgec/3-zk-iceblue-caption-image-bug
Click on the "hide image" button to set the caption image value to "" (or null - same behavior)
Current Result
the caption image is displaying a broken image source (<img src="(unknown)" in Dom tree)
Expected Result
The image node should not be displayed if the source is set to "" or null
Debug Info
Root Cause
Workaround
<script><![CDATA[ zk.afterLoad('zul', function() { var xLabelImageWidget = {}; zk.override(zul.LabelImageWidget.prototype, xLabelImageWidget ,{ setImage : function(v) { if((v == null || v == "")&&this.$n()){ jq(this.$n("img")).hide() }else{ jq(this.$n("img")).show() } var result = xLabelImageWidget.setImage.apply(this, arguments); return result; } });//zk.override });//zk.afterLoad ]]></script>