fall out from news filter landing / naving multiple filter action landing.

for new mail filters, action is move, for new news filters, action is delete
r/sr=bienvenu
This commit is contained in:
sspitzer%netscape.com 2002-11-06 06:21:44 +00:00
parent 70109e07f7
commit 75c0ff5bde

View File

@ -109,7 +109,9 @@ function filterEditorOnLoad()
// the default action for news filters is Delete
// for everything else, it's MoveToFolder
gFilter.action = (getScopeFromFilterList(gFilterList) == Components.interfaces.nsMsgSearchScope.newsFilter) ? nsMsgFilterAction.Delete : nsMsgFilterAction.MoveToFolder;
var filterAction = gFilter.createAction();
filterAction.type = (getScopeFromFilterList(gFilterList) == Components.interfaces.nsMsgSearchScope.newsFilter) ? nsMsgFilterAction.Delete : nsMsgFilterAction.MoveToFolder;
gFilter.appendAction(filterAction);
initializeDialog(gFilter);
}
else{
@ -287,9 +289,6 @@ function initializeDialog(filter)
{
var filterAction = actionList.QueryElementAt(actionIndex, Components.interfaces.nsIMsgRuleAction);
// set up action picker
SetUpFilterActionList(getScope(filter));
if (filterAction.type == nsMsgFilterAction.MoveToFolder) {
// preselect target folder
gMoveToFolderCheckbox.checked = true;
@ -330,6 +329,8 @@ function initializeDialog(filter)
gWatchCheckbox.checked = true;
else if (filterAction.type == nsMsgFilterAction.Ignore)
gIgnoreCheckbox.checked = true;
SetUpFilterActionList(getScope(filter));
}
var scope = getScope(filter);
@ -538,6 +539,17 @@ function SetUpFilterActionList(aScope)
else
element.setAttribute("disabled", "true");
}
elements = gFilterActionList.getElementsByTagName("checkbox");
for (i=0;i<elements.length;i++)
{
element = elements[i];
if (element.checked)
{
// ensure row item visible
// break;
}
}
}
function onLabelListChanged(event)