mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
start using user policy
This commit is contained in:
parent
d84df77553
commit
db0f911a4d
@ -3,7 +3,7 @@
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
width: 23px;
|
||||
width: 22px;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
}
|
||||
@ -35,10 +35,4 @@
|
||||
.headerSelectedPlayer {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 400px) {
|
||||
.btnCastImage {
|
||||
width: 26px;
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB |
@ -62,7 +62,7 @@
|
||||
|
||||
.listHeader {
|
||||
margin-top: 1em;
|
||||
margin-bottom: .15em;
|
||||
margin-bottom: .25em;
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,12 @@
|
||||
line-height: 50px;
|
||||
}
|
||||
|
||||
.viewMenuBar .fa {
|
||||
color: #e8e8e8;
|
||||
font-size: 24px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.headerButton {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@ -74,57 +80,13 @@
|
||||
}
|
||||
|
||||
.barMenuInner {
|
||||
padding: 7px 10px;
|
||||
border: 1px solid #000;
|
||||
border-radius: 4px;
|
||||
box-shadow: rgba(255, 255, 255, 0.0980392) 0px 1px 0px 0px inset, rgba(255, 255, 255, 0.0745098) 0px 1px 0px 0px;
|
||||
background-color: rgb(14, 14, 14);
|
||||
background-image: linear-gradient(rgb(21, 21, 21), rgb(4, 4, 4));
|
||||
background-repeat: repeat-x;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.247059);
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 1px;
|
||||
border-image-outset: 0px;
|
||||
border-image-repeat: stretch;
|
||||
border-image-slice: 100%;
|
||||
border-image-source: none;
|
||||
border-image-width: 1;
|
||||
border-left-color: rgba(0, 0, 0, 0.0980392);
|
||||
border-left-style: solid;
|
||||
border-left-width: 1px;
|
||||
border-right-color: rgba(0, 0, 0, 0.0980392);
|
||||
border-right-style: solid;
|
||||
border-right-width: 1px;
|
||||
border-top-color: rgba(0, 0, 0, 0.0980392);
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
border-top-style: solid;
|
||||
border-top-width: 1px;
|
||||
padding: 6px 10px;
|
||||
}
|
||||
|
||||
.barsMenuButton:hover {
|
||||
opacity: .5 !important;
|
||||
}
|
||||
|
||||
.icon-bar {
|
||||
display: block;
|
||||
width: 18px;
|
||||
height: 2px;
|
||||
background-color: #f5f5f5;
|
||||
-webkit-border-radius: 1px;
|
||||
-moz-border-radius: 1px;
|
||||
border-radius: 1px;
|
||||
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
|
||||
-moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.icon-bar + .icon-bar {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.libraryMenuButtonText {
|
||||
color: #fff !important;
|
||||
text-decoration: none;
|
||||
@ -180,10 +142,10 @@
|
||||
background-color: #111;
|
||||
}
|
||||
|
||||
.libraryViewNav::-webkit-scrollbar {
|
||||
height: 0 !important;
|
||||
display: none;
|
||||
}
|
||||
.libraryViewNav::-webkit-scrollbar {
|
||||
height: 0 !important;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.viewMenuLink {
|
||||
text-decoration: none;
|
||||
@ -218,7 +180,7 @@
|
||||
|
||||
.viewMenuTextLink {
|
||||
display: block;
|
||||
padding: .65em .5em .55em 38px !important;
|
||||
padding: .7em .5em .6em 38px !important;
|
||||
font-size: 14px;
|
||||
font-weight: 300 !important;
|
||||
font-family: Roboto;
|
||||
@ -278,10 +240,6 @@
|
||||
background-image: url(images/items/folders/edit.png);
|
||||
}
|
||||
|
||||
.dashboardViewMenu {
|
||||
background-image: url(images/items/folders/settings.png);
|
||||
}
|
||||
|
||||
.reportsViewMenu {
|
||||
background-image: url(images/items/folders/report.png);
|
||||
}
|
||||
|
@ -5,23 +5,15 @@
|
||||
.btnNotificationsInner {
|
||||
text-decoration: none !important;
|
||||
vertical-align: middle;
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
padding: 4px 12px 4px;
|
||||
border-radius: 1000px;
|
||||
padding: 4px 10px 4px;
|
||||
text-align: center;
|
||||
text-decoration: none !important;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
background-color: #444;
|
||||
background-image: -webkit-gradient(linear,left top,left bottom,from(#444),to(#313131));
|
||||
background-image: -webkit-linear-gradient(top,#444,#313131);
|
||||
background-image: -moz-linear-gradient(top,#444,#313131);
|
||||
background-image: -ms-linear-gradient(top,#444,#313131);
|
||||
background-image: -o-linear-gradient(top,#444,#313131);
|
||||
background-image: linear-gradient(top,#444,#313131);
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
@ -33,14 +25,12 @@
|
||||
background-image: -ms-linear-gradient(top,#4d90fe,#4787ed);
|
||||
background-image: -o-linear-gradient(top,#4d90fe,#4787ed);
|
||||
background-image: linear-gradient(top,#4d90fe,#4787ed);
|
||||
border-color: #3079ed;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.levelWarning {
|
||||
background-color: #FF7537;
|
||||
background-image: none;
|
||||
border-color: #FF7537;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
@ -52,7 +42,6 @@
|
||||
background-image: -ms-linear-gradient(top,#dd4b39,#d14836);
|
||||
background-image: -o-linear-gradient(top,#dd4b39,#d14836);
|
||||
background-image: linear-gradient(top,#dd4b39,#d14836);
|
||||
border-color: #c6322a;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
|
@ -1081,7 +1081,7 @@ progress {
|
||||
display: inline-block;
|
||||
background: rgba(51, 136, 204, .7);
|
||||
border-radius: 1000px;
|
||||
padding: 5px 12px;
|
||||
padding: 4px 12px;
|
||||
color: #fff !important;
|
||||
font-weight: normal !important;
|
||||
text-decoration: none;
|
||||
|
@ -39,19 +39,18 @@
|
||||
</div>
|
||||
|
||||
<div data-role="content">
|
||||
<form id="textEntryForm">
|
||||
<form id="textEntryForm" style="min-width:200px;">
|
||||
<div id="fldCollectionType" style="margin:.5em 0 1.5em;">
|
||||
<label for="selectCollectionType">${LabelType}</label>
|
||||
<select id="selectCollectionType" name="selectCollectionType" data-mini="true"></select>
|
||||
<div class="collectionTypeFieldDescription fieldDescription">
|
||||
${MediaFolderHelpPluginRequired}
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<label id="lblValue" for="txtValue"></label>
|
||||
<input type="text" id="txtValue" required="required" />
|
||||
</p>
|
||||
<br/>
|
||||
<br />
|
||||
<p>
|
||||
<button type="submit" data-theme="b" data-icon="check">
|
||||
${ButtonOk}
|
||||
|
@ -75,15 +75,11 @@
|
||||
|
||||
html += '<a data-itemid="' + item.Id + '" class="' + cssClass + '" href="' + href + '">';
|
||||
|
||||
var style = "";
|
||||
var style = 'background-image:url(\'' + imgUrl + '\');';
|
||||
|
||||
if (imgUrl) {
|
||||
style += 'background-image:url(\'' + imgUrl + '\');';
|
||||
}
|
||||
var imageCssClass = '';
|
||||
|
||||
var imageCssClass = 'posterItemImage';
|
||||
|
||||
html += '<div class="' + imageCssClass + '" style="' + style + '">';
|
||||
html += '<div class="posterItemImage ' + imageCssClass + '" style="' + style + '">';
|
||||
html += '</div>';
|
||||
|
||||
html += "<div class='posterItemDefaultText posterItemText'>";
|
||||
|
@ -88,7 +88,7 @@
|
||||
$('.btnSync', page).addClass('hide');
|
||||
}
|
||||
|
||||
var editImagesHref = user.Configuration.IsAdministrator ? 'edititemimages.html' + editQuery : null;
|
||||
var editImagesHref = user.Policy.IsAdministrator ? 'edititemimages.html' + editQuery : null;
|
||||
|
||||
$('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item, editImagesHref, true));
|
||||
|
||||
|
@ -90,7 +90,7 @@
|
||||
return g.Type == "Grouping";
|
||||
});
|
||||
|
||||
if (user.Configuration.IsAdministrator && groupedVersions.length) {
|
||||
if (user.Policy.IsAdministrator && groupedVersions.length) {
|
||||
$('.splitVersionContainer', page).show();
|
||||
} else {
|
||||
$('.splitVersionContainer', page).hide();
|
||||
@ -144,7 +144,7 @@
|
||||
|
||||
function renderImage(page, item, user) {
|
||||
|
||||
var imageHref = user.Configuration.IsAdministrator && item.MediaType != 'Photo' ? "edititemimages.html?id=" + item.Id : "";
|
||||
var imageHref = user.Policy.IsAdministrator && item.MediaType != 'Photo' ? "edititemimages.html?id=" + item.Id : "";
|
||||
|
||||
$('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item, imageHref));
|
||||
}
|
||||
@ -887,7 +887,7 @@
|
||||
html += '<div class="detailSectionHeader" style="position: relative;">';
|
||||
html += '<span>' + type.name + '</span>';
|
||||
|
||||
if (user.Configuration.IsAdministrator) {
|
||||
if (user.Policy.IsAdministrator) {
|
||||
html += '<a class="detailSectionHeaderButton" href="editcollectionitems.html?id=' + currentItem.Id + '" data-role="button" data-icon="edit" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonEdit') + '</a>';
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
|
||||
if (user.Configuration.IsAdministrator && query.ParentId) {
|
||||
if (user.Policy.IsAdministrator && query.ParentId) {
|
||||
$('#editButtonContainer', page).show();
|
||||
} else {
|
||||
$('#editButtonContainer', page).hide();
|
||||
|
@ -321,7 +321,7 @@
|
||||
if (item.Type == 'BoxSet' || item.Type == 'Playlist') {
|
||||
commands.push('delete');
|
||||
}
|
||||
else if (user.Configuration.EnableContentDeletion &&
|
||||
else if (user.Policy.EnableContentDeletion &&
|
||||
item.Type != "TvChannel" &&
|
||||
item.Type != "Genre" &&
|
||||
item.Type != "Studio" &&
|
||||
@ -333,7 +333,7 @@
|
||||
commands.push('delete');
|
||||
}
|
||||
|
||||
if (user.Configuration.IsAdministrator) {
|
||||
if (user.Policy.IsAdministrator) {
|
||||
if (item.Type != "Recording" && item.Type != "Program") {
|
||||
commands.push('edit');
|
||||
}
|
||||
|
@ -375,7 +375,7 @@
|
||||
html += '<li data-icon="plus"><a href="#" class="btnAddToPlaylist" data-itemid="' + itemId + '">' + Globalize.translate('ButtonAddToPlaylist') + '</a></li>';
|
||||
}
|
||||
|
||||
if (user.Configuration.IsAdministrator && commands.indexOf('edit') != -1) {
|
||||
if (user.Policy.IsAdministrator && commands.indexOf('edit') != -1) {
|
||||
html += '<li data-icon="edit"><a href="edititemmetadata.html?id=' + itemId + '">' + Globalize.translate('ButtonEdit') + '</a></li>';
|
||||
}
|
||||
|
||||
|
@ -4,23 +4,13 @@
|
||||
|
||||
var html = '<div class="viewMenuBar ui-bar-b">';
|
||||
|
||||
//html += '<a href="index.html" class="headerButton headerButtonLeft headerHomeButton">';
|
||||
//html += '<img src="css/images/items/folders/home.png" />';
|
||||
//html += '</a>';
|
||||
|
||||
html += '<button type="button" data-role="none" title="Menu" class="headerButton dashboardMenuButton barsMenuButton headerButtonLeft">';
|
||||
html += '<div class="barMenuInner">';
|
||||
html += '<span class="icon-bar"></span>';
|
||||
html += '<span class="icon-bar"></span>';
|
||||
html += '<span class="icon-bar"></span>';
|
||||
html += '<div class="barMenuInner fa fa-bars">';
|
||||
html += '</div>';
|
||||
html += '</button>';
|
||||
|
||||
html += '<button type="button" data-role="none" title="Menu" class="headerButton libraryMenuButton barsMenuButton headerButtonLeft">';
|
||||
html += '<div class="barMenuInner">';
|
||||
html += '<span class="icon-bar"></span>';
|
||||
html += '<span class="icon-bar"></span>';
|
||||
html += '<span class="icon-bar"></span>';
|
||||
html += '<div class="barMenuInner fa fa-bars">';
|
||||
html += '</div>';
|
||||
html += '</button>';
|
||||
|
||||
@ -32,7 +22,7 @@
|
||||
|
||||
html += '<button id="btnCast" class="btnCast btnDefaultCast headerButton headerButtonRight" type="button" data-role="none"><div class="headerSelectedPlayer"></div><div class="btnCastImage"></div></button>';
|
||||
|
||||
html += '<button onclick="Search.showSearchPanel($.mobile.activePage);" type="button" data-role="none" class="headerButton headerButtonRight headerSearchButton"><img src="css/images/headersearch.png" /></button>';
|
||||
html += '<button onclick="Search.showSearchPanel($.mobile.activePage);" type="button" data-role="none" class="headerButton headerButtonRight headerSearchButton"><div class="fa fa-search" style="font-size:20px;"></div></button>';
|
||||
} else {
|
||||
html += '<button id="btnCast" class="btnCast btnDefaultCast headerButton headerButtonRight" type="button" data-role="none" style="visibility:hidden;"><div class="headerSelectedPlayer"></div><div class="btnCastImage"></div></button>';
|
||||
|
||||
@ -40,24 +30,25 @@
|
||||
|
||||
html += '<a class="headerButton headerButtonRight headerUserButton" href="#" onclick="Dashboard.showUserFlyout(this);">';
|
||||
|
||||
var userButtonHeight = 21;
|
||||
if (user.imageUrl) {
|
||||
|
||||
var userButtonHeight = 23;
|
||||
|
||||
var url = user.imageUrl;
|
||||
|
||||
if (user.supportsImageParams) {
|
||||
url += "height=" + userButtonHeight;
|
||||
}
|
||||
|
||||
html += '<img src="' + url + '" style="height:' + userButtonHeight + 'px;" />';
|
||||
html += '<img src="' + url + '" style="border-radius: 1000px; height:' + userButtonHeight + 'px;" />';
|
||||
} else {
|
||||
html += '<img src="css/images/currentuserdefaultwhite.png" style="height:' + userButtonHeight + 'px;" />';
|
||||
html += '<div class="fa fa-user"></div>';
|
||||
}
|
||||
|
||||
html += '</a>';
|
||||
|
||||
if (user.canManageServer) {
|
||||
html += '<a href="dashboard.html" class="headerButton headerButtonRight"><img src="css/images/items/folders/settings.png" /></a>';
|
||||
html += '<a href="dashboard.html" class="headerButton headerButtonRight"><div class="fa fa-cog"></div></a>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
@ -170,7 +161,7 @@
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
|
||||
if (user.Configuration.IsAdministrator) {
|
||||
if (user.Policy.IsAdministrator) {
|
||||
$('.adminMenuOptions').show();
|
||||
} else {
|
||||
$('.adminMenuOptions').hide();
|
||||
|
@ -149,7 +149,7 @@
|
||||
$('#playButtonContainer', page).hide();
|
||||
}
|
||||
|
||||
if (user.Configuration.IsAdministrator && item.LocationType !== "Offline") {
|
||||
if (user.Policy.IsAdministrator && item.LocationType !== "Offline") {
|
||||
$('#editButtonContainer', page).show();
|
||||
} else {
|
||||
$('#editButtonContainer', page).hide();
|
||||
|
@ -80,7 +80,7 @@
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
|
||||
if (user.Configuration.IsAdministrator && item.LocationType !== "Offline") {
|
||||
if (user.Policy.IsAdministrator && item.LocationType !== "Offline") {
|
||||
$('#editButtonContainer', page).show();
|
||||
} else {
|
||||
$('#editButtonContainer', page).hide();
|
||||
|
@ -71,7 +71,7 @@
|
||||
$('#playButtonContainer', page).hide();
|
||||
}
|
||||
|
||||
if (user.Configuration.IsAdministrator && item.LocationType !== "Offline") {
|
||||
if (user.Policy.IsAdministrator && item.LocationType !== "Offline") {
|
||||
$('#deleteButtonContainer', page).show();
|
||||
} else {
|
||||
$('#deleteButtonContainer', page).hide();
|
||||
|
@ -85,7 +85,7 @@
|
||||
|
||||
Dashboard.setCurrentUser(user.Id, result.AccessToken);
|
||||
|
||||
if (user.Configuration.IsAdministrator) {
|
||||
if (user.Policy.IsAdministrator) {
|
||||
window.location = "dashboard.html?u=" + user.Id + '&t=' + result.AccessToken;
|
||||
} else {
|
||||
window.location = "index.html?u=" + user.Id + '&t=' + result.AccessToken;
|
||||
|
@ -12,7 +12,17 @@
|
||||
.replace('*', '')
|
||||
.replace('&', '&');
|
||||
|
||||
var value = this.value;
|
||||
|
||||
$('#txtValue', page).val(name);
|
||||
|
||||
var folderOption = MediaLibraryPage.getCollectionTypeOptions().filter(function (i) {
|
||||
|
||||
return i.value == value;
|
||||
|
||||
})[0];
|
||||
|
||||
$('.collectionTypeFieldDescription', page).html(folderOption.message || '');
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -237,12 +247,12 @@
|
||||
{ name: Globalize.translate('FolderTypeMovies'), value: "movies" },
|
||||
{ name: Globalize.translate('FolderTypeMusic'), value: "music" },
|
||||
{ name: Globalize.translate('FolderTypeTvShows'), value: "tvshows" },
|
||||
{ name: Globalize.translate('FolderTypeBooks') + '*', value: "books" },
|
||||
{ name: Globalize.translate('FolderTypeGames') + '*', value: "games" },
|
||||
{ name: Globalize.translate('FolderTypeBooks'), value: "books", message: Globalize.translate('MessageBookPluginRequired') },
|
||||
{ name: Globalize.translate('FolderTypeGames'), value: "games", message: Globalize.translate('MessageGamePluginRequired') },
|
||||
{ name: Globalize.translate('FolderTypeHomeVideos'), value: "homevideos" },
|
||||
{ name: Globalize.translate('FolderTypeMusicVideos'), value: "musicvideos" },
|
||||
{ name: Globalize.translate('FolderTypePhotos'), value: "photos" },
|
||||
{ name: Globalize.translate('FolderTypeMixed'), value: "mixed" }
|
||||
{ name: Globalize.translate('FolderTypeMixed'), value: "mixed", message: Globalize.translate('MessageMixedContentHelp') }
|
||||
];
|
||||
|
||||
},
|
||||
|
@ -295,7 +295,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
if (subtitleStream && (subtitleStream.IsGraphicalSubtitleStream || !self.supportsTextTracks())) {
|
||||
if (subtitleStream && (!subtitleStream.IsTextSubtitleStream || !self.supportsTextTracks())) {
|
||||
console.log('Transcoding because subtitles are required');
|
||||
return false;
|
||||
}
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
var html = '';
|
||||
|
||||
var addiontalButtonsHtml = user.Configuration.IsAdministrator ?
|
||||
var addiontalButtonsHtml = user.Policy.IsAdministrator ?
|
||||
('<button class="btnNewCollection" data-mini="true" data-icon="plus" data-inline="true" data-iconpos="notext">' + Globalize.translate('ButtonNew') + '</button>') :
|
||||
'';
|
||||
|
||||
|
@ -81,7 +81,7 @@
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
|
||||
if (user.Configuration.EnableMediaPlayback && result.Items.length) {
|
||||
if (user.Policy.EnableMediaPlayback && result.Items.length) {
|
||||
$('.btnTrailerReel', page).show();
|
||||
} else {
|
||||
$('.btnTrailerReel', page).hide();
|
||||
|
@ -187,7 +187,7 @@
|
||||
|
||||
Dashboard.getCurrentUser().done(function (loggedInUser) {
|
||||
|
||||
if (loggedInUser.Configuration.IsAdministrator) {
|
||||
if (loggedInUser.Policy.IsAdministrator) {
|
||||
$('#lnkParentalControl', page).show();
|
||||
} else {
|
||||
$('#lnkParentalControl', page).hide();
|
||||
@ -367,7 +367,7 @@
|
||||
|
||||
Dashboard.getCurrentUser().done(function (loggedInUser) {
|
||||
|
||||
if (loggedInUser.Configuration.IsAdministrator) {
|
||||
if (loggedInUser.Policy.IsAdministrator) {
|
||||
$('#lnkParentalControl', page).show();
|
||||
} else {
|
||||
$('#lnkParentalControl', page).hide();
|
||||
|
@ -218,7 +218,7 @@
|
||||
$(document).on('headercreated', function (e) {
|
||||
|
||||
if (ConnectionManager.currentApiClient()) {
|
||||
$('<a class="headerButton headerButtonRight btnNotifications" href="#" title="Notifications"><div class="btnNotificationsInner">0</div></a>').insertAfter($('.headerUserButton')).on('click', Notifications.showNotificationsFlyout);
|
||||
$('<a class="headerButton headerButtonRight btnNotifications" href="#" title="Notifications"><div class="btnNotificationsInner">0</div></a>').insertBefore($('.headerUserButton')).on('click', Notifications.showNotificationsFlyout);
|
||||
|
||||
Notifications.updateNotificationCount();
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ var Dashboard = {
|
||||
|
||||
Dashboard.getCurrentUser().done(function (currentUser) {
|
||||
|
||||
if (currentUser.Configuration.IsAdministrator) {
|
||||
if (currentUser.Policy.IsAdministrator) {
|
||||
Dashboard.showServerRestartWarning(info);
|
||||
}
|
||||
});
|
||||
@ -570,7 +570,7 @@ var Dashboard = {
|
||||
|
||||
var isConnectMode = Dashboard.isConnectMode();
|
||||
|
||||
if (user.localUser && user.localUser.Configuration.EnableUserPreferenceAccess) {
|
||||
if (user.localUser && user.localUser.Policy.EnableUserPreferenceAccess) {
|
||||
html += '<p><a data-mini="true" data-role="button" href="mypreferencesdisplay.html?userId=' + user.localUser.Id + '" data-icon="gear">' + Globalize.translate('ButtonMyPreferences') + '</button></a>';
|
||||
}
|
||||
|
||||
@ -672,7 +672,7 @@ var Dashboard = {
|
||||
|
||||
link = links[i];
|
||||
|
||||
if (!user.Configuration.IsAdministrator) {
|
||||
if (!user.Policy.IsAdministrator) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -705,7 +705,7 @@ var Dashboard = {
|
||||
|
||||
link = links[i];
|
||||
|
||||
if (!user.Configuration.IsAdministrator) {
|
||||
if (!user.Policy.IsAdministrator) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -892,7 +892,7 @@ var Dashboard = {
|
||||
else if (msg.MessageType === "PackageInstallationCompleted") {
|
||||
Dashboard.getCurrentUser().done(function (currentUser) {
|
||||
|
||||
if (currentUser.Configuration.IsAdministrator) {
|
||||
if (currentUser.Policy.IsAdministrator) {
|
||||
Dashboard.showPackageInstallNotification(msg.Data, "completed");
|
||||
Dashboard.refreshSystemInfoFromServer();
|
||||
}
|
||||
@ -901,7 +901,7 @@ var Dashboard = {
|
||||
else if (msg.MessageType === "PackageInstallationFailed") {
|
||||
Dashboard.getCurrentUser().done(function (currentUser) {
|
||||
|
||||
if (currentUser.Configuration.IsAdministrator) {
|
||||
if (currentUser.Policy.IsAdministrator) {
|
||||
Dashboard.showPackageInstallNotification(msg.Data, "failed");
|
||||
Dashboard.refreshSystemInfoFromServer();
|
||||
}
|
||||
@ -910,7 +910,7 @@ var Dashboard = {
|
||||
else if (msg.MessageType === "PackageInstallationCancelled") {
|
||||
Dashboard.getCurrentUser().done(function (currentUser) {
|
||||
|
||||
if (currentUser.Configuration.IsAdministrator) {
|
||||
if (currentUser.Policy.IsAdministrator) {
|
||||
Dashboard.showPackageInstallNotification(msg.Data, "cancelled");
|
||||
Dashboard.refreshSystemInfoFromServer();
|
||||
}
|
||||
@ -919,7 +919,7 @@ var Dashboard = {
|
||||
else if (msg.MessageType === "PackageInstalling") {
|
||||
Dashboard.getCurrentUser().done(function (currentUser) {
|
||||
|
||||
if (currentUser.Configuration.IsAdministrator) {
|
||||
if (currentUser.Policy.IsAdministrator) {
|
||||
Dashboard.showPackageInstallNotification(msg.Data, "progress");
|
||||
Dashboard.refreshSystemInfoFromServer();
|
||||
}
|
||||
@ -1436,7 +1436,7 @@ $(document).on('pagebeforeshow', ".page", function () {
|
||||
|
||||
var isSettingsPage = page.hasClass('type-interior');
|
||||
|
||||
if (!user.Configuration.IsAdministrator && isSettingsPage) {
|
||||
if (!user.Policy.IsAdministrator && isSettingsPage) {
|
||||
window.location.replace("index.html");
|
||||
return;
|
||||
}
|
||||
|
@ -21,20 +21,19 @@
|
||||
$('#txtUserName', page).val(user.Name);
|
||||
$('#txtConnectUserName', page).val(currentUser.ConnectUserName);
|
||||
|
||||
$('#chkIsAdmin', page).checked(user.Configuration.IsAdministrator || false).checkboxradio("refresh");
|
||||
$('#chkBlockNotRated', page).checked(user.Configuration.BlockNotRated || false).checkboxradio("refresh");
|
||||
$('#chkIsAdmin', page).checked(user.Policy.IsAdministrator || false).checkboxradio("refresh");
|
||||
|
||||
$('#chkDisabled', page).checked(user.Configuration.IsDisabled || false).checkboxradio("refresh");
|
||||
$('#chkIsHidden', page).checked(user.Configuration.IsHidden || false).checkboxradio("refresh");
|
||||
$('#chkRemoteControlSharedDevices', page).checked(user.Configuration.EnableSharedDeviceControl);
|
||||
$('#chkEnableRemoteControlOtherUsers', page).checked(user.Configuration.EnableRemoteControlOfOtherUsers).checkboxradio("refresh");
|
||||
$('#chkEnableMediaPlayback', page).checked(user.Configuration.EnableMediaPlayback || false).checkboxradio("refresh");
|
||||
$('#chkDisabled', page).checked(user.Policy.IsDisabled || false).checkboxradio("refresh");
|
||||
$('#chkIsHidden', page).checked(user.Policy.IsHidden || false).checkboxradio("refresh");
|
||||
$('#chkRemoteControlSharedDevices', page).checked(user.Policy.EnableSharedDeviceControl);
|
||||
$('#chkEnableRemoteControlOtherUsers', page).checked(user.Policy.EnableRemoteControlOfOtherUsers).checkboxradio("refresh");
|
||||
$('#chkEnableMediaPlayback', page).checked(user.Policy.EnableMediaPlayback || false).checkboxradio("refresh");
|
||||
|
||||
$('#chkManageLiveTv', page).checked(user.Configuration.EnableLiveTvManagement || false).checkboxradio("refresh");
|
||||
$('#chkEnableLiveTvAccess', page).checked(user.Configuration.EnableLiveTvAccess || false).checkboxradio("refresh");
|
||||
$('#chkEnableContentDeletion', page).checked(user.Configuration.EnableContentDeletion || false).checkboxradio("refresh");
|
||||
$('#chkManageLiveTv', page).checked(user.Policy.EnableLiveTvManagement || false).checkboxradio("refresh");
|
||||
$('#chkEnableLiveTvAccess', page).checked(user.Policy.EnableLiveTvAccess || false).checkboxradio("refresh");
|
||||
$('#chkEnableContentDeletion', page).checked(user.Policy.EnableContentDeletion || false).checkboxradio("refresh");
|
||||
|
||||
$('#chkDisableUserPreferences', page).checked((!user.Configuration.EnableUserPreferenceAccess) || false).checkboxradio("refresh");
|
||||
$('#chkDisableUserPreferences', page).checked((!user.Policy.EnableUserPreferenceAccess) || false).checkboxradio("refresh");
|
||||
|
||||
$('#chkEnableSync', page).checked(user.Policy.EnableSync).checkboxradio("refresh");
|
||||
|
||||
@ -63,19 +62,17 @@
|
||||
|
||||
user.Name = $('#txtUserName', page).val();
|
||||
|
||||
user.Configuration.IsAdministrator = $('#chkIsAdmin', page).checked();
|
||||
user.Policy.IsAdministrator = $('#chkIsAdmin', page).checked();
|
||||
|
||||
user.Configuration.BlockNotRated = $('#chkBlockNotRated', page).checked();
|
||||
|
||||
user.Configuration.IsHidden = $('#chkIsHidden', page).checked();
|
||||
user.Configuration.IsDisabled = $('#chkDisabled', page).checked();
|
||||
user.Configuration.EnableRemoteControlOfOtherUsers = $('#chkEnableRemoteControlOtherUsers', page).checked();
|
||||
user.Configuration.EnableLiveTvManagement = $('#chkManageLiveTv', page).checked();
|
||||
user.Configuration.EnableMediaPlayback = $('#chkEnableMediaPlayback', page).checked();
|
||||
user.Configuration.EnableLiveTvAccess = $('#chkEnableLiveTvAccess', page).checked();
|
||||
user.Configuration.EnableContentDeletion = $('#chkEnableContentDeletion', page).checked();
|
||||
user.Configuration.EnableUserPreferenceAccess = !$('#chkDisableUserPreferences', page).checked();
|
||||
user.Configuration.EnableSharedDeviceControl = $('#chkRemoteControlSharedDevices', page).checked();
|
||||
user.Policy.IsHidden = $('#chkIsHidden', page).checked();
|
||||
user.Policy.IsDisabled = $('#chkDisabled', page).checked();
|
||||
user.Policy.EnableRemoteControlOfOtherUsers = $('#chkEnableRemoteControlOtherUsers', page).checked();
|
||||
user.Policy.EnableLiveTvManagement = $('#chkManageLiveTv', page).checked();
|
||||
user.Policy.EnableMediaPlayback = $('#chkEnableMediaPlayback', page).checked();
|
||||
user.Policy.EnableLiveTvAccess = $('#chkEnableLiveTvAccess', page).checked();
|
||||
user.Policy.EnableContentDeletion = $('#chkEnableContentDeletion', page).checked();
|
||||
user.Policy.EnableUserPreferenceAccess = !$('#chkDisableUserPreferences', page).checked();
|
||||
user.Policy.EnableSharedDeviceControl = $('#chkRemoteControlSharedDevices', page).checked();
|
||||
|
||||
user.Policy.EnableSync = $('#chkEnableSync', page).checked();
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
var id = 'mediaFolder' + i;
|
||||
|
||||
var checkedAttribute = user.Configuration.BlockedMediaFolders.indexOf(folder.Id) == -1 && user.Configuration.BlockedMediaFolders.indexOf(folder.Name) == -1 ? ' checked="checked"' : '';
|
||||
var checkedAttribute = user.Policy.BlockedMediaFolders.indexOf(folder.Id) == -1 && user.Policy.BlockedMediaFolders.indexOf(folder.Name) == -1 ? ' checked="checked"' : '';
|
||||
|
||||
html += '<input class="chkMediaFolder" data-foldername="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
|
||||
html += '<label for="' + id + '">' + folder.Name + '</label>';
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
var id = 'channels' + i;
|
||||
|
||||
var checkedAttribute = user.Configuration.BlockedChannels.indexOf(folder.Id) == -1 ? ' checked="checked"' : '';
|
||||
var checkedAttribute = user.Policy.BlockedChannels.indexOf(folder.Id) == -1 ? ' checked="checked"' : '';
|
||||
|
||||
html += '<input class="chkChannel" data-foldername="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
|
||||
html += '<label for="' + id + '">' + folder.Name + '</label>';
|
||||
@ -77,19 +77,19 @@
|
||||
|
||||
function saveUser(user, page) {
|
||||
|
||||
user.Configuration.BlockedMediaFolders = $('.chkMediaFolder:not(:checked)', page).map(function () {
|
||||
user.Policy.BlockedMediaFolders = $('.chkMediaFolder:not(:checked)', page).map(function () {
|
||||
|
||||
return this.getAttribute('data-foldername');
|
||||
|
||||
}).get();
|
||||
|
||||
user.Configuration.BlockedChannels = $('.chkChannel:not(:checked)', page).map(function () {
|
||||
user.Policy.BlockedChannels = $('.chkChannel:not(:checked)', page).map(function () {
|
||||
|
||||
return this.getAttribute('data-foldername');
|
||||
|
||||
}).get();
|
||||
|
||||
ApiClient.updateUserConfiguration(user.Id, user.Configuration).done(function () {
|
||||
ApiClient.updateUserPolicy(user.Id, user.Policy).done(function () {
|
||||
onSaveComplete(page);
|
||||
});
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
var id = 'mediaFolder' + i;
|
||||
|
||||
var checkedAttribute = user.Configuration.BlockedMediaFolders.indexOf(folder.Id) == -1 && user.Configuration.BlockedMediaFolders.indexOf(folder.Name) == -1 ? ' checked="checked"' : '';
|
||||
var checkedAttribute = user.Policy.BlockedMediaFolders.indexOf(folder.Id) == -1 && user.Policy.BlockedMediaFolders.indexOf(folder.Name) == -1 ? ' checked="checked"' : '';
|
||||
|
||||
html += '<input class="chkMediaFolder" data-foldername="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
|
||||
html += '<label for="' + id + '">' + folder.Name + '</label>';
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
var id = 'channels' + i;
|
||||
|
||||
var checkedAttribute = user.Configuration.BlockedChannels.indexOf(folder.Id) == -1 ? ' checked="checked"' : '';
|
||||
var checkedAttribute = user.Policy.BlockedChannels.indexOf(folder.Id) == -1 ? ' checked="checked"' : '';
|
||||
|
||||
html += '<input class="chkChannel" data-foldername="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
|
||||
html += '<label for="' + id + '">' + folder.Name + '</label>';
|
||||
@ -81,19 +81,19 @@
|
||||
|
||||
ApiClient.createUser(name).done(function (user) {
|
||||
|
||||
user.Configuration.BlockedMediaFolders = $('.chkMediaFolder:not(:checked)', page).map(function () {
|
||||
user.Policy.BlockedMediaFolders = $('.chkMediaFolder:not(:checked)', page).map(function () {
|
||||
|
||||
return this.getAttribute('data-foldername');
|
||||
|
||||
}).get();
|
||||
|
||||
user.Configuration.BlockedChannels = $('.chkChannel:not(:checked)', page).map(function () {
|
||||
user.Policy.BlockedChannels = $('.chkChannel:not(:checked)', page).map(function () {
|
||||
|
||||
return this.getAttribute('data-foldername');
|
||||
|
||||
}).get();
|
||||
|
||||
ApiClient.updateUserConfiguration(user.Id, user.Configuration).done(function () {
|
||||
ApiClient.updateUserPolicy(user.Id, user.Policy).done(function () {
|
||||
Dashboard.navigate("useredit.html?userId=" + user.Id);
|
||||
});
|
||||
});
|
||||
|
@ -65,7 +65,7 @@
|
||||
|
||||
var id = 'unratedItem' + i;
|
||||
|
||||
var checkedAttribute = user.Configuration.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 += '<label for="' + id + '">' + item.name + '</label>';
|
||||
@ -81,19 +81,19 @@
|
||||
Dashboard.setPageTitle(user.Name);
|
||||
|
||||
loadUnratedItems(page, user);
|
||||
loadTags(page, user.Configuration.BlockedTags);
|
||||
loadTags(page, user.Policy.BlockedTags);
|
||||
|
||||
populateRatings(allParentalRatings, page);
|
||||
|
||||
var ratingValue = "";
|
||||
|
||||
if (user.Configuration.MaxParentalRating) {
|
||||
if (user.Policy.MaxParentalRating) {
|
||||
|
||||
for (var i = 0, length = allParentalRatings.length; i < length; i++) {
|
||||
|
||||
var rating = allParentalRatings[i];
|
||||
|
||||
if (user.Configuration.MaxParentalRating >= rating.Value) {
|
||||
if (user.Policy.MaxParentalRating >= rating.Value) {
|
||||
ratingValue = rating.Value;
|
||||
}
|
||||
}
|
||||
@ -101,13 +101,13 @@
|
||||
|
||||
$('#selectMaxParentalRating', page).val(ratingValue).selectmenu("refresh");
|
||||
|
||||
if (user.Configuration.IsAdministrator) {
|
||||
if (user.Policy.IsAdministrator) {
|
||||
$('.accessScheduleSection', page).hide();
|
||||
} else {
|
||||
$('.accessScheduleSection', page).show();
|
||||
}
|
||||
|
||||
renderAccessSchedule(page, user.Configuration.AccessSchedules || []);
|
||||
renderAccessSchedule(page, user.Policy.AccessSchedules || []);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
@ -199,19 +199,19 @@
|
||||
|
||||
function saveUser(user, page) {
|
||||
|
||||
user.Configuration.MaxParentalRating = $('#selectMaxParentalRating', page).val() || null;
|
||||
user.Policy.MaxParentalRating = $('#selectMaxParentalRating', page).val() || null;
|
||||
|
||||
user.Configuration.BlockUnratedItems = $('.chkUnratedItem:checked', page).map(function () {
|
||||
user.Policy.BlockUnratedItems = $('.chkUnratedItem:checked', page).map(function () {
|
||||
|
||||
return this.getAttribute('data-itemtype');
|
||||
|
||||
}).get();
|
||||
|
||||
user.Configuration.AccessSchedules = getSchedulesFromPage(page);
|
||||
user.Policy.AccessSchedules = getSchedulesFromPage(page);
|
||||
|
||||
user.Configuration.BlockedTags = getTagsFromPage(page);
|
||||
user.Policy.BlockedTags = getTagsFromPage(page);
|
||||
|
||||
ApiClient.updateUserConfiguration(user.Id, user.Configuration).done(function () {
|
||||
ApiClient.updateUserPolicy(user.Id, user.Policy).done(function () {
|
||||
onSaveComplete(page);
|
||||
});
|
||||
}
|
||||
|
@ -94,7 +94,7 @@
|
||||
|
||||
var cssClass = "card squareCard alternateHover bottomPaddedCard";
|
||||
|
||||
if (user.Configuration.IsDisabled) {
|
||||
if (user.Policy.IsDisabled) {
|
||||
cssClass += ' grayscale';
|
||||
}
|
||||
|
||||
|
@ -375,7 +375,7 @@
|
||||
{
|
||||
localUser: localUser,
|
||||
name: connectUser ? connectUser.Name : localUser.Name,
|
||||
canManageServer: localUser && localUser.Configuration.IsAdministrator,
|
||||
canManageServer: localUser && localUser.Policy.IsAdministrator,
|
||||
imageUrl: image.url,
|
||||
supportsImageParams: image.supportsParams
|
||||
}]);
|
||||
|
@ -28,12 +28,11 @@
|
||||
</div>
|
||||
|
||||
<div data-role="content">
|
||||
<form id="textEntryForm">
|
||||
<form id="textEntryForm" style="min-width:200px;">
|
||||
<div id="fldCollectionType" style="margin:.5em 0 1.5em;">
|
||||
<label for="selectCollectionType">${LabelType}</label>
|
||||
<select id="selectCollectionType" name="selectCollectionType" data-mini="true"></select>
|
||||
<div class="collectionTypeFieldDescription fieldDescription">
|
||||
${MediaFolderHelpPluginRequired}
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
|
Loading…
Reference in New Issue
Block a user