diff --git a/dashboard-ui/connectlogin.html b/dashboard-ui/connectlogin.html index 14c4a51651..c9903da552 100644 --- a/dashboard-ui/connectlogin.html +++ b/dashboard-ui/connectlogin.html @@ -4,8 +4,8 @@ ${TitleSignIn} -
-
+
+
diff --git a/dashboard-ui/css/images/splash.jpg b/dashboard-ui/css/images/splash.jpg new file mode 100644 index 0000000000..2b48e0a70c Binary files /dev/null and b/dashboard-ui/css/images/splash.jpg differ diff --git a/dashboard-ui/css/images/splash.png b/dashboard-ui/css/images/splash.png deleted file mode 100644 index 9c8baef44e..0000000000 Binary files a/dashboard-ui/css/images/splash.png and /dev/null differ diff --git a/dashboard-ui/scripts/userparentalcontrol.js b/dashboard-ui/scripts/userparentalcontrol.js index c12f854138..2eb50396a5 100644 --- a/dashboard-ui/scripts/userparentalcontrol.js +++ b/dashboard-ui/scripts/userparentalcontrol.js @@ -81,7 +81,7 @@ Dashboard.setPageTitle(user.Name); loadUnratedItems(page, user); - loadTags(page, user.Policy.BlockedTags); + loadTags(page, user.Policy.TagFilters); populateRatings(allParentalRatings, page); @@ -120,11 +120,17 @@ li += ''; - li += '
' + h + '
'; + li += '

' + h.Tag + '

'; + + if (h.Mode == 'Allow') { + li += '

Allow

'; + } else if (h.Mode == 'Block') { + li += '

Block

'; + } li += '
'; - li += ''; + li += ''; li += ''; @@ -132,14 +138,15 @@ }).join('') + ''; - var elem = $('.blockedTags', page).html(html).trigger('create'); + var elem = $('.tagFilters', page).html(html).trigger('create'); $('.btnDeleteTag', elem).on('click', function () { var tag = this.getAttribute('data-tag'); + var mode = this.getAttribute('data-mode'); var newTags = tags.filter(function (t) { - return t != tag; + return t.Tag != tag || t.Mode != mode; }); loadTags(page, newTags); @@ -209,7 +216,7 @@ user.Policy.AccessSchedules = getSchedulesFromPage(page); - user.Policy.BlockedTags = getTagsFromPage(page); + user.Policy.TagFilters = getTagsFromPage(page); ApiClient.updateUserPolicy(user.Id, user.Policy).done(function () { onSaveComplete(page); @@ -244,8 +251,8 @@ return false; }, - onTagFormSubmit: function() { - + onTagFormSubmit: function () { + var page = $(this).parents('.page'); saveTag(page); @@ -329,12 +336,15 @@ function saveTag(page) { var tag = $('#txtTag', page).val(); + var mode = $('#selectTagMode', page).val(); var tags = getTagsFromPage(page); - if (tags.indexOf(tag) == -1) { - tags.push(tag); - loadTags(page, tags); - } + tags.push({ + Tag: tag, + Mode: mode + }); + + loadTags(page, tags); $('#popupTag', page).popup('close'); } @@ -354,9 +364,12 @@ function getTagsFromPage(page) { - return $('.blockedTag', page).map(function () { + return $('.tagFilter', page).map(function () { - return this.getAttribute('data-tag'); + return { + Tag: this.getAttribute('data-tag'), + Mode: this.getAttribute('data-mode') + }; }).get(); } @@ -365,6 +378,7 @@ $('#popupTag', page).popup('open'); $('#txtTag', page).val('').focus(); + $('#selectTagMode', page).val('Block').selectmenu('refresh').trigger('change'); } $(document).on('pageinit', "#userParentalControlPage", function () { @@ -383,6 +397,15 @@ showTagPopup(page); }); + $('#selectTagMode', page).on('change', function () { + + if (this.value == 'Allow') { + $('.allowModeHelp', page).show(); + } else { + $('.allowModeHelp', page).hide(); + } + }); + populateHours(page); }).on('pageshow', "#userParentalControlPage", function () { diff --git a/dashboard-ui/userparentalcontrol.html b/dashboard-ui/userparentalcontrol.html index 959ea5ae7d..29f5c7d0b7 100644 --- a/dashboard-ui/userparentalcontrol.html +++ b/dashboard-ui/userparentalcontrol.html @@ -32,10 +32,10 @@
-
${LabelBlockItemsWithTags}
+
${LabelBlockOrAllowItemsWithTags}
-
+
@@ -81,6 +81,14 @@ +
  • + + +
    ${LabelTagFilterAllowModeHelp}
    +