diff --git a/mozilla/suite/browser/pageInfo.js b/mozilla/suite/browser/pageInfo.js index 700c8db8276..26619693801 100644 --- a/mozilla/suite/browser/pageInfo.js +++ b/mozilla/suite/browser/pageInfo.js @@ -18,8 +18,12 @@ * Rights Reserved. * * Contributor(s): smorrison@gte.com + * Terry Hayes */ +/* Overlays register init functions here */ +var onLoadRegistry = [ ]; + function onLoadPageInfo() { var page = window.opener.frames[0].document; @@ -32,6 +36,9 @@ function onLoadPageInfo() var hasForm = makeFormTree(page, formTreeHolder); if (hasForm) { + var formsTab = document.getElementById("formsTab"); + + formsTab.removeAttribute("hidden"); formTreeHolder.removeAttribute("collapsed"); } @@ -39,14 +46,33 @@ function onLoadPageInfo() var hasImages = makeImageTree(page, imageTreeHolder); if (hasImages) { + var imagesTab = document.getElementById("imagesTab"); + + imagesTab.removeAttribute("hidden"); imageTreeHolder.removeAttribute("collapsed"); } - if (hasForm && hasImages) + /* Call registered overlay init functions */ + for (x in onLoadRegistry) { - document.getElementById("formImageSplitter").removeAttribute("hidden"); + onLoadRegistry[x](); } + /* Selected the requested tab, if the name is specified */ + /* if (window.arguments != null) { */ + if ("arguments" in window) { + var tabName = window.arguments[0]; + + if (tabName) + { + var tabControl = document.getElementById("tabcontrol"); + var tab = document.getElementById(tabName); + + if (tabControl && tab) { + tabControl.selectedTab = tab; + } + } + } } function makeDocument(page, root) diff --git a/mozilla/suite/browser/pageInfo.xul b/mozilla/suite/browser/pageInfo.xul index 0fa898c7d72..4da4bf89db0 100644 --- a/mozilla/suite/browser/pageInfo.xul +++ b/mozilla/suite/browser/pageInfo.xul @@ -56,8 +56,18 @@ - + + + + + + + + @@ -84,6 +94,7 @@ + @@ -104,9 +115,8 @@ - -