unknown image for calendar entries
psilo909 opened this issue · 2 comments
combined with commit 4980fc1, the default language ini file must be also updated:
https://github.com/Martin-Gleiss/smartvisu/blob/develop/lang/de.ini#CL279
here we have
default_img_list[icon] = ''
default_img_list[color] = "rgb(32, 178, 170)"
in this case, the calendar.js widget will run into the else:
if (typeof(sv_lang.calendar_event_format.default_img_list) === undefined){
entry.icon = "pages/base/pics/trans.png";
entry.color = 'transparent';
}else{
entry.icon = sv_lang.calendar_event_format.default_img_list.icon;
entry.color = sv_lang.calendar_event_format.default_img_list.color;
}
and set an empty string as image. in result, it shows up like this:
if changed to
default_img_list[icon] = 'pages/base/pics/trans.png'
default_img_list[color] = "transparent"
all is fine.
PS: I suppose also checking for an empty string in the formerly mentioned javascript snippet (and not only for undefined) would also do the trick.
In my setup w/ Apache and Firefox, the image tag looks like this:
<img class="icon" style="background: rgb(32, 178, 170) none repeat scroll 0% 0%;" src="">
So all ist fine here.
Nevertheless I have integrated an additional check for an empty string to get trans.png back.