fix imap subscribe ui so that it lists children again when expanding containers r=cavin, sr=sspitzer, 160050

This commit is contained in:
bienvenu%netscape.com 2002-08-07 14:30:46 +00:00
Родитель 215435b05a
Коммит eb6cf50165
1 изменённых файлов: 12 добавлений и 9 удалений

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

@ -402,7 +402,8 @@ function GetRDFProperty(aRes, aProp)
function SubscribeOnClick(event)
{
// we only care about button 0 (left click) events
if (event.button != 0 || event.originalTarget.localName != "treechildren") return;
if (event.button != 0 || event.originalTarget.localName != "treechildren")
return;
var row = {}, col = {}, obj = {};
gSubscribeTree.treeBoxObject.getCellAt(event.clientX, event.clientY, row, col, obj);
@ -414,9 +415,12 @@ function SubscribeOnClick(event)
// that isn't a container
if (!gSubscribeTree.view.isContainer(row.value)) {
ReverseStateFromNode(row.value);
return;
}
else {
if (obj.value == "twisty") {
}
else if (event.detail == 1)
{
if (obj.value == "twisty") {
if (gSubscribeTree.view.isContainerOpen(row.value)) {
var uri = gSubscribeTree.builderView.getResourceAtIndex(row.value).Value;
@ -426,13 +430,12 @@ function SubscribeOnClick(event)
gSubscribableServer.startPopulatingWithUri(msgWindow, true /* force to server */, uri);
}
}
}
}
else {
// if the user single clicks on the subscribe check box, we handle it here
if (col.value == "subscribedColumn")
ReverseStateFromNode(row.value);
else {
// if the user single clicks on the subscribe check box, we handle it here
if (col.value == "subscribedColumn")
ReverseStateFromNode(row.value);
}
}
}