roojs-bootstrap.js
[roojs1] / roojs-bootstrap-debug.js
index a31168a..0782053 100644 (file)
@@ -2513,7 +2513,7 @@ Roo.extend(Roo.bootstrap.MenuItem, Roo.bootstrap.Component,  {
         if(this.isContainer){
             return {
                 tag: 'li',
-                cls: 'dropdown-menu-item dropdown-item'
+                cls: 'dropdown-menu-item '
             };
         }
         var ctag = {
@@ -2523,6 +2523,7 @@ Roo.extend(Roo.bootstrap.MenuItem, Roo.bootstrap.Component,  {
         
         var anc = {
             tag : 'a',
+            cls : 'dropdown-item',
             href : '#',
             cn : [  ]
         };
@@ -2539,7 +2540,7 @@ Roo.extend(Roo.bootstrap.MenuItem, Roo.bootstrap.Component,  {
         
         var cfg= {
             tag: 'li',
-            cls: 'dropdown-menu-item dropdown-item',
+            cls: 'dropdown-menu-item',
             cn: [ anc ]
         };
         if (this.parent().type == 'treeview') {
@@ -3866,16 +3867,35 @@ Roo.extend(Roo.bootstrap.Navbar, Roo.bootstrap.Component,  {
                 if (ce.hasClass('collapse')) {
                     // show it...
                     ce.removeClass('collapse');
-                    ce.addClass('collapsing show');
-                    (function() { ce.removeClass('collapsing'); }).defer(50);
-                } else {
+                    ce.addClass('show');
+                    var h = ce.getHeight();
+                    Roo.log(h);
+                    ce.removeClass('show');
+                    // at this point we should be able to see it..
                     ce.addClass('collapsing');
+                    
+                    ce.setHeight(0); // resize it ...
+                    ce.on('transitionend', function() {
+                        Roo.log('done transition');
+                        ce.removeClass('collapsing');
+                        ce.addClass('show');
+                        ce.removeClass('collapse');
+
+                        ce.dom.style.height = '';
+                    }, this, { single: true} );
+                    ce.setHeight(h);
+                    
+                } else {
+                    ce.setHeight(ce.getHeight());
                     ce.removeClass('show');
-                    (function() {
+                    ce.addClass('collapsing');
+                    
+                    ce.on('transitionend', function() {
+                        ce.dom.style.height = '';
                         ce.removeClass('collapsing');
                         ce.addClass('collapse');
-                    }).defer(200);
-                    
+                    }, this, { single: true} );
+                    ce.setHeight(0);
                 }
             }