зеркало из https://github.com/mozilla/pjs.git
refresh the filter list when the user presses 'ok' in the filter editor
This commit is contained in:
Родитель
351bd72f09
Коммит
5710f3f347
|
@ -63,6 +63,11 @@ function filterEditorOnLoad()
|
|||
function onOk()
|
||||
{
|
||||
saveFilter();
|
||||
|
||||
// parent should refresh filter list..
|
||||
// this should REALLY only happen when some criteria changes that
|
||||
// are displayed in the filter dialog, like the filter name
|
||||
window.arguments[0].refresh = true;
|
||||
window.close();
|
||||
}
|
||||
|
||||
|
|
|
@ -113,6 +113,9 @@ function EditFilter() {
|
|||
var args = {filter: selectedFilter};
|
||||
|
||||
window.openDialog("chrome://messenger/content/FilterEditor.xul", "FilterEditor", "chrome,modal", args);
|
||||
|
||||
if (args.refresh)
|
||||
refreshFilterList();
|
||||
}
|
||||
|
||||
function NewFilter()
|
||||
|
@ -122,9 +125,16 @@ function NewFilter()
|
|||
|
||||
window.openDialog("chrome://messenger/content/FilterEditor.xul", "FilterEditor", "chrome,modal", args);
|
||||
|
||||
if (args.refresh) refreshFilterList();
|
||||
|
||||
}
|
||||
|
||||
function refreshFilterList() {
|
||||
var tree = document.getElementById("filterTree");
|
||||
if (!tree) return;
|
||||
|
||||
tree.setAttribute("ref", tree.getAttribute("ref"));
|
||||
}
|
||||
|
||||
function updateButtons()
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче