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
Родитель 143e9d4b92
Коммит 3abe50eb71
1 изменённых файлов: 10 добавлений и 1 удалений

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

@ -141,6 +141,7 @@ searchTermContainer.prototype = {
save: function () { save: function () {
var searchTerm = this.searchTerm; var searchTerm = this.searchTerm;
searchTerm.attrib = this.searchattribute.value; searchTerm.attrib = this.searchattribute.value;
var nsMsgSearchAttrib = Components.interfaces.nsMsgSearchAttrib; var nsMsgSearchAttrib = Components.interfaces.nsMsgSearchAttrib;
if (this.searchattribute.value > nsMsgSearchAttrib.OtherHeader && this.searchattribute.value < nsMsgSearchAttrib.kNumMsgSearchAttributes) 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 // we'll initialize the .booleanAnd from the existing setting in
// the UI // the UI
else 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; gSearchTerms[index].initialized = true;
} }