Bug #52712 --> use collapsed attribute instead of hide consistantly...fixes problem

where attachment button would stop working after you switched folders
r=alecf
This commit is contained in:
mscott%netscape.com 2000-09-19 22:26:54 +00:00
Родитель 7a54a27bf1
Коммит 28bbf61434
2 изменённых файлов: 17 добавлений и 15 удалений

Просмотреть файл

@ -278,7 +278,9 @@ function AddAttachmentToMenu(name, oncommand)
var button = document.getElementById("attachmentButton");
if (button)
{
button.setAttribute("value", popup.childNodes.length);
}
}
var attachBox = document.getElementById("attachmentBox");
@ -589,13 +591,13 @@ function UpdateMessageHeaders()
{
hdrViewSetNodeWithBox(msgPaneData.UserAgentBox, msgPaneData.UserAgentValue, currentHeaderData["user-agent"].headerValue);
if (msgPaneData.UserAgentToolbar)
msgPaneData.UserAgentToolbar.removeAttribute("hidden");
msgPaneData.UserAgentToolbar.removeAttribute("collapsed");
}
else
{
hdrViewSetNodeWithBox(msgPaneData.UserAgentBox, msgPaneData.UserAgentValue, "");
if (msgPaneData.UserAgentToolbar)
msgPaneData.UserAgentToolbar.setAttribute("hidden", "true");
msgPaneData.UserAgentToolbar.setAttribute("collapsed", "true");
}
}
@ -614,43 +616,43 @@ function ShowMessageHeaderPane()
if (gViewAllHeaders)
{
HideMessageHeaderPane();
msgPaneData.ViewAllHeadersToolbar.removeAttribute("hidden");
msgPaneData.ViewAllHeadersToolbar.removeAttribute("collapsed");
msgPaneData.ViewAllHeadersBox.removeAttribute("collapsed");
}
else
{
msgPaneData.ViewAllHeadersToolbar.setAttribute("hidden", "true");
msgPaneData.ViewAllHeadersToolbar.setAttribute("collapsed", "true");
msgPaneData.ViewAllHeadersBox.setAttribute("collapsed", "true");
var node = document.getElementById("headerPart1");
if (node)
node.removeAttribute("hidden");
node.removeAttribute("collapsed");
node = document.getElementById("headerPart2");
if (node)
node.removeAttribute("hidden");
node.removeAttribute("collapsed");
/*
node = document.getElementById("headerPart3");
if (node)
node.removeAttribute("hidden");
node.removeAttribute("collapsed");
*/
}
}
function HideMessageHeaderPane()
{
msgPaneData.ViewAllHeadersToolbar.setAttribute("hidden", "true");
msgPaneData.ViewAllHeadersToolbar.setAttribute("collapsed", "true");
msgPaneData.ViewAllHeadersBox.setAttribute("collapsed", "true");
var node = document.getElementById("headerPart1");
if (node)
node.setAttribute("hidden", "true");
node.setAttribute("collapsed", "true");
node = document.getElementById("headerPart2");
if (node)
node.setAttribute("hidden", "true");
node.setAttribute("collapsed", "true");
node = document.getElementById("headerPart3");
if (msgPaneData.UserAgentToolbar)
msgPaneData.UserAgentToolbar.setAttribute("hidden", "true");
msgPaneData.UserAgentToolbar.setAttribute("collapsed", "true");
}

Просмотреть файл

@ -31,11 +31,11 @@ Rights Reserved.
<script src="chrome://messenger/content/mime.js"/>
<toolbox id="msgHeaderView">
<toolbar id="viewAllHeadersToolbar" hidden="true">
<toolbar id="viewAllHeadersToolbar" collapsed="true">
<box id="viewAllHeadersBox" class="header-part1" orient="vertical" flex="1" collapsed="true"/>
</toolbar>
<toolbar id="headerPart1" hidden="true">
<toolbar id="headerPart1" collapsed="true">
<box class="header-splitter" orient="horizontal" flex="1">
<box class="header-part1" orient="vertical" flex="1">
@ -85,7 +85,7 @@ Rights Reserved.
</box>
</toolbar>
<toolbar id="headerPart2" hidden="true">
<toolbar id="headerPart2" collapsed="true">
<box class="header-part2" orient="vertical" flex="1">
<box id="ToBox" class="headerBox" orient="horizontal" collapsed="true">
<hbox class="headerValueBox">
@ -134,7 +134,7 @@ Rights Reserved.
</box>
</toolbar>
<toolbar id="headerPart3" hidden="true">
<toolbar id="headerPart3" collapsed="true">
<box class="header-part3" orient="vertical" flex="1">
<box id="UserAgentBox" class="headerBox" orient="horizontal" collapsed="true">
<hbox class="headerValueBox">