diff --git a/dashboard-ui/css/notifications.css b/dashboard-ui/css/notifications.css index a6feb479c0..877b3d0b89 100644 --- a/dashboard-ui/css/notifications.css +++ b/dashboard-ui/css/notifications.css @@ -135,4 +135,4 @@ .imgNotificationWarning .imgNotificationInner { background-image: url(images/notifications/error.png); - } + } \ No newline at end of file diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 8d76bae7aa..15afd48e90 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -1040,3 +1040,11 @@ h1 + .accentButton { font-weight: normal; margin: 0 .7em; } + + .dashboardFooter .appLinks a { + margin: .25em; + } + + .dashboardFooter .appLinks img { + height: 16px; + } diff --git a/dashboard-ui/dashboard.html b/dashboard-ui/dashboard.html index 33bfa5add4..ce99f91912 100644 --- a/dashboard-ui/dashboard.html +++ b/dashboard-ui/dashboard.html @@ -21,9 +21,6 @@
--
-+
' + notification.Name + '
'; + html += ''; + if (notification.Url) { + html += '' + notification.Name + ''; + } else { + html += notification.Name; + } + html += '
'; - html += '' + humane_date(notification.Date) + '
'; + html += '' + humane_date(notification.Date) + '
'; if (notification.Description) { - html += '' + notification.Description + '
'; - } - - if (notification.Url) { - html += ''; + html += ' '; } html += ''; - html += ''; + html += ''; html += ''; html += '
'; html += ''; - html += ''; + html += ''; html += ''; html += '
'; diff --git a/dashboard-ui/scripts/userlibraryaccess.js b/dashboard-ui/scripts/userlibraryaccess.js index b75c1eacb2..d844ceabdb 100644 --- a/dashboard-ui/scripts/userlibraryaccess.js +++ b/dashboard-ui/scripts/userlibraryaccess.js @@ -6,7 +6,7 @@ html += ''; - $('.mediaFolderAccess', page).html(html).trigger('create'); + $('.folderAccess', page).html(html).trigger('create'); + + $('#chkEnableAllFolders', page).checked(user.Policy.EnableAllFolders).checkboxradio('refresh').trigger('change'); } function loadChannels(page, user, channels) { @@ -110,11 +112,14 @@ function saveUser(user, page) { - user.Policy.BlockedMediaFolders = $('.chkMediaFolder:not(:checked)', page).map(function () { + user.Policy.EnableAllFolders = $('#chkEnableAllFolders', page).checked(); + user.Policy.EnabledFolders = user.Policy.EnableAllFolders ? + [] : + $('.chkFolder:checked', page).map(function () { - return this.getAttribute('data-foldername'); + return this.getAttribute('data-id'); - }).get(); + }).get(); user.Policy.EnableAllChannels = $('#chkEnableAllChannels', page).checked(); user.Policy.EnabledChannels = user.Policy.EnableAllChannels ? @@ -182,6 +187,16 @@ }); + $('#chkEnableAllFolders', page).on('change', function () { + + if (this.checked) { + $('.folderAccessListContainer', page).hide(); + } else { + $('.folderAccessListContainer', page).show(); + } + + }); + }).on('pageshow', "#userLibraryAccessPage", function () { var page = this; @@ -210,7 +225,7 @@ var promise4 = ApiClient.getJSON(ApiClient.getUrl("Library/MediaFolders", { IsHidden: false })); var promise5 = ApiClient.getJSON(ApiClient.getUrl("Channels")); var promise6 = ApiClient.getJSON(ApiClient.getUrl('Devices', { - SupportsUniqueIdentifier: true + SupportsPersistentIdentifier: true })); $.when(promise1, promise2, promise4, promise5, promise6).done(function (response1, response2, response4, response5, response6) { diff --git a/dashboard-ui/scripts/usernew.js b/dashboard-ui/scripts/usernew.js index 3d1e3bb0a9..4dfe10aa52 100644 --- a/dashboard-ui/scripts/usernew.js +++ b/dashboard-ui/scripts/usernew.js @@ -6,7 +6,7 @@ html += ''; - $('.mediaFolderAccess', page).html(html).trigger('create'); + $('.folderAccess', page).html(html).trigger('create'); + + $('#chkEnableAllFolders', page).checked(true).checkboxradio('refresh').trigger('change'); } function loadChannels(page, channels) { @@ -83,11 +85,14 @@ ApiClient.createUser(name).done(function (user) { - user.Policy.BlockedMediaFolders = $('.chkMediaFolder:not(:checked)', page).map(function () { + user.Policy.EnableAllFolders = $('#chkEnableAllFolders', page).checked(); + user.Policy.EnabledFolders = user.Policy.EnableAllFolders ? + [] : + $('.chkFolder:checked', page).map(function () { - return this.getAttribute('data-id'); + return this.getAttribute('data-id'); - }).get(); + }).get(); user.Policy.EnableAllChannels = $('#chkEnableAllChannels', page).checked(); user.Policy.EnabledChannels = user.Policy.EnableAllChannels ? @@ -142,6 +147,16 @@ }); + $('#chkEnableAllFolders', page).on('change', function () { + + if (this.checked) { + $('.folderAccessListContainer', page).hide(); + } else { + $('.folderAccessListContainer', page).show(); + } + + }); + }).on('pageshow', "#newUserPage", function () { var page = this; diff --git a/dashboard-ui/scripts/userprofilespage.js b/dashboard-ui/scripts/userprofilespage.js index 17e8ae4c48..b79cc8731c 100644 --- a/dashboard-ui/scripts/userprofilespage.js +++ b/dashboard-ui/scripts/userprofilespage.js @@ -341,7 +341,7 @@ ApiClient.getJSON(ApiClient.getUrl("Channels", {})).done(function (channelsResult) { - var shareExcludes = $(".chkShareFolder:not(:checked)", page).get().map(function (i) { + var shareExcludes = $(".chkShareFolder:checked", page).get().map(function (i) { return i.getAttribute('data-folderid'); }); @@ -355,7 +355,7 @@ data: { ConnectUsername: $('#txtConnectUsername', page).val(), - ExcludedLibraries: shareExcludes.join(','), + EnabledLibraries: shareExcludes.join(','), SendingUserId: Dashboard.getCurrentUserId(), EnableLiveTv: false } diff --git a/dashboard-ui/userlibraryaccess.html b/dashboard-ui/userlibraryaccess.html index 48bf07908e..f63ccc4104 100644 --- a/dashboard-ui/userlibraryaccess.html +++ b/dashboard-ui/userlibraryaccess.html @@ -16,10 +16,18 @@