#62690 need to handle double click in language add dialog box

r = nhotta
sr = ben
This commit is contained in:
shanjian%netscape.com 2001-01-22 20:28:17 +00:00
Родитель 97fe7b64cf
Коммит 02192bd867
2 изменённых файлов: 15 добавлений и 2 удалений

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

@ -45,7 +45,7 @@
<html>&languages.customize.available.label;</html>
<tree class="inset" id="available_languages" flex="1"
datasources="rdf:null" multiple="true">
datasources="rdf:null" multiple="true" ondblclick="HandleDoubleClick(event.target)">
<treecolgroup>
<treecol flex="1"/>
</treecolgroup>

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

@ -123,7 +123,7 @@ function AddLanguage()
{
//cludge: make pref string available from the popup
document.getElementById('intlAcceptLanguages').value = pref_string;
window.openDialog("chrome://communicator/content/pref/pref-languages-add.xul","","modal=yes,chrome,resizable=no", "addlangwindow");
window.openDialog("chrome://communicator/content/pref/pref-languages-add.xul","","modal=yes,chrome,resizable=yes", "addlangwindow");
UpdateSavePrefString();
}
@ -395,6 +395,19 @@ function AddAvailableLanguage()
return true;
} //AddAvailableLanguage
function HandleDoubleClick(node)
{
var languageId = node.id;
var languageName = node.getAttribute('value');
if (languageName && languageName.length > 0)
{
if (!LangAlreadyActive(languageId)) {
AddTreeItem(window.opener.document, active_languages_treeroot, languageId, languageName);
}
window.close();
}//if
} //HandleDoubleClick
function RemoveActiveLanguage()
{