From 1b6c133a5a451fc0d2b8c4ca98a31f940eb9794d Mon Sep 17 00:00:00 2001 From: "scott%scott-macgregor.org" Date: Mon, 25 Aug 2003 19:22:36 +0000 Subject: [PATCH] try to fix pref bustage. synch up nsPrefWindow.js changes with those made in browser's version of that file. --- .../prefwindow/content/nsPrefWindow.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/mail/components/prefwindow/content/nsPrefWindow.js b/mail/components/prefwindow/content/nsPrefWindow.js index b5db2494445..5f2573141d4 100644 --- a/mail/components/prefwindow/content/nsPrefWindow.js +++ b/mail/components/prefwindow/content/nsPrefWindow.js @@ -183,14 +183,13 @@ nsPrefWindow.prototype = { for( var pageTag in this.wsm.dataManager.pageData ) { - var pageData = this.wsm.dataManager.getPageData( pageTag ); - if ("initialized" in pageData && pageData.initialized) + var pageData = this.wsm.dataManager.getPageData( pageTag ); + if ("initialized" in pageData && pageData.initialized && "elementIDs" in pageData) { - for( var elementID in pageData ) + for( var elementID in pageData.elementIDs ) { if (elementID == "initialized") continue; - var itemObject = pageData[elementID]; - if (typeof(itemObject) != "object") break; + var itemObject = pageData.elementIDs[elementID]; if ( "prefstring" in itemObject && itemObject.prefstring ) { var elt = itemObject.localname; @@ -295,11 +294,11 @@ nsPrefWindow.prototype = { var header = document.getElementById("header"); header.setAttribute("title", - window.frames[this.contentFrame].document.documentElement.getAttribute("headertitle")); - if( !(aPageTag in this.wsm.dataManager.pageData) ) + window.frames[this.contentFrame].document.documentElement.getAttribute("headertitle")); + var pageData = this.wsm.dataManager.getPageData(aPageTag); + if(!('initialized' in pageData)) { var prefElements = window.frames[this.contentFrame].document.getElementsByAttribute( "prefstring", "*" ); - this.wsm.dataManager.pageData[aPageTag] = []; for( var i = 0; i < prefElements.length; i++ ) { var prefstring = prefElements[i].getAttribute( "prefstring" ); @@ -343,7 +342,7 @@ nsPrefWindow.prototype = { window.frames[ this.contentFrame ].Startup(); } - this.wsm.dataManager.pageData[aPageTag].initialized=true; + this.wsm.dataManager.pageData[aPageTag].initialized = true; } };