Roo/bootstrap/Button.js
authorAlan Knowles <alan@roojs.com>
Thu, 11 Sep 2014 09:18:27 +0000 (17:18 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 11 Sep 2014 09:18:27 +0000 (17:18 +0800)
Roo/bootstrap/Button.js

index 6900dec..ffc70eb 100644 (file)
@@ -264,6 +264,14 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component,  {
     initEvents: function() {
        // Roo.log('init events?');
 //        Roo.log(this.el.dom);
+
+        if (typeof (this.menu) != 'undefined') {
+            this.menu.parentType = this.xtype;
+            this.menu.triggerEl = this.el;
+            cn.addxtype(Roo.apply({}, this.menu));
+        }
+
+
        if (this.el.hasClass('roo-button')) {
             this.el.on('click', this.onClick, this);
        } else {