Bug 1061648 - Fix mail list refresh when deleting items; r=mconley
This commit is contained in:
Родитель
164aa82b3e
Коммит
7521a3282d
|
@ -479,12 +479,24 @@ function goNewListDialog(selectedAB)
|
|||
{selectedAB:selectedAB});
|
||||
}
|
||||
|
||||
function goEditListDialog(abCard, listURI)
|
||||
function goEditListDialog(abCard, listUri)
|
||||
{
|
||||
let params = {
|
||||
inParam: {
|
||||
abCard: abCard,
|
||||
listUri: listUri,
|
||||
},
|
||||
outParam: {
|
||||
ok: false, // true if OK in dialog is clicked
|
||||
},
|
||||
};
|
||||
window.openDialog("chrome://messenger/content/addressbook/abEditListDialog.xul",
|
||||
"",
|
||||
"chrome,modal,resizable=no,centerscreen",
|
||||
{abCard:abCard, listURI:listURI});
|
||||
params);
|
||||
if (params.outParam.ok) {
|
||||
ChangeDirectoryByURI(listUri); // force refresh
|
||||
}
|
||||
}
|
||||
|
||||
function goNewCardDialog(selectedAB)
|
||||
|
@ -764,3 +776,4 @@ function makePhotoFile(aDir, aExtension) {
|
|||
function encodeABTermValue(aString) {
|
||||
return encodeURIComponent(aString).replace(/\(/g, "%28").replace(/\)/g, "%29");
|
||||
}
|
||||
|
||||
|
|
|
@ -99,6 +99,7 @@ function GetListValue(mailList, doAdd)
|
|||
try
|
||||
{
|
||||
mailList.addressLists.removeElementAt(pos);
|
||||
--oldTotal;
|
||||
}
|
||||
catch(ex)
|
||||
{
|
||||
|
@ -235,6 +236,7 @@ function EditListOKButton()
|
|||
NotifySaveListeners(gEditList);
|
||||
gEditList.editMailListToDatabase(gListCard);
|
||||
|
||||
window.arguments[0].outParam.ok = true;
|
||||
return true; // close the window
|
||||
}
|
||||
|
||||
|
@ -245,8 +247,9 @@ function OnLoadEditList()
|
|||
{
|
||||
InitCommonJS();
|
||||
|
||||
gListCard = window.arguments[0].abCard;
|
||||
var listUri = window.arguments[0].listURI;
|
||||
gListCard = window.arguments[0].inParam.abCard;
|
||||
var listUri = window.arguments[0].inParam.listUri;
|
||||
window.arguments[0].outParam.ok = false;
|
||||
|
||||
gEditList = GetDirectoryFromURI(listUri);
|
||||
|
||||
|
@ -606,3 +609,4 @@ function NotifySaveListeners(aMailingList)
|
|||
for (let i = 0; i < gSaveListeners.length; i++)
|
||||
gSaveListeners[i](aMailingList, document);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче