зеркало из https://github.com/mozilla/pjs.git
bug 65253 Profile Creation: Need a user interface for Regional Content, r=nhotta, sr=alecf, a=blizzard
This commit is contained in:
Родитель
bd54233344
Коммит
20e936f715
|
@ -9,22 +9,41 @@ function Startup()
|
|||
tree.selectItem(elements[0].parentNode.parentNode);
|
||||
}
|
||||
else {
|
||||
var kids = document.getElementById("treechildren");
|
||||
tree.selectItem(kids);
|
||||
tree.selectedIndex = 0;
|
||||
}
|
||||
|
||||
var selectedRegion = window.arguments.length ? window.arguments[1] : null;
|
||||
var list = document.getElementById("regionList");
|
||||
if (selectedRegion) {
|
||||
var elements = list.getElementsByAttribute("value", selectedRegion);
|
||||
if (elements.length)
|
||||
list.selectedItem = elements[0];
|
||||
} else {
|
||||
list.selectedIndex = 1;
|
||||
}
|
||||
}
|
||||
|
||||
function onOK()
|
||||
{
|
||||
//cache language on the parent window
|
||||
var tree = document.getElementById("langList");
|
||||
var selectedItem = tree.selectedItems.length ? tree.selectedItems[0] : null;
|
||||
if (selectedItem) {
|
||||
var langName = selectedItem.firstChild.firstChild.getAttribute("value");
|
||||
var langStore = opener.document.getElementById("ProfileLocale");
|
||||
var langStore = opener.document.getElementById("ProfileLanguage");
|
||||
if (langStore)
|
||||
langStore.setAttribute("data", langName);
|
||||
}
|
||||
|
||||
//cache region on the parent window
|
||||
var list = document.getElementById("regionList");
|
||||
var selectedItem = list.selectedItem;
|
||||
if (selectedItem) {
|
||||
var regionName = selectedItem.getAttribute("value");
|
||||
var regionStore = opener.document.getElementById("ProfileRegion");
|
||||
if (regionStore)
|
||||
regionStore.setAttribute("data", regionName);
|
||||
}
|
||||
|
||||
window.close();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -27,18 +27,18 @@
|
|||
<treecol flex="1"/>
|
||||
</treecolgroup>
|
||||
|
||||
<template xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
|
||||
<template xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
|
||||
<rule chrome:localeType="region">
|
||||
</rule>
|
||||
<rule>
|
||||
<treechildren flex="1">
|
||||
<treeitem id="treechildren" uri="...">
|
||||
<treerow>
|
||||
<treecell label="rdf:http://www.mozilla.org/rdf/chrome#displayName"
|
||||
value="rdf:http://www.mozilla.org/rdf/chrome#name"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
<treechildren flex="1">
|
||||
<treeitem id="treechildren" uri="...">
|
||||
<treerow>
|
||||
<treecell label="rdf:http://www.mozilla.org/rdf/chrome#displayName"
|
||||
value="rdf:http://www.mozilla.org/rdf/chrome#name"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
</tree>
|
||||
|
@ -50,18 +50,18 @@
|
|||
<separator class="thin" />
|
||||
|
||||
<menulist id="regionList" flex="1">
|
||||
<menupopup
|
||||
datasources="rdf:chrome" ref="urn:mozilla:locale:root"
|
||||
sortResource="http://www.mozilla.org/rdf/chrome#name"
|
||||
sortDirection="ascending">
|
||||
<template xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
|
||||
<rule chrome:localeType="region">
|
||||
<menuitem class="standard" uri="rdf:*"
|
||||
label="rdf:http://www.mozilla.org/rdf/chrome#displayName"
|
||||
value="rdf:http://www.mozilla.org/rdf/chrome#name"/>
|
||||
</rule>
|
||||
</template>
|
||||
</menupopup>
|
||||
<menupopup
|
||||
datasources="rdf:chrome" ref="urn:mozilla:locale:root"
|
||||
sortResource="http://www.mozilla.org/rdf/chrome#name"
|
||||
sortDirection="ascending">
|
||||
<template xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
|
||||
<rule chrome:localeType="region">
|
||||
<menuitem class="standard" uri="rdf:*"
|
||||
label="rdf:http://www.mozilla.org/rdf/chrome#displayName"
|
||||
value="rdf:http://www.mozilla.org/rdf/chrome#name"/>
|
||||
</rule>
|
||||
</template>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
|
||||
<separator/>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
chrome:displayName="US Region"
|
||||
chrome:author="mozilla.org"
|
||||
chrome:name="US"
|
||||
chrome:localeType="region"
|
||||
chrome:previewURL="http://www.mozilla.org/locales/US.gif">
|
||||
<chrome:packages>
|
||||
<RDF:Seq about="urn:mozilla:locale:US:packages">
|
||||
|
|
Загрузка…
Ссылка в новой задаче