When there's no social icon image URL, revert to "Image not found" image

This commit is contained in:
Tautvidas Sipavičius
2016-08-12 17:30:11 +03:00
parent 87332037c2
commit 1c081623b9
2 changed files with 2 additions and 1 deletions

View File

@@ -93,6 +93,7 @@ define([
return { return {
model: this.model.toJSON(), model: this.model.toJSON(),
allIconSets: allIconSets.toJSON(), allIconSets: allIconSets.toJSON(),
imageMissingSrc: App.getConfig().get('urls.imageMissing'),
}; };
}, },
}); });

View File

@@ -1 +1 @@
<a href="{{ link }}" onClick="return false;"><img src="{{#ifCond image '!=' ''}}{{ image }}{{ else }}{{ allIconSets.default.custom }}{{/ifCond}}" onerror="if (this.src != '{{ allIconSets.default.custom }}') this.src = '{{ allIconSets.default.custom }}';" alt="{{ text }}" style="width: {{ width }}; height: {{ height }};"/></a> <a href="{{ link }}" onClick="return false;"><img src="{{#ifCond image '!=' ''}}{{ image }}{{ else }}{{ imageMissingSrc }}{{/ifCond}}" onerror="if (this.src != '{{ imageMissingSrc }}') this.src = '{{ imageMissingSrc }}';" alt="{{ text }}" style="width: {{ width }}; height: {{ height }};"/></a>