mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Convert if/else add/remove statements to toggle
Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
parent
2682fe2067
commit
16e51aa319
1 changed files with 2 additions and 10 deletions
|
@ -368,11 +368,7 @@ import template from './libraryoptionseditor.template.html';
|
|||
parent.querySelector('.imageFetchers').addEventListener('click', onImageFetchersContainerClick);
|
||||
|
||||
parent.querySelector('#chkEnableEmbeddedTitles').addEventListener('change', (e) => {
|
||||
if (e.currentTarget.checked) {
|
||||
parent.querySelector('.chkEnableEmbeddedExtrasTitlesContainer').classList.remove('hide');
|
||||
} else {
|
||||
parent.querySelector('.chkEnableEmbeddedExtrasTitlesContainer').classList.add('hide');
|
||||
}
|
||||
parent.querySelector('.chkEnableEmbeddedExtrasTitlesContainer').classList.toggle('hide', !e.currentTarget.checked);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -593,11 +589,7 @@ import template from './libraryoptionseditor.template.html';
|
|||
parent.querySelector('#chkSaveLocal').checked = options.SaveLocalMetadata;
|
||||
parent.querySelector('.chkAutomaticallyGroupSeries').checked = options.EnableAutomaticSeriesGrouping;
|
||||
parent.querySelector('#chkEnableEmbeddedTitles').checked = options.EnableEmbeddedTitles;
|
||||
if (options.EnableEmbeddedTitles) {
|
||||
parent.querySelector('.chkEnableEmbeddedExtrasTitlesContainer').classList.remove('hide');
|
||||
} else {
|
||||
parent.querySelector('.chkEnableEmbeddedExtrasTitlesContainer').classList.add('hide');
|
||||
}
|
||||
parent.querySelector('.chkEnableEmbeddedExtrasTitlesContainer').classList.toggle('hide', !options.EnableEmbeddedTitles);
|
||||
parent.querySelector('#chkEnableEmbeddedExtrasTitles').checked = options.EnableEmbeddedExtrasTitles;
|
||||
parent.querySelector('#chkEnableEmbeddedEpisodeInfos').value = options.EnableEmbeddedEpisodeInfos;
|
||||
parent.querySelector('#selectAllowEmbeddedSubtitles').value = options.AllowEmbeddedSubtitles;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue