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

@ -521,29 +521,27 @@ var Dashboard = {
if (typeof options == "string") {
require(['paperbuttonstyle'], function () {
var message = options;
var message = options;
Dashboard.toastId = Dashboard.toastId || 0;
Dashboard.toastId = Dashboard.toastId || 0;
var id = 'toast' + (Dashboard.toastId++);
var id = 'toast' + (Dashboard.toastId++);
var elem = document.createElement("paper-toast");
elem.setAttribute('text', message);
elem.id = id;
var elem = document.createElement("paper-toast");
elem.setAttribute('text', message);
elem.id = id;
document.body.appendChild(elem);
document.body.appendChild(elem);
// This timeout is obviously messy but it's unclear how to determine when the webcomponent is ready for use
// element onload never fires
setTimeout(function () {
elem.show();
// This timeout is obviously messy but it's unclear how to determine when the webcomponent is ready for use
// element onload never fires
setTimeout(function () {
elem.show();
setTimeout(function () {
elem.parentNode.removeChild(elem);
}, 5000);
}, 300);
});
elem.parentNode.removeChild(elem);
}, 5000);
}, 300);
return;
}
@ -1378,10 +1376,6 @@ var Dashboard = {
html += '</div>';
$(parent).prepend(html);
if (helpUrl) {
require(['paperbuttonstyle']);
}
},
setPageTitle: function (title) {
@ -1439,38 +1433,6 @@ var Dashboard = {
return parts.join(':');
},
populateLanguages: function (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;
},
populateCountries: function (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;
},
getSupportedRemoteCommands: function () {
// Full list
@ -1999,9 +1961,7 @@ var AppInfo = {};
}
define("connectservice", ["apiclient/connectservice"]);
define("paperbuttonstyle", [], function () {
return {};
});
define("jqmicons", [], function () {
Dashboard.importCss('thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.icons.css');
return {};