1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update config

This commit is contained in:
Luke Pulverenti 2016-02-19 00:03:00 -05:00
parent 747d71e76d
commit cd06587514
9 changed files with 94 additions and 130 deletions

View file

@ -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) {
var folderHtml = '';
folderHtml += '<div data-role="controlgroup">';
folderHtml += '<div class="paperCheckboxList">';
folderHtml += result.Items.map(function (i) {
var currentHtml = '';
var id = 'chkShareFolder' + i.Id;
currentHtml += '<label for="' + id + '">' + i.Name + '</label>';
var isChecked = true;
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;
@ -25,7 +21,7 @@
folderHtml += '</div>';
$('.librarySharingList', context).html(folderHtml).trigger('create');
context.querySelector('.librarySharingList').innerHTML = folderHtml;
}
function inviteUser(dlg) {
@ -34,7 +30,11 @@
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');
});

View file

@ -4,7 +4,7 @@
<title>${TitleMetadata}</title>
</head>
<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">
@ -27,8 +27,8 @@
<br />
</li>
<li>
<label for="chkSaveMetadataHidden">${OptionSaveMetadataAsHidden}</label>
<input type="checkbox" id="chkSaveMetadataHidden" data-mini="true" />
<paper-checkbox id="chkSaveMetadataHidden">${OptionSaveMetadataAsHidden}</paper-checkbox>
<br /><br />
</li>
<li>
<label for="selectDateAdded" class="selectLabel">${LabelDateAddedBehavior}</label>
@ -45,14 +45,12 @@
<div>
<ul data-role="listview" class="ulForm">
<li>
<input type="checkbox" id="chkEnableTmdbUpdates" data-mini="true" />
<label for="chkEnableTmdbUpdates">${LabelAutomaticUpdatesTmdb}</label>
<div class="fieldDescription">${LabelAutomaticUpdatesTmdbHelp}</div>
<paper-checkbox id="chkEnableTmdbUpdates">${LabelAutomaticUpdatesTmdb}</paper-checkbox>
<div class="fieldDescription paperCheckboxFieldDescription">${LabelAutomaticUpdatesTmdbHelp}</div>
</li>
<li>
<input type="checkbox" id="chkEnableTvdbUpdates" data-mini="true" />
<label for="chkEnableTvdbUpdates">${LabelAutomaticUpdatesTvdb}</label>
<div class="fieldDescription">${LabelAutomaticUpdatesTvdbHelp}</div>
<paper-checkbox id="chkEnableTvdbUpdates">${LabelAutomaticUpdatesTvdb}</paper-checkbox>
<div class="fieldDescription paperCheckboxFieldDescription">${LabelAutomaticUpdatesTvdbHelp}</div>
</li>
</ul>
</div>
@ -64,25 +62,21 @@
<br />
<ul data-role="listview" class="ulForm" style="margin-bottom:0!important;">
<li>
<label>${HeaderExtractChapterImagesFor}</label>
<div data-role="controlgroup">
<input type="checkbox" id="chkChaptersMovies" />
<label for="chkChaptersMovies">${OptionMovies}</label>
<div class="paperCheckboxListLabel">${HeaderExtractChapterImagesFor}</div>
<div class="paperCheckboxList">
<paper-checkbox id="chkChaptersMovies">${OptionMovies}</paper-checkbox>
<input type="checkbox" id="chkChaptersEpisodes" />
<label for="chkChaptersEpisodes">${OptionEpisodes}</label>
<paper-checkbox id="chkChaptersEpisodes">${OptionEpisodes}</paper-checkbox>
<input type="checkbox" id="chkChaptersOtherVideos" />
<label for="chkChaptersOtherVideos">${OptionOtherVideos}</label>
<paper-checkbox id="chkChaptersOtherVideos">${OptionOtherVideos}</paper-checkbox>
</div>
<div class="fieldDescription">${ExtractChapterImagesHelp}</div>
<div class="fieldDescription paperCheckboxFieldDescription">${ExtractChapterImagesHelp}</div>
</li>
</ul>
<br />
<div>
<label for="chkExtractChaptersDuringLibraryScan">${LabelExtractChaptersDuringLibraryScan}</label>
<input type="checkbox" id="chkExtractChaptersDuringLibraryScan" />
<div class="fieldDescription">${LabelExtractChaptersDuringLibraryScanHelp}</div>
<paper-checkbox id="chkExtractChaptersDuringLibraryScan">${LabelExtractChaptersDuringLibraryScan}</paper-checkbox>
<div class="fieldDescription paperCheckboxFieldDescription">${LabelExtractChaptersDuringLibraryScanHelp}</div>
</div>
<br />
</div>
@ -94,8 +88,7 @@
<br />
<ul data-role="listview" class="ulForm">
<li>
<label for="txtFanartApiKey">${LabelFanartApiKey}</label>
<input type="text" id="txtFanartApiKey" />
<paper-input type="text" id="txtFanartApiKey" label="${LabelFanartApiKey}"></paper-input>
<div class="fieldDescription">${LabelFanartApiKeyHelp}</div>
<div class="fieldDescription"><a href="https://fanart.tv/2015/01/personal-api-keys" target="_blank">${ButtonLearnMore}</a></div>
</li>
@ -114,30 +107,23 @@
<br />
<ul data-role="listview" class="ulForm">
<li>
<label>${HeaderDownloadPeopleMetadataFor}</label>
<div data-role="controlgroup">
<input type="checkbox" id="chkPeopleActors" />
<label for="chkPeopleActors">${OptionActors}</label>
<div class="paperCheckboxListLabel">${HeaderDownloadPeopleMetadataFor}</div>
<div class="paperCheckboxList">
<paper-checkbox id="chkPeopleActors">${OptionActors}</paper-checkbox>
<input type="checkbox" id="chkPeopleComposers" />
<label for="chkPeopleComposers">${OptionComposers}</label>
<paper-checkbox id="chkPeopleComposers">${OptionComposers}</paper-checkbox>
<input type="checkbox" id="chkPeopleDirectors" />
<label for="chkPeopleDirectors">${OptionDirectors}</label>
<paper-checkbox id="chkPeopleDirectors">${OptionDirectors}</paper-checkbox>
<input type="checkbox" id="chkPeopleGuestStars" />
<label for="chkPeopleGuestStars">${OptionGuestStars}</label>
<paper-checkbox id="chkPeopleGuestStars">${OptionGuestStars}</paper-checkbox>
<input type="checkbox" id="chkPeopleProducers" />
<label for="chkPeopleProducers">${OptionProducers}</label>
<paper-checkbox id="chkPeopleProducers">${OptionProducers}</paper-checkbox>
<input type="checkbox" id="chkPeopleWriters" />
<label for="chkPeopleWriters">${OptionWriters}</label>
<paper-checkbox id="chkPeopleWriters">${OptionWriters}</paper-checkbox>
<input type="checkbox" id="chkPeopleOthers" />
<label for="chkPeopleOthers">${OptionOthers}</label>
<paper-checkbox id="chkPeopleOthers">${OptionOthers}</paper-checkbox>
</div>
<div class="fieldDescription">${HeaderDownloadPeopleMetadataForHelp}</div>
<div class="fieldDescription paperCheckboxFieldDescription">${HeaderDownloadPeopleMetadataForHelp}</div>
</li>
</ul>
</div>

View file

@ -4,7 +4,7 @@
<title>${TitleMetadata}</title>
</head>
<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">
@ -63,54 +63,20 @@
</div>
</div>
<fieldset class="imageSelections" data-role="controlgroup" style="border-bottom: 1px solid #ddd;">
<legend>${HeaderFetchImages}</legend>
<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>
<div class="paperCheckboxListLabel">${HeaderFetchImages}</div>
<div class="imageSelections paperCheckboxList">
<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;">
<input type="checkbox" data-mini="true" id="chkDownloadArt" name="chkDownloadArt" />
<label for="chkDownloadArt">${OptionDownloadArtImage}</label>
<paper-checkbox class="imageType hide" data-imagetype="Disc">${OptionDownloadDiscImage}</paper-checkbox>
<paper-checkbox class="imageType hide" data-imagetype="Logo">${OptionDownloadLogoImage}</paper-checkbox>
<paper-checkbox class="imageType hide" data-imagetype="Menu">${OptionDownloadMenuImage}</paper-checkbox>
<paper-checkbox class="imageType hide" data-imagetype="Thumb">${OptionDownloadThumbImage}</paper-checkbox>
</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>

View file

@ -115,6 +115,12 @@
html = LibraryBrowser.getPosterViewHtml(posterOptions);
}
else if (view == "Thumb") {
posterOptions.preferThumb = true;
posterOptions.shape = "backdrop";
html = LibraryBrowser.getPosterViewHtml(posterOptions);
}
var elem = page.querySelector('#items');
elem.innerHTML = html + pagingHtml;

View file

@ -2,17 +2,17 @@
function loadAdvancedConfig(page, config) {
$('#chkSaveMetadataHidden', page).checked(config.SaveMetadataHidden).checkboxradio("refresh");
$('#chkSaveMetadataHidden', page).checked(config.SaveMetadataHidden);
$('#txtMetadataPath', page).val(config.MetadataPath || '');
$('#chkPeopleActors', page).checked(config.PeopleMetadataOptions.DownloadActorMetadata).checkboxradio("refresh");
$('#chkPeopleComposers', page).checked(config.PeopleMetadataOptions.DownloadComposerMetadata).checkboxradio("refresh");
$('#chkPeopleDirectors', page).checked(config.PeopleMetadataOptions.DownloadDirectorMetadata).checkboxradio("refresh");
$('#chkPeopleProducers', page).checked(config.PeopleMetadataOptions.DownloadProducerMetadata).checkboxradio("refresh");
$('#chkPeopleWriters', page).checked(config.PeopleMetadataOptions.DownloadWriterMetadata).checkboxradio("refresh");
$('#chkPeopleOthers', page).checked(config.PeopleMetadataOptions.DownloadOtherPeopleMetadata).checkboxradio("refresh");
$('#chkPeopleGuestStars', page).checked(config.PeopleMetadataOptions.DownloadGuestStarMetadata).checkboxradio("refresh");
$('#chkPeopleActors', page).checked(config.PeopleMetadataOptions.DownloadActorMetadata);
$('#chkPeopleComposers', page).checked(config.PeopleMetadataOptions.DownloadComposerMetadata);
$('#chkPeopleDirectors', page).checked(config.PeopleMetadataOptions.DownloadDirectorMetadata);
$('#chkPeopleProducers', page).checked(config.PeopleMetadataOptions.DownloadProducerMetadata);
$('#chkPeopleWriters', page).checked(config.PeopleMetadataOptions.DownloadWriterMetadata);
$('#chkPeopleOthers', page).checked(config.PeopleMetadataOptions.DownloadOtherPeopleMetadata);
$('#chkPeopleGuestStars', page).checked(config.PeopleMetadataOptions.DownloadGuestStarMetadata);
Dashboard.hideLoadingMsg();
}
@ -24,27 +24,27 @@
function loadTmdbConfig(page, config) {
$('#chkEnableTmdbUpdates', page).checked(config.EnableAutomaticUpdates).checkboxradio("refresh");
$('#chkEnableTmdbUpdates', page).checked(config.EnableAutomaticUpdates);
}
function loadTvdbConfig(page, config) {
$('#chkEnableTvdbUpdates', page).checked(config.EnableAutomaticUpdates).checkboxradio("refresh");
$('#chkEnableTvdbUpdates', page).checked(config.EnableAutomaticUpdates);
}
function loadFanartConfig(page, config) {
$('#chkEnableFanartUpdates', page).checked(config.EnableAutomaticUpdates).checkboxradio("refresh");
$('#chkEnableFanartUpdates', page).checked(config.EnableAutomaticUpdates);
$('#txtFanartApiKey', page).val(config.UserApiKey || '');
}
function loadChapters(page, config, providers) {
$('#chkChaptersMovies', page).checked(config.EnableMovieChapterImageExtraction).checkboxradio("refresh");
$('#chkChaptersEpisodes', page).checked(config.EnableEpisodeChapterImageExtraction).checkboxradio("refresh");
$('#chkChaptersOtherVideos', page).checked(config.EnableOtherVideoChapterImageExtraction).checkboxradio("refresh");
$('#chkChaptersMovies', page).checked(config.EnableMovieChapterImageExtraction);
$('#chkChaptersEpisodes', page).checked(config.EnableEpisodeChapterImageExtraction);
$('#chkChaptersOtherVideos', page).checked(config.EnableOtherVideoChapterImageExtraction);
$('#chkExtractChaptersDuringLibraryScan', page).checked(config.ExtractDuringLibraryScan).checkboxradio("refresh");
$('#chkExtractChaptersDuringLibraryScan', page).checked(config.ExtractDuringLibraryScan);
Dashboard.hideLoadingMsg();
}

View file

@ -91,17 +91,17 @@
var imageType = this.getAttribute('data-imagetype');
if (metadataInfo.SupportedImageTypes.indexOf(imageType) == -1) {
$(this).hide();
this.classList.add('hide');
} else {
$(this).show();
this.classList.remove('hide');
}
if (getImageConfig(config, imageType).Limit) {
$('input', this).checked(true).checkboxradio('refresh');
this.checked = true;
} 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 {
Type: $(c).parents('.imageType').attr('data-imagetype'),
Type: c.getAttribute('data-imagetype'),
Limit: c.checked ? 1 : 0,
MinWidth: 0
};

View file

@ -55,23 +55,20 @@
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++) {
var item = items[i];
var id = 'unratedItem' + i;
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 += '<label for="' + id + '">' + item.name + '</label>';
html += '<paper-checkbox class="chkUnratedItem" data-itemtype="' + item.value + '" type="checkbox"' + checkedAttribute + '>' + item.name + '</paper-checkbox>';
}
html += '</fieldset>';
html += '</div>';
$('.blockUnratedItems', page).html(html).trigger('create');
}
@ -201,11 +198,15 @@
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);

View file

@ -438,11 +438,16 @@ paper-input label, paper-textarea label {
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;
}
.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;
}

View file

@ -4,7 +4,7 @@
<title></title>
</head>
<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 class="content-primary">