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

fixes #687 - Enable/disable live tv per user

This commit is contained in:
Luke Pulverenti 2014-01-23 16:09:00 -05:00
parent e30d68fdd4
commit 70dcad3253
4 changed files with 23 additions and 9 deletions

View file

@ -30,7 +30,7 @@
})[0];
var message = 'The following file will be deleted:<p style="word-wrap:break-word;">' + item.OriginalPath + '</p><p>Are you sure you wish to proceed?</p>';
var message = 'The following file will be <b>deleted</b>:<p style="word-wrap:break-word;">' + item.OriginalPath + '</p><p>Are you sure you wish to proceed?</p>';
Dashboard.confirm(message, "Delete File", function (confirmResult) {
@ -115,7 +115,15 @@
return;
}
var message = 'The following file will be moved from:<p style="word-wrap:break-word;">' + item.OriginalPath + '</p><p>to:</p><p style="word-wrap:break-word;">' + item.TargetPath + '</p><p>Are you sure you wish to proceed?</p>';
var message = 'The following file will be moved from:<p style="word-wrap:break-word;">' + item.OriginalPath + '</p><p>to:</p><p style="word-wrap:break-word;">' + item.TargetPath + '</p>';
if (item.DuplicatePaths.length) {
message += '<p><b>In addition the following dupliates will be deleted:</b></p>';
message += '<p style="word-wrap:break-word;">' + item.DuplicatePaths.join('<br/>') + '</p>';
}
message += '<p>Are you sure you wish to proceed?</p>';
Dashboard.confirm(message, "Organize File", function (confirmResult) {

View file

@ -74,7 +74,7 @@
html += '<a class="viewMenuLink viewMenuTextLink desktopViewMenuLink' + (view == 'tv' ? selectedCssClass : '') + '" href="tvrecommended.html">' + (view == 'tv' ? selectedHtml : '') + '<span class="viewName">TV</span></a>';
}
if (liveTvInfo.ActiveServiceName) {
if (liveTvInfo.EnabledUsers.indexOf(user.Id) != -1) {
html += '<a class="viewMenuLink viewMenuTextLink desktopViewMenuLink' + (view == 'livetv' ? selectedCssClass : '') + '" href="livetvsuggested.html">' + (view == 'livetv' ? selectedHtml : '') + '<span class="viewName">Live TV</span></a>';
}
@ -146,7 +146,7 @@
]);
}
if (liveTvInfo.ActiveServiceName) {
if (liveTvInfo.EnabledUsers.indexOf(Dashboard.getCurrentUserId()) != -1) {
html += getCollapsibleHtml('Live TV', [
{ text: 'Suggested', href: 'livetvsuggested.html' },

View file

@ -25,6 +25,7 @@
$('#chkEnableMediaPlayback', page).checked(user.Configuration.EnableMediaPlayback || false).checkboxradio("refresh");
$('#chkManageLiveTv', page).checked(user.Configuration.EnableLiveTvManagement || false).checkboxradio("refresh");
$('#chkEnableLiveTvAccess', page).checked(user.Configuration.EnableLiveTvAccess || false).checkboxradio("refresh");
Dashboard.hideLoadingMsg();
}
@ -57,6 +58,7 @@
user.Configuration.EnableRemoteControlOfOtherUsers = $('#chkEnableRemoteControlOtherUsers', page).checked();
user.Configuration.EnableLiveTvManagement = $('#chkManageLiveTv', page).checked();
user.Configuration.EnableMediaPlayback = $('#chkEnableMediaPlayback', page).checked();
user.Configuration.EnableLiveTvAccess = $('#chkEnableLiveTvAccess', page).checked();
var userId = getParameterByName("userId");

View file

@ -33,12 +33,16 @@
<label for="chkEnableMediaPlayback">Allow media playback</label>
</div>
<div>
<input type="checkbox" id="chkEnableRemoteControlOtherUsers" name="chkEnableRemoteControlOtherUsers" data-mini="true" />
<label for="chkEnableRemoteControlOtherUsers">Allow this user to remote control other users</label>
<input type="checkbox" id="chkEnableLiveTvAccess" name="chkEnableLiveTvAccess" data-mini="true" />
<label for="chkEnableLiveTvAccess">Allow browsing of live tv</label>
</div>
<div>
<input type="checkbox" id="chkManageLiveTv" name="chkManageLiveTv" data-mini="true" />
<label for="chkManageLiveTv">Allow this user to schedule tv recordings</label>
<label for="chkManageLiveTv">Allow scheduling of tv recordings</label>
</div>
<div>
<input type="checkbox" id="chkEnableRemoteControlOtherUsers" name="chkEnableRemoteControlOtherUsers" data-mini="true" />
<label for="chkEnableRemoteControlOtherUsers">Allow this user to remote control other users</label>
</div>
<br />
</div>