From 0a6b4e9ef2727908fefbc6b2fa46d59818de1366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 11 Oct 2015 13:55:05 +0200 Subject: [PATCH] Hide button without icon --- src/common.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common.js b/src/common.js index 2850c1031f..7ae0ad7944 100644 --- a/src/common.js +++ b/src/common.js @@ -720,17 +720,20 @@ 'class': 'icon', 'aria-hidden': true }).appendTo(this.el); + this.icon.hide(); this.el.append(attributes.string || ''); this.set_icon(attributes.icon); }, set_icon: function(icon_name) { if (!icon_name) { this.icon.attr('src', ''); + this.icon.hide(); return; } var prm = Sao.common.ICONFACTORY.register_icon(icon_name); prm.done(function(url) { this.icon.attr('src', url); + this.icon.show(); }.bind(this)); }, set_state: function(record) {