partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 4b59fe26016850e1da0af2de05322195efc8c683
parent 672e9df5857fec08b814a25b153dd9af7d014903
Author: Felicitus <felicitus@felicitus.org>
Date:   Sun,  2 Aug 2015 19:46:41 +0200

Set image source to null if no image was found

Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartImageDisplay.js | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartImageDisplay.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartImageDisplay.js @@ -73,7 +73,9 @@ Ext.define('PartKeepr.PartImageDisplay', { var image = this.store.getAt(this.displayedImageIndex); if (image) { - this.image.setSrc( image.getId() + "/getImage?maxHeight="+this.imageMaxHeight+ "&ts=" + new Date().getTime()); + this.image.setSrc(image.getId() + "/getImage?maxHeight=" + this.imageMaxHeight + "&ts=" + new Date().getTime()); + } else { + this.image.setSrc(null); } }, /**