When upgrading from Internet Explorer 8 to IE9 or IE10, I noticed that most of the UI5 icons turned into generic “Blue ball” icons. This still works correctly in other web browsers such as Chrome. After a lot of investigation (and learning along the way) I concluded that for some unknown reason IE9 and IE10 are incorrectly firing an onError handler for static icon images. Dynamic icons which change depending on the state of the device are handled differently and are not affected.
I created a patch to the UI5 JavaScript code which works around this bug.
[font=courier]# diff /mios/www/cmh/js/ui5/animatie.js /www/cmh/js/ui5/animatie.js
— /mios/www/cmh/js/ui5/animatie.js
+++ /www/cmh/js/ui5/animatie.js
@@ -1169,9 +1169,10 @@
this.find(".dev_icon img").attr(“src”,“skins/”+CurrentUISkin+"/"+o.icon);
}
}catch(e){}
-
this.find(".dev_icon img").attr("onError","jQuery(this).attr({'src':jQuery(this).attr('defaultimage'),'defaultimage':'skins/default/icons/device.png'});");
-
this.find(".dev_icon img").attr("onError","if (this['naturalWidth'] == undefined || (this['naturalWidth'] == 0 && this['naturalHeight'] == 0)) {"+
-
"var defImage =jQuery(this).attr('defaultimage');"+
-
"jQuery(this).attr('defaultimage','skins/default/icons/device.png');"+
-
this.attr(“class”,"");"this.src = defImage;}");
this.addClass(o.size+" device “+o.status.color+” category_num_"+o.category_num);
this.click(function(){[/font]
Note that the /mios directory is a read-only file-system with the original Vera files whereas the /www directory is writable and is mostly symbolic links back to the /mios directory. Creating the patch is thus reasonably safe because you can always fall back to the original version.
To apply this patch, use a tool such as WinSCP available here: http://winscp.net Log in with user ID root and the password is on the bottom of your Vera. Navigate to /www/cmh/js/ui5 and rename animatie.js to animatie.js.original. Then unzip the attached file and copy it to the directory in Vera. Now press the Reload Icon in your browser and you’re done.
I have tested this patch with IE8-10 as well as the latest versions of Chrome, Firefox, Opera, Safari and even the last Netscape Navigator 9 and they all work as expected. This should work with both the current public firmware 1.5.622 as well as the older firmware 1.5.408.
Hopefully, the MCV engineers will roll this patch into their next firmware update.