зеркало из https://github.com/mozilla/pjs.git
fix for bug 112714;making filter dialogs modal;r=naving;sr=dbienvenu;a=asa
This commit is contained in:
Родитель
00a1a1caf4
Коммит
6b9a855cb7
|
@ -1067,45 +1067,11 @@ function MsgSearchAddresses()
|
|||
function MsgFilters(emailAddress)
|
||||
{
|
||||
var preselectedFolder = GetFirstSelectedMsgFolder();
|
||||
var windowManagerInterface = GetWindowMediator();
|
||||
var filterList = windowManagerInterface.getMostRecentWindow("mailnews:filterlist");
|
||||
var args = { folder: preselectedFolder };
|
||||
if (emailAddress)
|
||||
args.prefillValue = emailAddress;
|
||||
|
||||
if (filterList)
|
||||
{
|
||||
var filterEditor = windowManagerInterface.getMostRecentWindow("mailnews:filtereditor");
|
||||
|
||||
// If the filtereditor is open, then we focus that because it is modal and
|
||||
// thus blocking the filterlist from focusing.
|
||||
if (filterEditor)
|
||||
{
|
||||
if(emailAddress)
|
||||
{
|
||||
if(!gPromptService) {
|
||||
gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
|
||||
gPromptService = gPromptService.QueryInterface(Components.interfaces.nsIPromptService);
|
||||
}
|
||||
|
||||
gPromptService.alert(window,
|
||||
gBrandBundle.getString("brandShortName"),
|
||||
gMessengerBundle.getString('cannotHaveTwoFilterRulesText')
|
||||
);
|
||||
}
|
||||
filterEditor.focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
if(emailAddress)
|
||||
filterList.openPrefillOnExistingFilterList(emailAddress);
|
||||
else
|
||||
filterList.focus();
|
||||
}
|
||||
}
|
||||
else
|
||||
window.openDialog("chrome://messenger/content/FilterListDialog.xul", "",
|
||||
"chrome,resizable,centerscreen,dialog=yes", args);
|
||||
window.openDialog("chrome://messenger/content/FilterListDialog.xul", "",
|
||||
"chrome,modal,resizable,centerscreen,dialog=yes", args);
|
||||
}
|
||||
|
||||
function MsgViewAllHeaders()
|
||||
|
|
|
@ -29,7 +29,6 @@ const nsMsgFilterMotion = Components.interfaces.nsMsgFilterMotion;
|
|||
|
||||
var gFilterBundle;
|
||||
var gPromptService;
|
||||
var gFilterListDialogAlreadyOpen = false;
|
||||
var gFilterListMsgWindow = null;
|
||||
|
||||
function onLoad()
|
||||
|
@ -74,17 +73,9 @@ function onLoad()
|
|||
onNewFilter(window.arguments[0].prefillValue);
|
||||
}
|
||||
|
||||
function openPrefillOnExistingFilterList(emailAddress)
|
||||
{
|
||||
gFilterListDialogAlreadyOpen = true;
|
||||
onNewFilter(emailAddress);
|
||||
}
|
||||
function onCancel()
|
||||
{
|
||||
if(gFilterListDialogAlreadyOpen)
|
||||
gFilterListDialogAlreadyOpen = false;
|
||||
else
|
||||
window.close();
|
||||
window.close();
|
||||
}
|
||||
|
||||
function onOk()
|
||||
|
|
Загрузка…
Ссылка в новой задаче