diff --git a/src/common.js b/src/common.js index 9f807224c2..a084817c87 100644 --- a/src/common.js +++ b/src/common.js @@ -2525,7 +2525,7 @@ }, register_icon: function(icon_name) { if (!icon_name) { - return jQuery.Deferred().reject(); + return jQuery.when(); } else if ((icon_name in this.loaded_icons) || ~Sao.common.LOCAL_ICONS.indexOf(icon_name)) { return jQuery.when(this.get_icon_url(icon_name)); diff --git a/src/sao.less b/src/sao.less index 4277a93309..3b7832c2c8 100644 --- a/src/sao.less +++ b/src/sao.less @@ -94,6 +94,11 @@ input[type='color'] { } } +/* Hide empty image displayed as broken image */ +[src=''] { + visibility: hidden; +} + img.icon { height: unit(@line-height-base, em); } diff --git a/src/view/tree.js b/src/view/tree.js index b5d036c668..521f5e7022 100644 --- a/src/view/tree.js +++ b/src/view/tree.js @@ -1540,7 +1540,7 @@ } else { img_tag = cell; } - img_tag.attr('src', url); + img_tag.attr('src', url || ''); }.bind(this)); } else { value = this.attributes.string || '';