Roo/bootstrap/MenuItem.js
authorEdward <edward@roojs.com>
Fri, 27 Mar 2015 04:29:38 +0000 (12:29 +0800)
committerEdward <edward@roojs.com>
Fri, 27 Mar 2015 04:29:38 +0000 (12:29 +0800)
Roo/bootstrap/MenuItem.js

index eebd25f..2de7793 100644 (file)
@@ -13,6 +13,7 @@
  * @cfg {String} html the menu label
  * @cfg {String} href the link
  * @cfg {Boolean} preventDefault (true | false) default true
+ * @cfg {Boolean} isContainer (true | false) default false
  * 
  * 
  * @constructor
@@ -39,8 +40,17 @@ Roo.extend(Roo.bootstrap.MenuItem, Roo.bootstrap.Component,  {
     href : false,
     html : false,
     preventDefault: true,
+    isContainer : false,
     
     getAutoCreate : function(){
+        
+        if(this.isContainer){
+            return {
+                tag: 'li',
+                cls: 'dropdown-menu-item'
+            };
+        }
+        
         var cfg= {
             tag: 'li',
             cls: 'dropdown-menu-item',