diff --git a/dashboard-ui/css/chromecast.css b/dashboard-ui/css/chromecast.css index ec924216b7..7a7c4de886 100644 --- a/dashboard-ui/css/chromecast.css +++ b/dashboard-ui/css/chromecast.css @@ -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; - } -} +} \ No newline at end of file diff --git a/dashboard-ui/css/images/currentuserdefaultwhite.png b/dashboard-ui/css/images/currentuserdefaultwhite.png deleted file mode 100644 index acfa26e9de..0000000000 Binary files a/dashboard-ui/css/images/currentuserdefaultwhite.png and /dev/null differ diff --git a/dashboard-ui/css/images/headersearch.png b/dashboard-ui/css/images/headersearch.png deleted file mode 100644 index 69f1fc1396..0000000000 Binary files a/dashboard-ui/css/images/headersearch.png and /dev/null differ diff --git a/dashboard-ui/css/images/items/folders/settings.png b/dashboard-ui/css/images/items/folders/settings.png deleted file mode 100644 index 29c5603027..0000000000 Binary files a/dashboard-ui/css/images/items/folders/settings.png and /dev/null differ diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 8b0d0b56e7..99b2fed477 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -62,7 +62,7 @@ .listHeader { margin-top: 1em; - margin-bottom: .15em; + margin-bottom: .25em; padding-left: 2px; } diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index be97a83bb4..02651ed74d 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -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); } diff --git a/dashboard-ui/css/notifications.css b/dashboard-ui/css/notifications.css index a7219a0a08..3c3b52d5d1 100644 --- a/dashboard-ui/css/notifications.css +++ b/dashboard-ui/css/notifications.css @@ -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; } diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index b2c8bc65cf..82a16697a6 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -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; diff --git a/dashboard-ui/library.html b/dashboard-ui/library.html index 2ae1751a64..a203a6316f 100644 --- a/dashboard-ui/library.html +++ b/dashboard-ui/library.html @@ -39,19 +39,18 @@
-
+
- ${MediaFolderHelpPluginRequired}

-
+

'; html += ''; @@ -32,7 +22,7 @@ html += ''; - html += ''; + html += ''; } else { html += ''; @@ -40,24 +30,25 @@ html += ''; - var userButtonHeight = 21; if (user.imageUrl) { + var userButtonHeight = 23; + var url = user.imageUrl; if (user.supportsImageParams) { url += "height=" + userButtonHeight; } - html += ''; + html += ''; } else { - html += ''; + html += '

'; } html += ''; if (user.canManageServer) { - html += ''; + html += '
'; } html += '
'; @@ -170,7 +161,7 @@ Dashboard.getCurrentUser().done(function (user) { - if (user.Configuration.IsAdministrator) { + if (user.Policy.IsAdministrator) { $('.adminMenuOptions').show(); } else { $('.adminMenuOptions').hide(); diff --git a/dashboard-ui/scripts/livetvchannel.js b/dashboard-ui/scripts/livetvchannel.js index b254c26951..51c22664c6 100644 --- a/dashboard-ui/scripts/livetvchannel.js +++ b/dashboard-ui/scripts/livetvchannel.js @@ -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(); diff --git a/dashboard-ui/scripts/livetvprogram.js b/dashboard-ui/scripts/livetvprogram.js index 26bada1887..0199ca7394 100644 --- a/dashboard-ui/scripts/livetvprogram.js +++ b/dashboard-ui/scripts/livetvprogram.js @@ -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(); diff --git a/dashboard-ui/scripts/livetvrecording.js b/dashboard-ui/scripts/livetvrecording.js index 6d2cdc34e4..ab0e739e96 100644 --- a/dashboard-ui/scripts/livetvrecording.js +++ b/dashboard-ui/scripts/livetvrecording.js @@ -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(); diff --git a/dashboard-ui/scripts/loginpage.js b/dashboard-ui/scripts/loginpage.js index e47e482eca..db346ff8b5 100644 --- a/dashboard-ui/scripts/loginpage.js +++ b/dashboard-ui/scripts/loginpage.js @@ -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; diff --git a/dashboard-ui/scripts/medialibrarypage.js b/dashboard-ui/scripts/medialibrarypage.js index 8281c5df28..3241225513 100644 --- a/dashboard-ui/scripts/medialibrarypage.js +++ b/dashboard-ui/scripts/medialibrarypage.js @@ -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') } ]; }, diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index e96556e7c4..39f04472d6 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -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; } diff --git a/dashboard-ui/scripts/moviecollections.js b/dashboard-ui/scripts/moviecollections.js index 5d50ef303f..006fa5436c 100644 --- a/dashboard-ui/scripts/moviecollections.js +++ b/dashboard-ui/scripts/moviecollections.js @@ -37,7 +37,7 @@ var html = ''; - var addiontalButtonsHtml = user.Configuration.IsAdministrator ? + var addiontalButtonsHtml = user.Policy.IsAdministrator ? ('') : ''; diff --git a/dashboard-ui/scripts/movietrailers.js b/dashboard-ui/scripts/movietrailers.js index d7d77a0109..f4fc5c7772 100644 --- a/dashboard-ui/scripts/movietrailers.js +++ b/dashboard-ui/scripts/movietrailers.js @@ -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(); diff --git a/dashboard-ui/scripts/myprofile.js b/dashboard-ui/scripts/myprofile.js index a3e7020316..ccc34183ee 100644 --- a/dashboard-ui/scripts/myprofile.js +++ b/dashboard-ui/scripts/myprofile.js @@ -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(); diff --git a/dashboard-ui/scripts/notifications.js b/dashboard-ui/scripts/notifications.js index 43e198c7e3..0ece80fdfd 100644 --- a/dashboard-ui/scripts/notifications.js +++ b/dashboard-ui/scripts/notifications.js @@ -218,7 +218,7 @@ $(document).on('headercreated', function (e) { if (ConnectionManager.currentApiClient()) { - $('
0
').insertAfter($('.headerUserButton')).on('click', Notifications.showNotificationsFlyout); + $('
0
').insertBefore($('.headerUserButton')).on('click', Notifications.showNotificationsFlyout); Notifications.updateNotificationCount(); } diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 4c31e12104..960e1c6a8d 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -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 += '

' + Globalize.translate('ButtonMyPreferences') + ''; } @@ -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; } diff --git a/dashboard-ui/scripts/useredit.js b/dashboard-ui/scripts/useredit.js index c1c078c06b..21e016eb51 100644 --- a/dashboard-ui/scripts/useredit.js +++ b/dashboard-ui/scripts/useredit.js @@ -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(); diff --git a/dashboard-ui/scripts/userlibraryaccess.js b/dashboard-ui/scripts/userlibraryaccess.js index 812c656b2e..60b02a43d4 100644 --- a/dashboard-ui/scripts/userlibraryaccess.js +++ b/dashboard-ui/scripts/userlibraryaccess.js @@ -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 += ''; html += ''; @@ -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 += ''; html += ''; @@ -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); }); } diff --git a/dashboard-ui/scripts/usernew.js b/dashboard-ui/scripts/usernew.js index e7cfdda226..318714e9f8 100644 --- a/dashboard-ui/scripts/usernew.js +++ b/dashboard-ui/scripts/usernew.js @@ -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 += ''; html += ''; @@ -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 += ''; html += ''; @@ -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); }); }); diff --git a/dashboard-ui/scripts/userparentalcontrol.js b/dashboard-ui/scripts/userparentalcontrol.js index edb98bf45c..c12f854138 100644 --- a/dashboard-ui/scripts/userparentalcontrol.js +++ b/dashboard-ui/scripts/userparentalcontrol.js @@ -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 += ''; html += ''; @@ -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); }); } diff --git a/dashboard-ui/scripts/userprofilespage.js b/dashboard-ui/scripts/userprofilespage.js index a32f8d4e3e..23b63bcac3 100644 --- a/dashboard-ui/scripts/userprofilespage.js +++ b/dashboard-ui/scripts/userprofilespage.js @@ -94,7 +94,7 @@ var cssClass = "card squareCard alternateHover bottomPaddedCard"; - if (user.Configuration.IsDisabled) { + if (user.Policy.IsDisabled) { cssClass += ' grayscale'; } diff --git a/dashboard-ui/thirdparty/apiclient/connectionmanager.js b/dashboard-ui/thirdparty/apiclient/connectionmanager.js index cad25d9c7e..9f3c64f6dd 100644 --- a/dashboard-ui/thirdparty/apiclient/connectionmanager.js +++ b/dashboard-ui/thirdparty/apiclient/connectionmanager.js @@ -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 }]); diff --git a/dashboard-ui/wizardlibrary.html b/dashboard-ui/wizardlibrary.html index de88c7d10f..4316e7f001 100644 --- a/dashboard-ui/wizardlibrary.html +++ b/dashboard-ui/wizardlibrary.html @@ -28,12 +28,11 @@

- +
- ${MediaFolderHelpPluginRequired}