diff --git a/Jellyfin.Plugin.SkinManager/Configuration/configurationpage.html b/Jellyfin.Plugin.SkinManager/Configuration/configurationpage.html index 0060fbf..3cc9429 100644 --- a/Jellyfin.Plugin.SkinManager/Configuration/configurationpage.html +++ b/Jellyfin.Plugin.SkinManager/Configuration/configurationpage.html @@ -54,6 +54,7 @@ cssOptions.appendChild(opt); }); updateSelectors() + } function loadOptions(options){ var page = $.mobile.activePage; @@ -117,7 +118,8 @@ var description = option.description; //html += '
'; html += '
' - return html + return html; + } function getOptions(option){ var html = ""; var selections = option.selections @@ -139,15 +141,7 @@ html += '
'+description+'
' return html } - function updateDescription( ){ - var description = document.getElementById("description"); - var selected = $('#cssOptions').val(); - data.forEach(element => { - if(element.defaultCss == selected){ - description.innerHTML=element.description; - } - }) - } + function createCss(){ var savedHtml = ""; //process checkbox @@ -198,11 +192,13 @@ return css; } function updateSelectors(){ - var selected = $('#cssOptions').val(); + var selected = document.getElementById("cssOptions"); + var description = document.getElementById("description"); data.forEach(element=>{ - if(element.defaultCss == selected){ + if(element.name == selected.selectedOptions[0].innerText){ loadOptions(element.options); - updateDescription(); + description.innerHTML=element.description; + } }) }