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

Add user cinema mode setting

This commit is contained in:
Luke Pulverenti 2014-10-01 20:28:16 -04:00
parent b5820d6e0b
commit b89eafa799
19 changed files with 222 additions and 194 deletions

View file

@ -8,6 +8,7 @@
<webMarkupMin xmlns="http://tempuri.org/WebMarkupMin.Configuration.xsd">
<core>
<css>

View file

@ -66,7 +66,7 @@
<div class="fieldDescription">${LabelCustomIntrosPathHelp}</div>
</li>
</ul>
<br />
<p>${CinemaModeConfigurationHelp2}</p>
<ul data-role="listview" class="ulForm">
<li>
<button type="submit" data-theme="b" data-icon="check">

View file

@ -266,7 +266,7 @@
background-image: url(images/items/folders/report.png);
}
.homevideosViewMenu, .adultvideosViewMenu {
.homevideosViewMenu {
background-image: url(images/items/folders/homevideos.png);
}

View file

@ -797,7 +797,6 @@ progress {
}
.dashboardContent {
max-width: 1550px;
margin-top: -10px;
}
@ -844,12 +843,21 @@ progress {
}
}
@media all and (min-width: 1680px) {
.dashboardHomeRightColumn {
width: 350px;
min-width: 350px;
}
}
@media all and (min-width: 1880px) {
.dashboardHomeRightColumn {
max-width: 440px;
margin-left: 2em;
min-width: 400px;
min-width: 440px;
}
}

View file

@ -493,10 +493,6 @@
background-color: rgba(110, 52, 32, 0.7);
}
.adultvideosPosterItem .posterItemImage {
background-color: rgba(184, 83, 116, 0.7);
}
.photosPosterItem .posterItemImage {
background-color: rgba(127, 0, 0, 0.7);
}

View file

@ -14,25 +14,24 @@
<br />
<form style="margin: 0 auto;" class="languagePreferencesForm">
<div class="detailSectionHeader" style="margin: 0 .5em;">
<div class="detailSectionHeader">
${HeaderLanguagePreferences}
</div>
<br />
<ul data-role="listview" class="ulForm">
<li>
<div>
<label for="selectAudioLanguage">${LabelAudioLanguagePreference}</label>
<select id="selectAudioLanguage" data-mini="true"></select>
</li>
<li>
</div><br />
<div>
<input type="checkbox" id="chkPlayDefaultAudioTrack" data-mini="true" />
<label for="chkPlayDefaultAudioTrack">${LabelPlayDefaultAudioTrack}</label>
</li>
<li>
</div><br />
<div>
<label for="selectSubtitleLanguage">${LabelSubtitleLanguagePreference}</label>
<select id="selectSubtitleLanguage" data-mini="true"></select>
</li>
<li>
</div><br />
<div>
<label for="selectSubtitlePlaybackMode">${LabelSubtitlePlaybackMode}</label>
<select id="selectSubtitlePlaybackMode" data-mini="true">
<option value="Default">${OptionDefaultSubtitles}</option>
@ -44,20 +43,31 @@
<div class="fieldDescription subtitlesAlwaysHelp subtitlesHelp" style="display: none;">${OptionAlwaysPlaySubtitlesHelp}</div>
<div class="fieldDescription subtitlesOnlyForcedHelp subtitlesHelp" style="display: none;">${OptionOnlyForcedSubtitlesHelp}</div>
<div class="fieldDescription subtitlesNoneHelp subtitlesHelp" style="display: none;">${OptionNoSubtitlesHelp}</div>
</li>
</ul>
</div>
<br /><br />
<div class="cinemaModeOptions" style="display:none;">
<br />
<ul data-role="listview" class="ulForm">
<li>
<div class="detailSectionHeader">
${HeaderCinemaMode}
</div>
<br />
<div>
<input type="checkbox" id="chkEnableCinemaMode" data-mini="true" />
<label for="chkEnableCinemaMode">${LabelEnableCinemaMode}</label>
<div class="fieldDescription">${CinemaModeConfigurationHelp}</div>
</div>
<br /><br />
</div>
<div>
<button type="submit" data-theme="a" data-icon="check" data-mini="true">
${ButtonOk}
</button>
<button type="button" onclick="history.back();" data-icon="delete" data-mini="true">
${ButtonCancel}
</button>
</li>
</ul>
</div>
</form>
<script type="text/javascript">
$('.languagePreferencesForm').off('submit', LanguagePreferencesPage.onSubmit).on('submit', LanguagePreferencesPage.onSubmit);

View file

@ -15,13 +15,12 @@
<br />
<form class="webClientPreferencesForm" style="margin: 0 auto;">
<div class="detailSectionHeader" style="margin: 0 .5em;">
<div class="detailSectionHeader">
${HeaderHomePage}
</div>
<br />
<ul data-role="listview" class="ulForm">
<li>
<div>
<label for="selectHomeSection1">${LabelHomePageSection1}</label>
<select id="selectHomeSection1" data-mini="true">
<option value="">${OptionAuto}</option>
@ -34,8 +33,8 @@
<option value="folders">${OptionLibraryFolders}</option>
<option value="resume">${OptionResumablemedia}</option>
</select>
</li>
<li>
</div><br />
<div>
<label for="selectHomeSection2">${LabelHomePageSection2}</label>
<select id="selectHomeSection2" data-mini="true">
<option value="">${OptionAuto}</option>
@ -49,8 +48,9 @@
<option value="resume">${OptionResumablemedia}</option>
<option value="none">${OptionNone}</option>
</select>
</li>
<li>
</div><br />
<div>
<label for="selectHomeSection3">${LabelHomePageSection3}</label>
<select id="selectHomeSection3" data-mini="true">
<option value="">${OptionAuto}</option>
@ -64,8 +64,8 @@
<option value="resume">${OptionResumablemedia}</option>
<option value="none">${OptionNone}</option>
</select>
</li>
<li>
</div><br />
<div>
<label for="selectHomeSection4">${LabelHomePageSection4}</label>
<select id="selectHomeSection4" data-mini="true">
<option value="">${OptionAuto}</option>
@ -79,15 +79,13 @@
<option value="resume">${OptionResumablemedia}</option>
<option value="none">${OptionNone}</option>
</select>
</li>
</ul>
</div><br />
<div class="detailSectionHeader" style="margin: 0 .5em;">
<div class="detailSectionHeader">
${HeaderSettingsForThisDevice}
</div>
<br />
<ul data-role="listview" class="ulForm">
<li>
<div>
<label for="selectMaxBitrate">${LabelMaxStreamingBitrate}</label>
<select id="selectMaxBitrate" data-mini="true">
<option value="30000000">30Mbps</option>
@ -99,7 +97,6 @@
<option value="6000000">6Mbps</option>
<option value="5000000">5Mbps</option>
<option value="4000000">4Mbps</option>
<option value="3500000">3.5Mbps</option>
<option value="3000000">3Mbps</option>
<option value="2500000">2.5Mbps</option>
<option value="2000000">2Mbps</option>
@ -110,8 +107,8 @@
<option value="400000">400kbps</option>
<option value="320000">320kbps</option>
</select>
</li>
<li>
</div><br />
<div>
<label for="selectThemeSong">${LabelEnableThemeSongs}</label>
<select id="selectThemeSong" data-mini="true">
<option value="">${OptionAuto}</option>
@ -119,8 +116,8 @@
<option value="0">${OptionNo}</option>
</select>
<div class="fieldDescription">${LabelEnableThemeSongsHelp}</div>
</li>
<li class="fldEnableBackdrops" style="display:none;">
</div><br />
<div class="fldEnableBackdrops" style="display:none;">
<label for="selectBackdrop">${LabelEnableBackdrops}</label>
<select id="selectBackdrop" data-mini="true">
<option value="">${OptionAuto}</option>
@ -128,10 +125,9 @@
<option value="0">${OptionNo}</option>
</select>
<div class="fieldDescription">${LabelEnableBackdropsHelp}</div>
</li>
</ul>
</div><br />
<div style="margin: 0 1em;">
<div>
<fieldset data-role="controlgroup">
<legend>${LabelExternalPlayers}</legend>
<!--<input type="checkbox" id="chkGoodplayer" class="chkExternalPlayer" data-name="GoodPlayer" data-scheme="goodplayer://{0}" />
@ -142,18 +138,16 @@
<div style="padding: 0 2px;">${LabelExternalPlayersHelp}</div>
</div>
<br />
<br /><br />
<ul data-role="listview" class="ulForm">
<li>
<div>
<button type="submit" data-theme="a" data-icon="check" data-mini="true">
${ButtonOk}
</button>
<button type="button" onclick="history.back();" data-icon="delete" data-mini="true">
${ButtonCancel}
</button>
</li>
</ul>
</div>
</form>
<script type="text/javascript">
$('.webClientPreferencesForm').off('submit', WebClientPreferencesPage.onSubmit).on('submit', WebClientPreferencesPage.onSubmit);

View file

@ -11,7 +11,6 @@
<span style="margin-right: 10px; vertical-align: middle;">${LabelReport}</span>
<div style="display: inline-block;">
<select data-mini="true" data-inline="true" id="selectView" name="selectView">
<option value="AdultVideo">${OptionReportAdultVideos}</option>
<option value="MusicAlbum">${OptionReportAlbums}</option>
<option value="MusicArtist">${OptionReportArtists}</option>
<option value="Book">${OptionReportBooks}</option>

View file

@ -1072,6 +1072,17 @@ $(document).on('pagebeforeshow', "#dashboardPage", DashboardPage.onPageShow)
html += '<div style="margin: 0;color:' + color + ';">' + date.toLocaleDateString() + ' ' + date.toLocaleTimeString().toLowerCase() + '</div>';
html += '<div class="notificationName" style="margin:.5em 0 0;white-space:nowrap;">';
if (entry.UserId && entry.UserPrimaryImageTag) {
var userImgUrl = ApiClient.getUserImageUrl(entry.UserId, {
type: 'Primary',
tag: entry.UserPrimaryImageTag,
height: 20
});
html += '<img src="' + userImgUrl + '" style="height:20px;vertical-align:middle;margin-right:5px;" />';
}
html += entry.Name;
html += '</div>';

View file

@ -294,7 +294,7 @@
$('#fldCustomRating', page).show();
}
if (item.Type == "Movie" || item.Type == "AdultVideo" || item.Type == "Trailer" || item.Type == "MusicArtist") {
if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "MusicArtist") {
$('#countriesCollapsible', page).show();
} else {
$('#countriesCollapsible', page).hide();
@ -318,7 +318,6 @@
if (item.Type == "Movie" ||
item.Type == "Trailer" ||
item.Type == "AdultVideo" ||
item.Type == "Series" ||
item.Type == "Game" ||
item.Type == "BoxSet" ||

View file

@ -47,7 +47,6 @@
case "trailers":
imgUrl = "css/images/items/folders/movies.png";
break;
case "adultvideos":
case "homevideos":
imgUrl = "css/images/items/folders/homevideos.png";
break;

View file

@ -227,7 +227,6 @@
{ name: Globalize.translate('FolderTypeHomeVideos'), value: "homevideos" },
{ name: Globalize.translate('FolderTypeMusicVideos'), value: "musicvideos" },
{ name: Globalize.translate('FolderTypePhotos'), value: "photos" },
{ name: Globalize.translate('FolderTypeAdultVideos'), value: "adultvideos" },
{ name: Globalize.translate('FolderTypeMixed'), value: "mixed" }
];

View file

@ -880,7 +880,6 @@
}
else if (maxAllowedWidth >= 460) {
options.push({ name: '480p - 4Mbps', maxWidth: 720, bitrate: 4000000 });
options.push({ name: '480p - 3.5Mbps', maxWidth: 720, bitrate: 3500000 });
options.push({ name: '480p - 3Mbps', maxWidth: 720, bitrate: 3000000 });
options.push({ name: '480p - 2.5Mbps', maxWidth: 720, bitrate: 2500000 });
options.push({ name: '480p - 2Mbps', maxWidth: 720, bitrate: 2000000 });

View file

@ -414,7 +414,6 @@
{ name: 'OptionSongs', type: 'Audio' },
{ name: 'OptionHomeVideos', type: 'Video' },
{ name: 'OptionBooks', type: 'Book' },
{ name: 'OptionAdultVideos', type: 'AdultVideo' },
{ name: 'OptionPeople', type: 'Person' }
//{ name: 'Genres', type: 'Genre' },
//{ name: 'Studios', type: 'Studio' }

View file

@ -29,10 +29,39 @@
$('#selectSubtitlePlaybackMode', page).val(user.Configuration.SubtitleMode || "").selectmenu("refresh").trigger('change');
$('#chkPlayDefaultAudioTrack', page).checked(user.Configuration.PlayDefaultAudioTrack || false).checkboxradio("refresh");
$('#chkEnableCinemaMode', page).checked(user.Configuration.EnableCinemaMode || false).checkboxradio("refresh");
Dashboard.hideLoadingMsg();
}
function loadPage(page) {
Dashboard.showLoadingMsg();
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
var promise1 = ApiClient.getUser(userId);
var promise2 = Dashboard.getCurrentUser();
var allCulturesPromise = ApiClient.getCultures();
$.when(promise1, promise2).done(function (response1, response2) {
loadForm(page, response1[0] || response1, response2[0], allCulturesPromise);
});
ApiClient.getNamedConfiguration("cinemamode").done(function (cinemaConfig) {
if (cinemaConfig.EnableIntrosForMovies || cinemaConfig.EnableIntrosForEpisodes) {
$('.cinemaModeOptions', page).show();
} else {
$('.cinemaModeOptions', page).hide();
}
});
}
function saveUser(page, user) {
user.Configuration.AudioLanguagePreference = $('#selectAudioLanguage', page).val();
@ -40,6 +69,7 @@
user.Configuration.SubtitleMode = $('#selectSubtitlePlaybackMode', page).val();
user.Configuration.PlayDefaultAudioTrack = $('#chkPlayDefaultAudioTrack', page).checked();
user.Configuration.EnableCinemaMode = $('#chkEnableCinemaMode', page).checked();
ApiClient.updateUser(user).done(function () {
Dashboard.alert(Globalize.translate('SettingsSaved'));
@ -79,22 +109,7 @@
var page = this;
Dashboard.showLoadingMsg();
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
var promise1 = ApiClient.getUser(userId);
var promise2 = Dashboard.getCurrentUser();
var allCulturesPromise = ApiClient.getCultures();
$.when(promise1, promise2).done(function (response1, response2) {
loadForm(page, response1[0] || response1, response2[0], allCulturesPromise);
});
loadPage(page);
});
window.LanguagePreferencesPage = {

View file

@ -513,7 +513,6 @@ var Dashboard = {
html += '<form>';
html += '<p><a data-mini="true" data-role="button" href="mypreferencesdisplay.html?userId=' + user.Id + '" data-icon="gear">' + Globalize.translate('ButtonMyPreferences') + '</button></a>';
html += '<p><a data-mini="true" data-role="button" href="useredit.html?userId=' + user.Id + '" data-icon="user">' + Globalize.translate('ButtonMyProfile') + '</button></a>';
html += '<p><button data-mini="true" type="button" onclick="Dashboard.logout();" data-icon="lock">' + Globalize.translate('ButtonSignOut') + '</button></p>';
html += '</form>';

View file

@ -21,7 +21,7 @@
}
if (user.Id && loggedInUser.Configuration.IsAdministrator) {
$('#fldConnectInfo', page).show();
$('#fldConnectInfo', page).hide();
} else {
$('#fldConnectInfo', page).hide();
}

View file

@ -16,7 +16,7 @@
<div class="readOnlyContent">
<div>
<a data-role="button" data-icon="plus" href="useredit.html" data-inline="true">
${ButtonAddLocalUser}
${ButtonAddUser}
</a>
<!--<a data-role="button" data-icon="plus" href="useredit.html" data-inline="true">
${ButtonInviteMediaBrowserUser}

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.249" targetFramework="net45" />
<package id="WebMarkupMin.Core" version="0.9.3" targetFramework="net45" />
<package id="WebMarkupMin.Core" version="0.9.6" targetFramework="net45" />
</packages>