зеркало из https://github.com/mozilla/gecko-dev.git
#62690 need to handle double click in language add dialog box
r = nhotta sr = ben
This commit is contained in:
Родитель
97fe7b64cf
Коммит
02192bd867
|
@ -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()
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче