Fix for bug# 79922. Propagates the name modification from properties dialog to the

LDAP Directory Server dialogs.
r=mohanb, sr=sspitzer, a=dbaron.
This commit is contained in:
srilatha%netscape.com 2001-06-08 01:32:38 +00:00
Родитель ab253d3aaa
Коммит 38ac598122
2 изменённых файлов: 23 добавлений и 1 удалений

Просмотреть файл

@ -204,7 +204,10 @@ function onOK()
pref_string_content = false;
}
window.opener.gNewServer = description;
window.opener.gNewServerString = gPref_string_desc;
window.opener.gNewServerString = gPref_string_desc;
// set window.opener.gUpdate to true so that LDAP Directory Servers
// dialog gets updated
window.opener.gUpdate = true;
window.close();
}
else

Просмотреть файл

@ -6,6 +6,7 @@ var gRefresh = false;
var gNewServer = null;
var gNewServerString = null;
var gFromGlobalPref = false;
var gUpdate = false;
function onEditDirectories()
{
@ -359,6 +360,24 @@ function editDirectory()
window.openDialog("chrome://messenger/content/addressbook/pref-directory-add.xul",
"editDirectory", "chrome,modal=yes,resizable=no", args);
}
if(gUpdate)
{
// directory server properties have changed. So, update the
// LDAP Directory Servers dialog.
var directoriesTree = document.getElementById("directoriesTree");
var selectedNode = directoriesTree.selectedItems[0];
var row = selectedNode.firstChild;
var cell = row.firstChild;
cell.setAttribute('label', gNewServer);
cell.setAttribute('string', gNewServerString);
// set gUpdate to false since we have updated the server name in the list.
gUpdate = false;
// window.opener is either global pref window or
// mail/news account settings window.
// set window.opener.gRefresh to true such that the
// dropdown list box gets updated
window.opener.gRefresh = true;
}
}
function removeDirectory()