1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fix language dropdown

This commit is contained in:
Luke Pulverenti 2015-11-29 14:44:15 -05:00
parent 3c30ee6e81
commit 039dcc8f8c
24 changed files with 154 additions and 82 deletions

View file

@ -38,8 +38,8 @@
loadExternalIds(page, item, metadataEditorInfo.ExternalIdInfos);
Dashboard.populateLanguages($('#selectLanguage', page), languages);
Dashboard.populateCountries($('#selectCountry', page), countries);
populateLanguages(page.querySelector('#selectLanguage'), languages);
populateCountries(page.querySelector('#selectCountry'), countries);
LibraryBrowser.renderName(item, $('.itemName', page), true);
@ -69,6 +69,38 @@
});
}
function populateCountries(select, allCountries) {
var html = "";
html += "<option value=''></option>";
for (var i = 0, length = allCountries.length; i < length; i++) {
var culture = allCountries[i];
html += "<option value='" + culture.TwoLetterISORegionName + "'>" + culture.DisplayName + "</option>";
}
select.innerHTML = html;
}
function populateLanguages(select, languages) {
var html = "";
html += "<option value=''></option>";
for (var i = 0, length = languages.length; i < length; i++) {
var culture = languages[i];
html += "<option value='" + culture.TwoLetterISOLanguageName + "'>" + culture.DisplayName + "</option>";
}
select.innerHTML = html;
}
function renderContentTypeOptions(page, metadataInfo) {
if (metadataInfo.ContentTypeOptions.length) {