rem:  var action = gActionElement.selectedItem.getAttribute("data"); dump("Action = " + action + "\n"); gFilter.action = action; if (action == nsMsgFilterAction.MoveToFolder) { var targetUri; if (gActionTargetElement) targetUri = gActionTargetElement.selectedItem.getAttribute("data"); dump("folder target = " + gActionTargetElement.selectedItem + "\n"); if (!targetUri || targetUri == "") { var str = Bundle.GetStringFromName("mustSelectFolder"); window.alert(str); gFilter = null; return false; } gFilter.actionTargetFolderUri = targetUri; }  else if (action == nsMsgFilterAction.ChangePriority) { if (!gActionPriority.selectedItem) { var str = Bundle.GetStringFromName("mustSelectPriority"); window.alert(str); gFilter = null; return false; } gFilter.actionPriority = gActionPriority.selectedItem.getAttribute("data"); }  
context: function saveFilter() {    var isNewFilter;    var filterName= gFilterNameElement.value;    if (!filterName || filterName == "") {        var str = Bundle.GetStringFromName("mustEnterName");        window.alert(str);        gFilterNameElement.focus();        return false;    }    if (!gFilter) {        gFilter = gFilterList.createFilter(gFilterNameElement.value);        isNewFilter = true;    } else {        gFilter.filterName = gFilterNameElement.value;        isNewFilter = false;    }    saveSearchTerms(gFilter.searchTerms, gFilter);    var action = gActionElement.selectedItem.getAttribute("data");    dump("Action = " + action + "\n");    gFilter.action = action;    if (action == nsMsgFilterAction.MoveToFolder) {        var targetUri;        if (gActionTargetElement)            targetUri = gActionTargetElement.selectedItem.getAttribute("data");        dump("folder target = " + gActionTargetElement.selectedItem + "\n");        if (!targetUri || targetUri == "") {            var str = Bundle.GetStringFromName("mustSelectFolder");            window.alert(str);            gFilter = null;            return false;        }        gFilter.actionTargetFolderUri = targetUri;    }        else if (action == nsMsgFilterAction.ChangePriority) {        if (!gActionPriority.selectedItem) {            var str = Bundle.GetStringFromName("mustSelectPriority");            window.alert(str);            gFilter = null;            return false;        }        gFilter.actionPriority = gActionPriority.selectedItem.getAttribute("data");    }        if (isNewFilter) {        dump("new filter.. inserting into " + gFilterList + "\n");        gFilterList.insertFilterAt(0, gFilter);    }    // success!    return true;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/87a615ef2698fdc59ca0d6da3d1e701b35899d99/FilterEditor.js/buggy/mailnews/base/search/resources/content/FilterEditor.js