allow string based values for comboboxarray
[roojs1] / Roo / BasicDialog.js
index 5407443..a4d6ab1 100644 (file)
@@ -556,15 +556,20 @@ Roo.extend(Roo.BasicDialog, Roo.util.Observable, {
     },
 
     // private
-    syncBodyHeight : function(){
-        var bd = this.body, cb = this.centerBg, bw = this.bwrap;
+    syncBodyHeight : function()
+    {
+        var bd = this.body, // the text
+            cb = this.centerBg, // wrapper around bottom.. but does not seem to be used..
+            bw = this.bwrap;
         var height = this.size.height - this.getHeaderFooterHeight(false);
         bd.setHeight(height-bd.getMargins("tb"));
         var hh = this.header.getHeight();
         var h = this.size.height-hh;
         cb.setHeight(h);
+        
         bw.setLeftTop(cb.getPadding("l"), hh+cb.getPadding("t"));
         bw.setHeight(h-cb.getPadding("tb"));
+        
         bw.setWidth(this.el.getWidth(true)-cb.getPadding("lr"));
         bd.setWidth(bw.getWidth(true));
         if(this.tabs){
@@ -604,7 +609,7 @@ Roo.extend(Roo.BasicDialog, Roo.util.Observable, {
 
     // private
     animShow : function(){
-        var b = Roo.get(this.animateTarget, true).getBox();
+        var b = Roo.get(this.animateTarget).getBox();
         this.proxy.setSize(b.width, b.height);
         this.proxy.setLocation(b.x, b.y);
         this.proxy.show();
@@ -630,7 +635,7 @@ Roo.extend(Roo.BasicDialog, Roo.util.Observable, {
         this.animateTarget = animateTarget || this.animateTarget;
         if(!this.el.isVisible()){
             this.beforeShow();
-            if(this.animateTarget){
+            if(this.animateTarget && Roo.get(this.animateTarget)){
                 this.animShow();
             }else{
                 this.showEl();
@@ -934,7 +939,9 @@ Roo.extend(Roo.BasicDialog, Roo.util.Observable, {
         if(this.shim) {
           this.shim.hide();
         }
-        if(this.animateTarget){
+        // sometimes animateTarget seems to get set.. causing problems...
+        // this just double checks..
+        if(this.animateTarget && Roo.get(this.animateTarget)) {
            this.animHide(callback);
         }else{
             this.el.hide();
@@ -1175,7 +1182,8 @@ Roo.LayoutDialog = function(el, cfg){
         config = Roo.apply({}, el);
         // not sure why we use documentElement here.. - it should always be body.
         // IE7 borks horribly if we use documentElement.
-        el = Roo.get( document.body || document.documentElement).createChild();
+        // webkit also does not like documentElement - it creates a body element...
+        el = Roo.get( document.body || document.documentElement ).createChild();
         //config.autoCreate = true;
     }