mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update config
This commit is contained in:
parent
747d71e76d
commit
cd06587514
9 changed files with 94 additions and 130 deletions
|
@ -1,23 +1,19 @@
|
||||||
define(['paperdialoghelper', 'paper-input', 'paper-button', 'jqmcollapsible'], function (paperDialogHelper) {
|
define(['paperdialoghelper', 'paper-input', 'paper-button', 'jqmcollapsible', 'paper-checkbox'], function (paperDialogHelper) {
|
||||||
|
|
||||||
function renderLibrarySharingList(context, result) {
|
function renderLibrarySharingList(context, result) {
|
||||||
|
|
||||||
var folderHtml = '';
|
var folderHtml = '';
|
||||||
|
|
||||||
folderHtml += '<div data-role="controlgroup">';
|
folderHtml += '<div class="paperCheckboxList">';
|
||||||
|
|
||||||
folderHtml += result.Items.map(function (i) {
|
folderHtml += result.Items.map(function (i) {
|
||||||
|
|
||||||
var currentHtml = '';
|
var currentHtml = '';
|
||||||
|
|
||||||
var id = 'chkShareFolder' + i.Id;
|
|
||||||
|
|
||||||
currentHtml += '<label for="' + id + '">' + i.Name + '</label>';
|
|
||||||
|
|
||||||
var isChecked = true;
|
var isChecked = true;
|
||||||
var checkedHtml = isChecked ? ' checked="checked"' : '';
|
var checkedHtml = isChecked ? ' checked="checked"' : '';
|
||||||
|
|
||||||
currentHtml += '<input data-mini="true" class="chkShareFolder" data-folderid="' + i.Id + '" type="checkbox" id="' + id + '"' + checkedHtml + ' />';
|
currentHtml += '<paper-checkbox class="chkShareFolder" data-folderid="' + i.Id + '" type="checkbox"' + checkedHtml + '>' + i.Name + '</paper-checkbox>';
|
||||||
|
|
||||||
return currentHtml;
|
return currentHtml;
|
||||||
|
|
||||||
|
@ -25,7 +21,7 @@
|
||||||
|
|
||||||
folderHtml += '</div>';
|
folderHtml += '</div>';
|
||||||
|
|
||||||
$('.librarySharingList', context).html(folderHtml).trigger('create');
|
context.querySelector('.librarySharingList').innerHTML = folderHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
function inviteUser(dlg) {
|
function inviteUser(dlg) {
|
||||||
|
@ -34,7 +30,11 @@
|
||||||
|
|
||||||
ApiClient.getJSON(ApiClient.getUrl("Channels", {})).then(function (channelsResult) {
|
ApiClient.getJSON(ApiClient.getUrl("Channels", {})).then(function (channelsResult) {
|
||||||
|
|
||||||
var shareExcludes = $(".chkShareFolder:checked", dlg).get().map(function (i) {
|
var shareExcludes = $(".chkShareFolder", dlg).get().filter(function (i) {
|
||||||
|
|
||||||
|
return i.checked;
|
||||||
|
|
||||||
|
}).map(function (i) {
|
||||||
|
|
||||||
return i.getAttribute('data-folderid');
|
return i.getAttribute('data-folderid');
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<title>${TitleMetadata}</title>
|
<title>${TitleMetadata}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="advancedMetadataConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="jqmcollapsible,scripts/metadataadvanced,paper-checkbox,paper-input,jqmcheckbox">
|
<div id="advancedMetadataConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="jqmcollapsible,scripts/metadataadvanced,paper-checkbox,paper-input">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@
|
||||||
<br />
|
<br />
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label for="chkSaveMetadataHidden">${OptionSaveMetadataAsHidden}</label>
|
<paper-checkbox id="chkSaveMetadataHidden">${OptionSaveMetadataAsHidden}</paper-checkbox>
|
||||||
<input type="checkbox" id="chkSaveMetadataHidden" data-mini="true" />
|
<br /><br />
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label for="selectDateAdded" class="selectLabel">${LabelDateAddedBehavior}</label>
|
<label for="selectDateAdded" class="selectLabel">${LabelDateAddedBehavior}</label>
|
||||||
|
@ -45,14 +45,12 @@
|
||||||
<div>
|
<div>
|
||||||
<ul data-role="listview" class="ulForm">
|
<ul data-role="listview" class="ulForm">
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" id="chkEnableTmdbUpdates" data-mini="true" />
|
<paper-checkbox id="chkEnableTmdbUpdates">${LabelAutomaticUpdatesTmdb}</paper-checkbox>
|
||||||
<label for="chkEnableTmdbUpdates">${LabelAutomaticUpdatesTmdb}</label>
|
<div class="fieldDescription paperCheckboxFieldDescription">${LabelAutomaticUpdatesTmdbHelp}</div>
|
||||||
<div class="fieldDescription">${LabelAutomaticUpdatesTmdbHelp}</div>
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" id="chkEnableTvdbUpdates" data-mini="true" />
|
<paper-checkbox id="chkEnableTvdbUpdates">${LabelAutomaticUpdatesTvdb}</paper-checkbox>
|
||||||
<label for="chkEnableTvdbUpdates">${LabelAutomaticUpdatesTvdb}</label>
|
<div class="fieldDescription paperCheckboxFieldDescription">${LabelAutomaticUpdatesTvdbHelp}</div>
|
||||||
<div class="fieldDescription">${LabelAutomaticUpdatesTvdbHelp}</div>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -64,25 +62,21 @@
|
||||||
<br />
|
<br />
|
||||||
<ul data-role="listview" class="ulForm" style="margin-bottom:0!important;">
|
<ul data-role="listview" class="ulForm" style="margin-bottom:0!important;">
|
||||||
<li>
|
<li>
|
||||||
<label>${HeaderExtractChapterImagesFor}</label>
|
<div class="paperCheckboxListLabel">${HeaderExtractChapterImagesFor}</div>
|
||||||
<div data-role="controlgroup">
|
<div class="paperCheckboxList">
|
||||||
<input type="checkbox" id="chkChaptersMovies" />
|
<paper-checkbox id="chkChaptersMovies">${OptionMovies}</paper-checkbox>
|
||||||
<label for="chkChaptersMovies">${OptionMovies}</label>
|
|
||||||
|
|
||||||
<input type="checkbox" id="chkChaptersEpisodes" />
|
<paper-checkbox id="chkChaptersEpisodes">${OptionEpisodes}</paper-checkbox>
|
||||||
<label for="chkChaptersEpisodes">${OptionEpisodes}</label>
|
|
||||||
|
|
||||||
<input type="checkbox" id="chkChaptersOtherVideos" />
|
<paper-checkbox id="chkChaptersOtherVideos">${OptionOtherVideos}</paper-checkbox>
|
||||||
<label for="chkChaptersOtherVideos">${OptionOtherVideos}</label>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="fieldDescription">${ExtractChapterImagesHelp}</div>
|
<div class="fieldDescription paperCheckboxFieldDescription">${ExtractChapterImagesHelp}</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br />
|
<br />
|
||||||
<div>
|
<div>
|
||||||
<label for="chkExtractChaptersDuringLibraryScan">${LabelExtractChaptersDuringLibraryScan}</label>
|
<paper-checkbox id="chkExtractChaptersDuringLibraryScan">${LabelExtractChaptersDuringLibraryScan}</paper-checkbox>
|
||||||
<input type="checkbox" id="chkExtractChaptersDuringLibraryScan" />
|
<div class="fieldDescription paperCheckboxFieldDescription">${LabelExtractChaptersDuringLibraryScanHelp}</div>
|
||||||
<div class="fieldDescription">${LabelExtractChaptersDuringLibraryScanHelp}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
@ -94,8 +88,7 @@
|
||||||
<br />
|
<br />
|
||||||
<ul data-role="listview" class="ulForm">
|
<ul data-role="listview" class="ulForm">
|
||||||
<li>
|
<li>
|
||||||
<label for="txtFanartApiKey">${LabelFanartApiKey}</label>
|
<paper-input type="text" id="txtFanartApiKey" label="${LabelFanartApiKey}"></paper-input>
|
||||||
<input type="text" id="txtFanartApiKey" />
|
|
||||||
<div class="fieldDescription">${LabelFanartApiKeyHelp}</div>
|
<div class="fieldDescription">${LabelFanartApiKeyHelp}</div>
|
||||||
<div class="fieldDescription"><a href="https://fanart.tv/2015/01/personal-api-keys" target="_blank">${ButtonLearnMore}</a></div>
|
<div class="fieldDescription"><a href="https://fanart.tv/2015/01/personal-api-keys" target="_blank">${ButtonLearnMore}</a></div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -114,30 +107,23 @@
|
||||||
<br />
|
<br />
|
||||||
<ul data-role="listview" class="ulForm">
|
<ul data-role="listview" class="ulForm">
|
||||||
<li>
|
<li>
|
||||||
<label>${HeaderDownloadPeopleMetadataFor}</label>
|
<div class="paperCheckboxListLabel">${HeaderDownloadPeopleMetadataFor}</div>
|
||||||
<div data-role="controlgroup">
|
<div class="paperCheckboxList">
|
||||||
<input type="checkbox" id="chkPeopleActors" />
|
<paper-checkbox id="chkPeopleActors">${OptionActors}</paper-checkbox>
|
||||||
<label for="chkPeopleActors">${OptionActors}</label>
|
|
||||||
|
|
||||||
<input type="checkbox" id="chkPeopleComposers" />
|
<paper-checkbox id="chkPeopleComposers">${OptionComposers}</paper-checkbox>
|
||||||
<label for="chkPeopleComposers">${OptionComposers}</label>
|
|
||||||
|
|
||||||
<input type="checkbox" id="chkPeopleDirectors" />
|
<paper-checkbox id="chkPeopleDirectors">${OptionDirectors}</paper-checkbox>
|
||||||
<label for="chkPeopleDirectors">${OptionDirectors}</label>
|
|
||||||
|
|
||||||
<input type="checkbox" id="chkPeopleGuestStars" />
|
<paper-checkbox id="chkPeopleGuestStars">${OptionGuestStars}</paper-checkbox>
|
||||||
<label for="chkPeopleGuestStars">${OptionGuestStars}</label>
|
|
||||||
|
|
||||||
<input type="checkbox" id="chkPeopleProducers" />
|
<paper-checkbox id="chkPeopleProducers">${OptionProducers}</paper-checkbox>
|
||||||
<label for="chkPeopleProducers">${OptionProducers}</label>
|
|
||||||
|
|
||||||
<input type="checkbox" id="chkPeopleWriters" />
|
<paper-checkbox id="chkPeopleWriters">${OptionWriters}</paper-checkbox>
|
||||||
<label for="chkPeopleWriters">${OptionWriters}</label>
|
|
||||||
|
|
||||||
<input type="checkbox" id="chkPeopleOthers" />
|
<paper-checkbox id="chkPeopleOthers">${OptionOthers}</paper-checkbox>
|
||||||
<label for="chkPeopleOthers">${OptionOthers}</label>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="fieldDescription">${HeaderDownloadPeopleMetadataForHelp}</div>
|
<div class="fieldDescription paperCheckboxFieldDescription">${HeaderDownloadPeopleMetadataForHelp}</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<title>${TitleMetadata}</title>
|
<title>${TitleMetadata}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="metadataImagesConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="jqmcollapsible,scripts/metadataimagespage,jqmcheckbox">
|
<div id="metadataImagesConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="jqmcollapsible,scripts/metadataimagespage,jqmcheckbox,paper-checkbox">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
|
|
||||||
|
@ -63,54 +63,20 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<fieldset class="imageSelections" data-role="controlgroup" style="border-bottom: 1px solid #ddd;">
|
<div class="paperCheckboxListLabel">${HeaderFetchImages}</div>
|
||||||
<legend>${HeaderFetchImages}</legend>
|
<div class="imageSelections paperCheckboxList">
|
||||||
<div class="imageType" data-imagetype="Primary" style="display: none;">
|
|
||||||
<input type="checkbox" data-mini="true" id="chkDownloadPrimary" name="chkDownloadPrimary" />
|
|
||||||
<label for="chkDownloadPrimary">${OptionDownloadPrimaryImage}</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<paper-checkbox class="imageType hide" data-imagetype="Primary">${OptionDownloadPrimaryImage}</paper-checkbox>
|
||||||
|
<paper-checkbox class="imageType hide" data-imagetype="Art">${OptionDownloadArtImage}</paper-checkbox>
|
||||||
|
<paper-checkbox class="imageType hide" data-imagetype="BoxRear">${OptionDownloadBackImage}</paper-checkbox>
|
||||||
|
<paper-checkbox class="imageType hide" data-imagetype="Banner">${OptionDownloadBannerImage}</paper-checkbox>
|
||||||
|
<paper-checkbox class="imageType hide" data-imagetype="Box">${OptionDownloadBoxImage}</paper-checkbox>
|
||||||
|
|
||||||
<div class="imageType" data-imagetype="Art" style="display: none;">
|
<paper-checkbox class="imageType hide" data-imagetype="Disc">${OptionDownloadDiscImage}</paper-checkbox>
|
||||||
<input type="checkbox" data-mini="true" id="chkDownloadArt" name="chkDownloadArt" />
|
<paper-checkbox class="imageType hide" data-imagetype="Logo">${OptionDownloadLogoImage}</paper-checkbox>
|
||||||
<label for="chkDownloadArt">${OptionDownloadArtImage}</label>
|
<paper-checkbox class="imageType hide" data-imagetype="Menu">${OptionDownloadMenuImage}</paper-checkbox>
|
||||||
|
<paper-checkbox class="imageType hide" data-imagetype="Thumb">${OptionDownloadThumbImage}</paper-checkbox>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="imageType" data-imagetype="BoxRear" style="display: none;">
|
|
||||||
<input type="checkbox" data-mini="true" id="chkBack" name="chkBack" />
|
|
||||||
<label for="chkBack">${OptionDownloadBackImage}</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="imageType" data-imagetype="Banner" style="display: none;">
|
|
||||||
<input type="checkbox" data-mini="true" id="chkDownloadBanner" name="chkDownloadBanner" />
|
|
||||||
<label for="chkDownloadBanner">${OptionDownloadBannerImage}</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="imageType" data-imagetype="Box" style="display: none;">
|
|
||||||
<input type="checkbox" data-mini="true" id="chkDownloadBox" name="chkDownloadBox" />
|
|
||||||
<label for="chkDownloadBox">${OptionDownloadBoxImage}</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="imageType" data-imagetype="Disc" style="display: none;">
|
|
||||||
<input type="checkbox" data-mini="true" id="chkDownloadDisc" name="chkDownloadDisc" />
|
|
||||||
<label for="chkDownloadDisc">${OptionDownloadDiscImage}</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="imageType" data-imagetype="Logo" style="display: none;">
|
|
||||||
<input type="checkbox" data-mini="true" id="chkDownloadLogo" name="chkDownloadLogo" />
|
|
||||||
<label for="chkDownloadLogo">${OptionDownloadLogoImage}</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="imageType" data-imagetype="Menu" style="display: none;">
|
|
||||||
<input type="checkbox" data-mini="true" id="chkDownloadMenu" name="chkDownloadMenu" />
|
|
||||||
<label for="chkDownloadMenu">${OptionDownloadMenuImage}</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="imageType" data-imagetype="Thumb" style="display: none;">
|
|
||||||
<input type="checkbox" data-mini="true" id="chkDownloadThumb" name="chkDownloadThumb" />
|
|
||||||
<label for="chkDownloadThumb">${OptionDownloadThumbImage}</label>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -115,6 +115,12 @@
|
||||||
|
|
||||||
html = LibraryBrowser.getPosterViewHtml(posterOptions);
|
html = LibraryBrowser.getPosterViewHtml(posterOptions);
|
||||||
}
|
}
|
||||||
|
else if (view == "Thumb") {
|
||||||
|
|
||||||
|
posterOptions.preferThumb = true;
|
||||||
|
posterOptions.shape = "backdrop";
|
||||||
|
html = LibraryBrowser.getPosterViewHtml(posterOptions);
|
||||||
|
}
|
||||||
|
|
||||||
var elem = page.querySelector('#items');
|
var elem = page.querySelector('#items');
|
||||||
elem.innerHTML = html + pagingHtml;
|
elem.innerHTML = html + pagingHtml;
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
|
|
||||||
function loadAdvancedConfig(page, config) {
|
function loadAdvancedConfig(page, config) {
|
||||||
|
|
||||||
$('#chkSaveMetadataHidden', page).checked(config.SaveMetadataHidden).checkboxradio("refresh");
|
$('#chkSaveMetadataHidden', page).checked(config.SaveMetadataHidden);
|
||||||
|
|
||||||
$('#txtMetadataPath', page).val(config.MetadataPath || '');
|
$('#txtMetadataPath', page).val(config.MetadataPath || '');
|
||||||
|
|
||||||
$('#chkPeopleActors', page).checked(config.PeopleMetadataOptions.DownloadActorMetadata).checkboxradio("refresh");
|
$('#chkPeopleActors', page).checked(config.PeopleMetadataOptions.DownloadActorMetadata);
|
||||||
$('#chkPeopleComposers', page).checked(config.PeopleMetadataOptions.DownloadComposerMetadata).checkboxradio("refresh");
|
$('#chkPeopleComposers', page).checked(config.PeopleMetadataOptions.DownloadComposerMetadata);
|
||||||
$('#chkPeopleDirectors', page).checked(config.PeopleMetadataOptions.DownloadDirectorMetadata).checkboxradio("refresh");
|
$('#chkPeopleDirectors', page).checked(config.PeopleMetadataOptions.DownloadDirectorMetadata);
|
||||||
$('#chkPeopleProducers', page).checked(config.PeopleMetadataOptions.DownloadProducerMetadata).checkboxradio("refresh");
|
$('#chkPeopleProducers', page).checked(config.PeopleMetadataOptions.DownloadProducerMetadata);
|
||||||
$('#chkPeopleWriters', page).checked(config.PeopleMetadataOptions.DownloadWriterMetadata).checkboxradio("refresh");
|
$('#chkPeopleWriters', page).checked(config.PeopleMetadataOptions.DownloadWriterMetadata);
|
||||||
$('#chkPeopleOthers', page).checked(config.PeopleMetadataOptions.DownloadOtherPeopleMetadata).checkboxradio("refresh");
|
$('#chkPeopleOthers', page).checked(config.PeopleMetadataOptions.DownloadOtherPeopleMetadata);
|
||||||
$('#chkPeopleGuestStars', page).checked(config.PeopleMetadataOptions.DownloadGuestStarMetadata).checkboxradio("refresh");
|
$('#chkPeopleGuestStars', page).checked(config.PeopleMetadataOptions.DownloadGuestStarMetadata);
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
@ -24,27 +24,27 @@
|
||||||
|
|
||||||
function loadTmdbConfig(page, config) {
|
function loadTmdbConfig(page, config) {
|
||||||
|
|
||||||
$('#chkEnableTmdbUpdates', page).checked(config.EnableAutomaticUpdates).checkboxradio("refresh");
|
$('#chkEnableTmdbUpdates', page).checked(config.EnableAutomaticUpdates);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadTvdbConfig(page, config) {
|
function loadTvdbConfig(page, config) {
|
||||||
|
|
||||||
$('#chkEnableTvdbUpdates', page).checked(config.EnableAutomaticUpdates).checkboxradio("refresh");
|
$('#chkEnableTvdbUpdates', page).checked(config.EnableAutomaticUpdates);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadFanartConfig(page, config) {
|
function loadFanartConfig(page, config) {
|
||||||
|
|
||||||
$('#chkEnableFanartUpdates', page).checked(config.EnableAutomaticUpdates).checkboxradio("refresh");
|
$('#chkEnableFanartUpdates', page).checked(config.EnableAutomaticUpdates);
|
||||||
$('#txtFanartApiKey', page).val(config.UserApiKey || '');
|
$('#txtFanartApiKey', page).val(config.UserApiKey || '');
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadChapters(page, config, providers) {
|
function loadChapters(page, config, providers) {
|
||||||
|
|
||||||
$('#chkChaptersMovies', page).checked(config.EnableMovieChapterImageExtraction).checkboxradio("refresh");
|
$('#chkChaptersMovies', page).checked(config.EnableMovieChapterImageExtraction);
|
||||||
$('#chkChaptersEpisodes', page).checked(config.EnableEpisodeChapterImageExtraction).checkboxradio("refresh");
|
$('#chkChaptersEpisodes', page).checked(config.EnableEpisodeChapterImageExtraction);
|
||||||
$('#chkChaptersOtherVideos', page).checked(config.EnableOtherVideoChapterImageExtraction).checkboxradio("refresh");
|
$('#chkChaptersOtherVideos', page).checked(config.EnableOtherVideoChapterImageExtraction);
|
||||||
|
|
||||||
$('#chkExtractChaptersDuringLibraryScan', page).checked(config.ExtractDuringLibraryScan).checkboxradio("refresh");
|
$('#chkExtractChaptersDuringLibraryScan', page).checked(config.ExtractDuringLibraryScan);
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,17 +91,17 @@
|
||||||
var imageType = this.getAttribute('data-imagetype');
|
var imageType = this.getAttribute('data-imagetype');
|
||||||
|
|
||||||
if (metadataInfo.SupportedImageTypes.indexOf(imageType) == -1) {
|
if (metadataInfo.SupportedImageTypes.indexOf(imageType) == -1) {
|
||||||
$(this).hide();
|
this.classList.add('hide');
|
||||||
} else {
|
} else {
|
||||||
$(this).show();
|
this.classList.remove('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getImageConfig(config, imageType).Limit) {
|
if (getImageConfig(config, imageType).Limit) {
|
||||||
|
|
||||||
$('input', this).checked(true).checkboxradio('refresh');
|
this.checked = true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('input', this).checked(false).checkboxradio('refresh');
|
this.checked = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -452,11 +452,11 @@
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
config.ImageOptions = $('.imageType:visible input', form).get().map(function (c) {
|
config.ImageOptions = $('.imageType:not(.hide)', form).get().map(function (c) {
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
Type: $(c).parents('.imageType').attr('data-imagetype'),
|
Type: c.getAttribute('data-imagetype'),
|
||||||
Limit: c.checked ? 1 : 0,
|
Limit: c.checked ? 1 : 0,
|
||||||
MinWidth: 0
|
MinWidth: 0
|
||||||
};
|
};
|
||||||
|
|
|
@ -55,23 +55,20 @@
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
html += '<fieldset data-role="controlgroup">';
|
html += '<p class="paperCheckboxListLabel">' + Globalize.translate('HeaderBlockItemsWithNoRating') + '</p>';
|
||||||
|
|
||||||
html += '<legend>' + Globalize.translate('HeaderBlockItemsWithNoRating') + '</legend>';
|
html += '<div class="paperCheckboxList">';
|
||||||
|
|
||||||
for (var i = 0, length = items.length; i < length; i++) {
|
for (var i = 0, length = items.length; i < length; i++) {
|
||||||
|
|
||||||
var item = items[i];
|
var item = items[i];
|
||||||
|
|
||||||
var id = 'unratedItem' + i;
|
|
||||||
|
|
||||||
var checkedAttribute = user.Policy.BlockUnratedItems.indexOf(item.value) != -1 ? ' checked="checked"' : '';
|
var checkedAttribute = user.Policy.BlockUnratedItems.indexOf(item.value) != -1 ? ' checked="checked"' : '';
|
||||||
|
|
||||||
html += '<input class="chkUnratedItem" data-itemtype="' + item.value + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
|
html += '<paper-checkbox class="chkUnratedItem" data-itemtype="' + item.value + '" type="checkbox"' + checkedAttribute + '>' + item.name + '</paper-checkbox>';
|
||||||
html += '<label for="' + id + '">' + item.name + '</label>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '</fieldset>';
|
html += '</div>';
|
||||||
|
|
||||||
$('.blockUnratedItems', page).html(html).trigger('create');
|
$('.blockUnratedItems', page).html(html).trigger('create');
|
||||||
}
|
}
|
||||||
|
@ -201,11 +198,15 @@
|
||||||
|
|
||||||
user.Policy.MaxParentalRating = $('#selectMaxParentalRating', page).val() || null;
|
user.Policy.MaxParentalRating = $('#selectMaxParentalRating', page).val() || null;
|
||||||
|
|
||||||
user.Policy.BlockUnratedItems = $('.chkUnratedItem:checked', page).map(function () {
|
user.Policy.BlockUnratedItems = $('.chkUnratedItem', page).get().filter(function(i) {
|
||||||
|
|
||||||
return this.getAttribute('data-itemtype');
|
return i.checked;
|
||||||
|
|
||||||
}).get();
|
}).map(function (i) {
|
||||||
|
|
||||||
|
return i.getAttribute('data-itemtype');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
user.Policy.AccessSchedules = getSchedulesFromPage(page);
|
user.Policy.AccessSchedules = getSchedulesFromPage(page);
|
||||||
|
|
||||||
|
|
|
@ -438,11 +438,16 @@ paper-input label, paper-textarea label {
|
||||||
font-family: inherit !important;
|
font-family: inherit !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-body-b .paper-input-container-0 .input-content.paper-input-container label, .ui-body-b .paper-input-container-0 .input-content.paper-input-container .paper-input-label, .ui-body-b paper-textarea label, .ui-body-b .selectLabel, .ui-body-b .fieldDescription {
|
.paperCheckboxListLabel {
|
||||||
|
font-size: 16px;
|
||||||
|
margin-bottom: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-body-b .paper-input-container-0 .input-content.paper-input-container label, .ui-body-b .paper-input-container-0 .input-content.paper-input-container .paper-input-label, .ui-body-b paper-textarea label, .ui-body-b .selectLabel, .ui-body-b .paperCheckboxListLabel, .ui-body-b .fieldDescription {
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-body-a .paper-input-container-0 .input-content.paper-input-container label, .ui-body-a .paper-input-container-0 .input-content.paper-input-container .paper-input-label, .ui-body-a paper-textarea label, .ui-body-a .selectLabel, .ui-body-a .fieldDescription {
|
.ui-body-a .paper-input-container-0 .input-content.paper-input-container label, .ui-body-a .paper-input-container-0 .input-content.paper-input-container .paper-input-label, .ui-body-a paper-textarea label, .ui-body-a .selectLabel, .ui-body-a .paperCheckboxListLabel, .ui-body-a .fieldDescription {
|
||||||
color: #656565;
|
color: #656565;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<title></title>
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="userParentalControlPage" data-role="page" class="page type-interior userProfilesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Users" data-require="jqmpopup,jqmcollapsible,scripts/userparentalcontrol,jqmcheckbox">
|
<div id="userParentalControlPage" data-role="page" class="page type-interior userProfilesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Users" data-require="jqmpopup,jqmcollapsible,scripts/userparentalcontrol,paper-checkbox">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue