From xap-commits-return-1407-apmail-incubator-xap-commits-archive=incubator.apache.org@incubator.apache.org Tue May 22 21:11:09 2007 Return-Path: Delivered-To: apmail-incubator-xap-commits-archive@locus.apache.org Received: (qmail 72649 invoked from network); 22 May 2007 21:11:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 May 2007 21:11:08 -0000 Received: (qmail 73900 invoked by uid 500); 22 May 2007 21:11:14 -0000 Delivered-To: apmail-incubator-xap-commits-archive@incubator.apache.org Received: (qmail 73874 invoked by uid 500); 22 May 2007 21:11:14 -0000 Mailing-List: contact xap-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: xap-dev@incubator.apache.org Delivered-To: mailing list xap-commits@incubator.apache.org Received: (qmail 73865 invoked by uid 99); 22 May 2007 21:11:13 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 May 2007 14:11:13 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 May 2007 14:11:07 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 756271A981A; Tue, 22 May 2007 14:10:47 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r540759 - /incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js Date: Tue, 22 May 2007 21:10:47 -0000 To: xap-commits@incubator.apache.org From: mturyn@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070522211047.756271A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mturyn Date: Tue May 22 14:10:45 2007 New Revision: 540759 URL: http://svn.apache.org/viewvc?view=rev&rev=540759 Log: Guarded against setting margin boxes of nodes that might not be there yet. No change in scroll bars in this version. Modified: incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js Modified: incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js?view=diff&rev=540759&r1=540758&r2=540759 ============================================================================== --- incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js (original) +++ incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js Tue May 22 14:10:45 2007 @@ -312,7 +312,7 @@ // ...whereas _we_ set this, and know // it to be a number giving the width // in pixels: - this.domNode.style.width = this._tableLayoutModel.resedWidthPx+"px"; + this.domNode.style.width = this._tableLayoutModel.resetWidthPx+"px"; } } @@ -354,8 +354,11 @@ if (dojo.render.html.ie){ - dojo.html.setMarginBox( this.headerRow.childNodes[i], - widthObj ) ; + + if( this.headerRow.childNodes[i] ){ + dojo.html.setMarginBox( this.headerRow.childNodes[i], + widthObj ) ; + } widthObj = dojo.html.getMarginBox( this.headerRow.childNodes[i]) ; delete widthObj.height ; @@ -365,20 +368,24 @@ widthObj) ; } } - else{ + else { // Cols are direct children of headerTable; // they're evidently sufficient under mozilla to // set the columns on-screen: - dojo.html.setMarginBox( - this.headerTable.childNodes[i], - widthObj - ) ; - widthObj = dojo.html.getMarginBox( this.headerTable.childNodes[i]) ; - delete widthObj.height ; - dojo.html.setMarginBox( - this.table.childNodes[i], - widthObj - ) ; + if(this.headerTable.childNodes[i]){ + dojo.html.setMarginBox( + this.headerTable.childNodes[i], + widthObj + ) ; + } + if(this.table.childNodes[i]){ + widthObj = dojo.html.getMarginBox( this.headerTable.childNodes[i]) ; + delete widthObj.height ; + dojo.html.setMarginBox( + this.table.childNodes[i], + widthObj + ) ; + } } if (this.headerRow.childNodes[i] && this.headerRow.childNodes[i].childNodes[0]){ this.headerRow.childNodes[i].childNodes[0].style.width = "100%"; @@ -668,7 +675,7 @@ var fWidth = (dojo.html.getContentBox(this.domNode)).width ; - this._tableLayoutModel.resedWidthPx= fWidth ; + this._tableLayoutModel.resetWidthPx= fWidth ; // We no longer care what // the width initally was