Bug #136949 --> when creating a new search or filter row, clone the search attribute

from the previous row.
r=ssu
sr=sspitzer
This commit is contained in:
mscott%netscape.com 2002-05-03 21:58:10 +00:00
parent c5301bd3ac
commit 5bb1233d18

View File

@ -141,6 +141,7 @@ searchTermContainer.prototype = {
save: function () {
var searchTerm = this.searchTerm;
searchTerm.attrib = this.searchattribute.value;
var nsMsgSearchAttrib = Components.interfaces.nsMsgSearchAttrib;
if (this.searchattribute.value > nsMsgSearchAttrib.OtherHeader && this.searchattribute.value < nsMsgSearchAttrib.kNumMsgSearchAttributes)
@ -322,7 +323,15 @@ function initializeTermFromIndex(index)
// we'll initialize the .booleanAnd from the existing setting in
// the UI
else
searchTermObj.booleanAnd = getBooleanAnd();
{
searchTermObj.booleanAnd = getBooleanAnd();
if (index)
{
// if we weren't pre-initialized with a searchTerm then steal the search attribute from the
// previous row.
searchTermObj.searchattribute.value = gSearchTerms[index - 1].obj.searchattribute.value;
}
}
gSearchTerms[index].initialized = true;
}