From c5dcc1cee98b4c3b53d9334cf50c943d448af82f Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 29 Nov 2018 12:15:27 +0800 Subject: [PATCH] Roo/bootstrap/Button.js --- Roo/bootstrap/Button.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Roo/bootstrap/Button.js b/Roo/bootstrap/Button.js index 86b6244e42..8fb44dd1f3 100644 --- a/Roo/bootstrap/Button.js +++ b/Roo/bootstrap/Button.js @@ -78,6 +78,7 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component, { disabled: false, isClose: false, glyphicon: '', + fa: '', badge: '', theme: 'default', inverse: false, @@ -188,6 +189,10 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component, { Roo.log('changing to ul' ); cfg.tag = 'ul'; this.glyphicon = 'caret'; + if (Roo.bootstrap.version == 4) { + this.fa = 'caret-down'; + } + } cfg.cls += this.size.length ? (' btn-' + this.size) : ''; @@ -226,6 +231,16 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component, { } ]; } + if (this.fa) { + cfg.html = ' ' + cfg.html; + + cfg.cn = [ + { + tag: 'i', + cls: 'fa fa-' + this.fa + } + ]; + } if (this.badge) { cfg.html += ' '; -- 2.39.2