Hide button without icon

This commit is contained in:
Cédric Krier committed 2015-10-11 13:55:05 +02:00
1 parent 814ef84cf0
commit 0a6b4e9ef2
1 file changed
+3
+3
View File
@@ -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) {