summaryrefslogtreecommitdiffstats
path: root/mailnews/base/search/content
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-10 23:41:56 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-10 23:41:56 -0500
commit05b84061f2cc7ca6cf009ad2fc2ed7556cfcae4e (patch)
tree8d789fb8c9833609dcd3fc7a57a4cfac3a683659 /mailnews/base/search/content
parent1d5ec356b3d5ec98177a76eaf2d32e728fd1a742 (diff)
downloadUXP-05b84061f2cc7ca6cf009ad2fc2ed7556cfcae4e.tar
UXP-05b84061f2cc7ca6cf009ad2fc2ed7556cfcae4e.tar.gz
UXP-05b84061f2cc7ca6cf009ad2fc2ed7556cfcae4e.tar.lz
UXP-05b84061f2cc7ca6cf009ad2fc2ed7556cfcae4e.tar.xz
UXP-05b84061f2cc7ca6cf009ad2fc2ed7556cfcae4e.zip
Bug 1523048 - when copying a filter, copy its triggering events too (filterType).
Tag #1273
Diffstat (limited to 'mailnews/base/search/content')
-rw-r--r--mailnews/base/search/content/FilterEditor.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/mailnews/base/search/content/FilterEditor.js b/mailnews/base/search/content/FilterEditor.js
index 986185d34..ecfe9febc 100644
--- a/mailnews/base/search/content/FilterEditor.js
+++ b/mailnews/base/search/content/FilterEditor.js
@@ -124,8 +124,8 @@ function filterEditorOnLoad()
else if ("copiedFilter" in args)
{
// we are copying a filter
- var copiedFilter = args.copiedFilter;
- var copiedName = gFilterBundle.getFormattedString("copyToNewFilterName",
+ let copiedFilter = args.copiedFilter;
+ let copiedName = gFilterBundle.getFormattedString("copyToNewFilterName",
[copiedFilter.filterName]);
let newFilter = gFilterList.createFilter(copiedName);
@@ -142,13 +142,15 @@ function filterEditorOnLoad()
var searchTerm = copiedFilter.searchTerms.QueryElementAt(i,
Components.interfaces.nsIMsgSearchTerm);
- var newTerm = newFilter.createTerm();
+ let newTerm = newFilter.createTerm();
newTerm.attrib = searchTerm.attrib;
newTerm.op = searchTerm.op;
newTerm.booleanAnd = searchTerm.booleanAnd;
newTerm.value = searchTerm.value;
newFilter.appendTerm(newTerm);
- };
+ }
+
+ newFilter.filterType = copiedFilter.filterType;
gPreFillName = copiedName;
gFilter = newFilter;