prevent the bad state where we are supressing message display, but the message pane
is not hidden.
This commit is contained in:
sspitzer%netscape.com 2001-05-01 03:05:02 +00:00
Родитель 0029232235
Коммит ac40b90f6b
4 изменённых файлов: 22 добавлений и 32 удалений

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

@ -583,11 +583,7 @@ function CreateDBView(msgFolder, viewType, viewFlags, sortType, sortOrder)
// based on the collapsed state of the thread pane/message pane splitter,
// supress message display if appropriate.
var collapsed = IsThreadAndMessagePaneSplitterCollapsed();
if (collapsed)
gDBView.supressMsgDisplay = true;
else
gDBView.supressMsgDisplay = false;
gDBView.supressMsgDisplay = IsThreadAndMessagePaneSplitterCollapsed();
UpdateSortIndicators(gCurSortType, sortOrder);
PersistViewAttributesOnFolder();
@ -680,30 +676,22 @@ function GetSelectedFolderResource()
return folderResource;
}
//Called when the splitter in between the thread and message panes is clicked.
function OnClickThreadAndMessagePaneSplitter()
{
var collapsed = IsThreadAndMessagePaneSplitterCollapsed();
// collapsed is the previous state, so we must be expanding
// the splitter if collapsed is true
if (gDBView)
function OnMouseUpThreadAndMessagePaneSplitter()
{
if (!collapsed)
gDBView.supressMsgDisplay = true;
else
gDBView.supressMsgDisplay = false;
if (gDBView) {
// the collapsed state is the state after we released the mouse
// so we take it as it is
gDBView.supressMsgDisplay = IsThreadAndMessagePaneSplitterCollapsed();
}
}
/*
dump("We are in OnClickThreadAndMessagePaneSplitter()\n");
var collapsed = IsThreadAndMessagePaneSplitterCollapsed();
//collapsed is the previous state so we know we are opening.
if(collapsed)
function OnClickThreadAndMessagePaneSplitterGrippy()
{
LoadSelectionIntoMessagePane();
setTimeout("ScrollToMessage(new,true,true);",0);
if (gDBView) {
// the collapsed state is the state when we clicked on the grippy
// not when afterwards, so we need to reverse this value
gDBView.supressMsgDisplay = !IsThreadAndMessagePaneSplitterCollapsed();
}
*/
}
function FolderPaneSelectionChange()

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

@ -152,8 +152,9 @@ Rights Reserved.
</box>
<!-- if you change this id, please change GetThreadAndMessagePaneSplitter() and MsgToggleMessagePane() -->
<splitter id="threadpane-splitter" collapse="after" persist="state"
onmouseup="OnMouseUpThreadAndMessagePaneSplitter()"
orient="vertical" autostretch="never">
<grippy onclick="OnClickThreadAndMessagePaneSplitter()" />
<grippy onclick="OnClickThreadAndMessagePaneSplitterGrippy()"/>
</splitter>
<!-- msg header view -->
<box id="messagepanebox" orient="vertical" flex="4" persist="collapsed height" class="window-focusborder" focusring="false">

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

@ -154,8 +154,9 @@ Rights Reserved.
<!-- if you change this id, please change GetThreadAndMessagePaneSplitter() and MsgToggleMessagePane() -->
<splitter collapse="after" persist="state"
onmouseup="OnMouseUpThreadAndMessagePaneSplitter()"
id="threadpane-splitter" orient="vertical" autostretch="never">
<grippy onclick="OnClickThreadAndMessagePaneSplitter()"/>
<grippy onclick="OnClickThreadAndMessagePaneSplitterGrippy()"/>
</splitter>
<box id="messagepanebox" align="vertical" flex="3" persist="collapsed height" class="window-focusborder" focusring="false" onclick="contentAreaClick(event);" ondraggesture="nsDragAndDrop.startDrag(event, contentAreaDNDObserver);">

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

@ -642,16 +642,16 @@ function GetTotalCountElement()
gTotalCount = totalCount;
return totalCount;
}
function IsThreadAndMessagePaneSplitterCollapsed()
{
var splitter = GetThreadAndMessagePaneSplitter();
if(splitter)
{
var state = splitter.getAttribute('state');
return (state == "collapsed");
var messagePane = GetMessagePane();
try {
return (messagePane.getAttribute("collapsed") == "true");
}
else
catch (ex) {
return false;
}
}
function FindMessenger()