fix some other code clarity issues
This commit is contained in:
parent
06d2154434
commit
90290d30db
5 changed files with 28 additions and 26 deletions
|
@ -10,8 +10,8 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb
|
|||
page.querySelector("#txtCachePath").value = config.CachePath || "";
|
||||
$("#txtMetadataPath", page).val(config.MetadataPath || "");
|
||||
$("#txtMetadataNetworkPath", page).val(config.MetadataNetworkPath || "");
|
||||
$("#selectLocalizationLanguage", page).html(languageOptions.map(function(l) {
|
||||
return '<option value="' + l.Value + '">' + l.Name + "</option>"
|
||||
$("#selectLocalizationLanguage", page).html(languageOptions.map(function(language) {
|
||||
return '<option value="' + language.Value + '">' + language.Name + "</option>"
|
||||
})).val(config.UICulture);
|
||||
currentLanguage = config.UICulture;
|
||||
if (systemInfo.CanSelfUpdate) {
|
||||
|
@ -43,10 +43,7 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb
|
|||
config.CachePath = form.querySelector("#txtCachePath").value;
|
||||
config.MetadataPath = $("#txtMetadataPath", form).val();
|
||||
config.MetadataNetworkPath = $("#txtMetadataNetworkPath", form).val();
|
||||
var requiresReload = false;
|
||||
if (config.UICulture !== currentLanguage) {
|
||||
requiresReload = true;
|
||||
}
|
||||
var requiresReload = (config.UICulture !== currentLanguage);
|
||||
config.EnableAutomaticRestart = $("#chkEnableAutomaticRestart", form).checked();
|
||||
config.EnableAutoUpdate = $("#chkEnableAutomaticServerUpdates", form).checked();
|
||||
ApiClient.updateServerConfiguration(config).then(function() {
|
||||
|
|
|
@ -8,12 +8,14 @@ define(["globalize", "loading", "libraryMenu", "dom", "emby-input", "emby-button
|
|||
function fillTypes(view, currentId) {
|
||||
ApiClient.getJSON(ApiClient.getUrl("LiveTv/TunerHosts/Types")).then(function(types) {
|
||||
var selectType = view.querySelector(".selectType");
|
||||
selectType.innerHTML = types.map(function(t) {
|
||||
return '<option value="' + t.Id + '">' + t.Name + "</option>";
|
||||
var html = "";
|
||||
html += types.map(function(tuner) {
|
||||
return '<option value="' + tuner.Id + '">' + tuner.Name + "</option>";
|
||||
}).join("");
|
||||
selectType.innerHTML += '<option value="other">';
|
||||
selectType.innerHTML += globalize.translate("TabOther");
|
||||
selectType.innerHTML += "</option>";
|
||||
html += '<option value="other">';
|
||||
html += globalize.translate("TabOther");
|
||||
html += "</option>";
|
||||
selectType.innerHTML = html;
|
||||
|
||||
selectType.disabled = null != currentId;
|
||||
selectType.value = "";
|
||||
|
@ -39,9 +41,10 @@ define(["globalize", "loading", "libraryMenu", "dom", "emby-input", "emby-button
|
|||
var selectType = view.querySelector(".selectType");
|
||||
var type = info.Type || "";
|
||||
if (info.Source && isM3uVariant(info.Source)) {
|
||||
selectType.value = info.Source;
|
||||
onTypeChange.call(selectType);
|
||||
type = info.Source;
|
||||
}
|
||||
selectType.value = type;
|
||||
onTypeChange.call(selectType);
|
||||
view.querySelector(".txtDevicePath").value = info.Url || "";
|
||||
view.querySelector(".txtFriendlyName").value = info.FriendlyName || "";
|
||||
view.querySelector(".txtUserAgent").value = info.UserAgent || "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue