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

LDAP Directory Server dialogs.
r=mohanb, sr=sspitzer, a=dbaron.


git-svn-id: svn://10.0.0.236/trunk@96669 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
srilatha%netscape.com 2001-06-08 01:32:38 +00:00
parent 3707012b14
commit 1aaf971be4
2 changed files with 23 additions and 1 deletions

View File

@ -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

View File

@ -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()