From f93270fd89e1cd70410acae46b9fc5787b149da6 Mon Sep 17 00:00:00 2001 From: Edward Date: Mon, 31 Mar 2014 18:19:37 +0800 Subject: [PATCH] Roo/bootstrap/Button.js --- Roo/bootstrap/Button.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Roo/bootstrap/Button.js b/Roo/bootstrap/Button.js index 99dd05290e..f219263a5e 100644 --- a/Roo/bootstrap/Button.js +++ b/Roo/bootstrap/Button.js @@ -113,6 +113,26 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component, { return cfg; } + if (this.badge) { + cfg.html += ' '; + + cfg.tag = 'a'; + + cfg.cls='btn roo-button'; + + cfg.href=this.href; + + cfg.cn = [ + cfg.html, + { + tag: 'span', + cls: 'badge', + html: this.badge + } + ]; + + cfg.html=''; + } if (this.theme==='default') { cfg.cls = 'btn roo-button'; -- 2.39.2