diff --git a/dashboard-ui/scripts/useredit.js b/dashboard-ui/scripts/useredit.js index b982a68547..047453da81 100644 --- a/dashboard-ui/scripts/useredit.js +++ b/dashboard-ui/scripts/useredit.js @@ -26,6 +26,12 @@ $('#fldConnectInfo', page).hide(); } + if (user.ConnectLinkType == 'Guest') { + $('#txtUserName', page).prop("disabled", "disabled"); + } else { + $('#txtUserName', page).prop("disabled", "").removeAttr('disabled'); + } + if (!loggedInUser.Configuration.IsAdministrator || !user.Id) { $('.lnkEditUserPreferencesContainer', page).hide(); @@ -254,8 +260,6 @@ var page = this; loadData(page); - - $("form input:first", page).focus(); }); })(jQuery, window, document); \ No newline at end of file diff --git a/dashboard-ui/scripts/userimagepage.js b/dashboard-ui/scripts/userimagepage.js index bf44b9b772..5368c70b0d 100644 --- a/dashboard-ui/scripts/userimagepage.js +++ b/dashboard-ui/scripts/userimagepage.js @@ -23,10 +23,21 @@ }); $('#fldImage', page).show().html('').html(""); + } + + if (user.ConnectLinkType == 'Guest') { + + $('.newImageSection', page).hide(); + $('#fldDeleteImage', page).hide(); + } + else if (user.PrimaryImageTag) { $('#fldDeleteImage', page).show(); $('#headerUploadNewImage', page).show(); + $('.newImageSection', page).show(); + } else { + $('.newImageSection', page).show(); $('#fldImage', page).hide().html(''); $('#fldDeleteImage', page).hide(); $('#headerUploadNewImage', page).hide(); diff --git a/dashboard-ui/scripts/userpassword.js b/dashboard-ui/scripts/userpassword.js index d903702726..406789b928 100644 --- a/dashboard-ui/scripts/userpassword.js +++ b/dashboard-ui/scripts/userpassword.js @@ -8,16 +8,22 @@ Dashboard.setPageTitle(user.Name); - if (user.HasConfiguredPassword) { + if (user.ConnectLinkType == 'Guest') { + $('.localAccessSection', page).show().collapsible("option", "collapsed", false); + $('.passwordSection', page).hide(); + } + else if (user.HasConfiguredPassword) { $('#btnResetPassword', page).show(); $('#fldCurrentPassword', page).show(); $('.formheader', page).hide(); $('.localAccessSection', page).show(); + $('.passwordSection', page).show(); } else { $('#btnResetPassword', page).hide(); $('#fldCurrentPassword', page).hide(); $('.formheader', page).show(); $('.localAccessSection', page).hide(); + $('.passwordSection', page).show(); } $('#chkEnableLocalAccessWithoutPassword', page).checked(user.Configuration.EnableLocalPassword).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/userprofilespage.js b/dashboard-ui/scripts/userprofilespage.js index ba3c3f7ad4..07bb5bc3d4 100644 --- a/dashboard-ui/scripts/userprofilespage.js +++ b/dashboard-ui/scripts/userprofilespage.js @@ -61,7 +61,7 @@ var html = ''; - var cssClass = "card homePageSquareCard alternateHover bottomPaddedCard"; + var cssClass = "card squareCard alternateHover bottomPaddedCard"; if (user.Configuration.IsDisabled) { cssClass += ' grayscale'; @@ -150,7 +150,13 @@ function renderUsers(page, users) { - renderUsersIntoElement($('.users', page), users); + renderUsersIntoElement($('.localUsers', page), users.filter(function (u) { + return u.ConnectLinkType != 'Guest'; + })); + + renderUsersIntoElement($('.connectUsers', page), users.filter(function (u) { + return u.ConnectLinkType == 'Guest'; + })); } function showPendingUserMenu(elem) { @@ -190,7 +196,7 @@ var html = ''; - var cssClass = "card homePageSquareCard alternateHover bottomPaddedCard"; + var cssClass = "card squareCard alternateHover bottomPaddedCard"; html += "
"; @@ -255,7 +261,7 @@ } function cancelAuthorization(page, id) { - + Dashboard.showLoadingMsg(); // Add/Update connect info @@ -284,7 +290,7 @@ Dashboard.hideLoadingMsg(); }); - ApiClient.getJSON(ApiClient.getUrl('Connect/Pending')).done(function(pending) { + ApiClient.getJSON(ApiClient.getUrl('Connect/Pending')).done(function (pending) { renderPendingGuests(page, pending); }); @@ -315,7 +321,24 @@ } - $(document).on('pagebeforeshow', "#userProfilesPage", function () { + function showInvitePopup(page) { + + $('#popupInvite', page).popup('open'); + + $('#txtConnectUsername', page).val(''); + + } + + $(document).on('pageinit', "#userProfilesPage", function () { + + var page = this; + + $('.btnInvite', page).on('click', function () { + + showInvitePopup(page); + }); + + }).on('pagebeforeshow', "#userProfilesPage", function () { var page = this; diff --git a/dashboard-ui/userimage.html b/dashboard-ui/userimage.html index 351be6c3cd..9f628e8334 100644 --- a/dashboard-ui/userimage.html +++ b/dashboard-ui/userimage.html @@ -23,25 +23,27 @@

- -
-
+ + diff --git a/dashboard-ui/userpassword.html b/dashboard-ui/userpassword.html index 9cd832134f..d01714ec4d 100644 --- a/dashboard-ui/userpassword.html +++ b/dashboard-ui/userpassword.html @@ -16,7 +16,7 @@
-
+