Something went wrong

We're sorry, but something went wrong. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

Click here to return to the homepage.

Copyright 2020 Dell Technologies. All Rights Reserved.
; var friendsListData = {"success":true,"data":{"totalFriends":0,"friends":[]}}; var uccContentType = 'All'; var selectedAchievement = ''; function unequipArtifact(id, position) { const content = { artifactId: id, position: position }; let url; url = `/unequip-user-artifact`; $.ajax({ url: url, type: 'post', data: JSON.stringify(content), success: function (r) { window.location.hash = '#artifacts-room'; window.location.reload(true); }, error: function (e) { console.log(e); } }); } Handlebars.registerHelper('json', function(context) { return JSON.stringify(context); }); $(document).on('click', '.change-artifact-modal', function (e) { const id = $(this).data('id'); const title = $(this).data('title'); const upgradeCost = $(this).data('upgradeCost'); const upgradeText = $(this).data('upgradeText'); const isMaxLevel = $(this).data('maxLevel'); //clean up previous selections $('.modal-slot').removeClass('modal-slot-selected'); $('#artifact-modal').data('content-id', id); $('#artifact-modal .modal-title').text(title); $('#artifact-modal #artifact-equip-tab').tab('show'); $('#artifact-modal #artifact-upgrade-details').html(upgradeText); $('#artifact-modal #artifact-upgrade-cost').html(upgradeCost); $('#artifact-modal #artifact-upgrade-max-level').hide(); $('#artifact-modal #artifact-upgrade-upgradeable').hide(); if (isMaxLevel) { $('#artifact-modal #artifact-upgrade-max-level').show(); } else { $('#artifact-modal #artifact-upgrade-upgradeable').show(); } $('#fragment-balance').text(fragment_balance); }); $(document).on('click', '.modal-slot:not(.disabled)', function (e) { $('.modal-slot').removeClass('modal-slot-selected'); $(this).addClass('modal-slot-selected'); }); $(document).on('click', '#artifact-modal .nav-link', function(e) { const btnText = $(this).data('button-text') ?? 'Save changes'; $('#save-artifact-changes').text(btnText); }); $(document).on('click', '.artifact-type[data-type]', function(e) { const type = $(this).data('type'); $('.artifact-type').removeClass('active'); $(this).addClass('active'); if (type == 'all') { $('.artifact-section').addClass('active active-all'); } else { $('.artifact-section').removeClass('active active-all'); $(`#${type}-section`).addClass('active'); } $('.artifact-type-select, .artifact-type-select-toggle').toggleClass('expanded'); }); $(document).on('click', '#save-artifact-changes', function (e) { const $activeTab = $('#artifact-modal .nav-link.active'); const id = $('#artifact-modal').data('content-id'); const content = { artifactId: id }; let url; if ($activeTab.attr('id') == 'artifact-equip-tab') { const position = $('#artifact-modal').find('.modal-slot-selected').data('position'); url = `/change-user-artifacts`; content.position = position; } else if ($activeTab.attr('id') == 'artifact-upgrade-tab') { url = `/upgrade-user-artifact`; } else { return; } $.ajax({ url: url, type: 'post', data: JSON.stringify(content), success: function (r) { window.location.hash = '#artifacts-room'; window.location.reload(true); } }); }); function loadUserContentPage(contentType, page) { contentType = contentType || 'All'; page = page || 1; var url = '/ucf/user/7575166/__CONTENT_TYPE__/__PAGE__'; url = url.replace('__CONTENT_TYPE__', contentType).replace('__PAGE__', page); $('#user-profile__user-content-container').load(url, function() { }); } function initButtons() { if (isCurrentUser) { $('[data-is-current-user="true"]').show(); $('[data-is-current-user="false"]').remove(); } else { $('[data-is-current-user="true"]').remove(); $('[data-is-current-user="false"]').show(); } if (isCurrentUser || is_admin) { $('[data-is-current-user-or-admin="true"]').show(); $('[data-is-current-user-or-admin="false"]').hide(); } else { $('[data-is-current-user-or-admin="true"]').hide(); $('[data-is-current-user-or-admin="false"]').show(); } if (!user_is_logged_in) { $('.list-profile-actions').hide(); $('.btn-remove-message').hide(); } if (isFriendData.isFriend) { $('.btn-add-friend').toggleClass('btn-add-friend btn-remove-friend').html('').attr('title', 'Remove Friend'); $('[data-toggle="tooltip"]').tooltip(); } if ($('.user-about').height() < $('.user-about').prop('scrollHeight')) { $('.btn-show-more-about').show(); } else { $('.btn-show-more-about').hide(); } $('.btn-add-friend').on('click', function (e) { handleAddFriend(e); }); $('.btn-remove-friend').on('click', function (e) { handleRemoveFriend(e); }); $('.btn-add-message').on('click', function (e) { if (!user_is_logged_in) { window.location = '/login'; return; } var content = {content:$('.message-content').val()}; $.ajax({ url: '/chatwall/add/7575166', type: 'post', data: JSON.stringify(content), success: function (r) { if (r.success) { var $rendered = $(chatWallMsgTemplate(r.data)); if (isCurrentUser) { $('[data-is-current-user="true"]', $rendered).show(); $('[data-is-current-user="false"]', $rendered).hide(); } else { $('[data-is-current-user="true"]', $rendered).hide(); $('[data-is-current-user="false"]', $rendered).show(); } $('.btn-remove-message', $rendered).on('click', removeMessage); $('.user-profile__inbox-message-list').append($rendered); $('.alert-container').append($('

'+r.message+'

')); setTimeout(function () { $('.alert-success').fadeOut(300, function () { $(this).remove() }); }, 5000); $('.timeago').timeago(); $('.message-content').val(''); $('.user-profile__inbox-messages').mCustomScrollbar('scrollTo', 'bottom', { scrollInertia: 300 }); } else { $('.alert-container').append($('

Something went wrong!

')); setTimeout(function () { $('.alert-danger').fadeOut(300, function () { $(this).remove() }); }, 5000); } } }); }); $('.btn-remove-message').on('click', removeMessage); $('.um-profile__ucc-filter').on('click', function(e) { e.preventDefault(); var $filter = $(this); $('.um-profile__ucc-filter').removeClass('active'); $filter.addClass('active'); $('.user-profile__filter').removeClass('expanded'); var contentType = $filter.data('contentType'); loadUserContentPage(contentType, 1); }); $('body').on('click', '#user-profile__user-content-container .pagination li a', function(e){ e.preventDefault(); var $ele = $(this); var href = $ele.data('href'); $.ajax({ url: href, type: 'get', success: function(data) { $('#user-profile__user-content-container').empty(); $('#user-profile__user-content-container').append(data); }, error: function(data) {} }) }); $('body').on('click', '#user-profile__user-content-list .user-profile__user-content', function(e){ e.preventDefault(); var $ele = $(this); var href = $ele.data('href'); window.location.href = href; }); } function removeMessage (e) { e.preventDefault(); if (!user_is_logged_in) { window.location = '/login'; } var btn = $(this); var messageId = $(this).data('id'); $.ajax({ url: '/chatwall/remove'+'/'+messageId, type: 'post', success: function (r) { if (r.success) { btn.parent().remove(); } } }); } function handleAddFriend(e) { e.preventDefault(); if (!user_is_logged_in) { window.location = '/login'; } var btn = $(e.currentTarget); btn.unbind('click'); $.ajax({ url: '/relay/follow', type: 'post', data: JSON.stringify({targetId:'7575166'}), success: function (r) { if (r.success) { btn.toggleClass('btn-add-friend btn-remove-friend') .html('') .attr('data-title', 'Remove Friend') .attr('data-original-title', 'Remove Friend') .tooltip('show'); $('.alert-container').append($('

'+r.message+'

')); setTimeout(function () { $('.alert-success').fadeOut(300, function () { $(this).remove() }); }, 5000); btn.bind('click', handleRemoveFriend); } } }); } function handleRemoveFriend(e) { e.preventDefault(); if (!user_is_logged_in) { window.location = '/login'; } var btn = $(e.currentTarget); btn.unbind('click'); $.ajax({ url: '/relay/unfollow', type: 'post', data: JSON.stringify({targetId:'7575166'}), success: function (r) { if (r.success) { btn.toggleClass('btn-add-friend btn-remove-friend') .html('') .attr('data-title', 'Add Friend') .attr('data-original-title', 'Add Friend') .tooltip('show'); $('.alert-container').append($('

'+r.message+'

')); setTimeout(function () { $('.alert-success').fadeOut(300, function () { $(this).remove() }); }, 5000); btn.bind('click', handleAddFriend); } } }); } function removeFeaturedAchievement(id, position) { var idObject = {achievementId: id}; $.ajax({ url: '/ajax/user/achievements/remove/7575166', type: 'POST', data: JSON.stringify(idObject), success: function(data) { if(data.success == "true") { $(".achievement-badge-"+position).replaceWith(''); $('.alert-container').append($('

Featured Achievement Removed

')); } } }); } function addFeaturedAchievement(pos) { if(selectedAchievement != "") { var dataObject = new Object(); dataObject.achievementId = selectedAchievement; dataObject.pos = pos; $.ajax({ url: '/ajax/user/achievements/add/7575166', type: 'POST', data: dataObject, success: function(data) { if(data.success == "true") { $(".achievement-badge-empty-"+pos).replaceWith(''); $('.alert-container').append($('

Featured Achievement Added

')); } } }); } } function updatedSelectedAchievement(divId) { //If a selected achievement is clicked again, unselect if(divId == selectedAchievement) { var oldAchievement = '#' + selectedAchievement; if(oldAchievement != '#') { $(oldAchievement).removeClass('selected-achievement'); } selectedAchievement = ''; }else { var oldAchievement = '#' + selectedAchievement; if(oldAchievement != '#') { $(oldAchievement).removeClass('selected-achievement'); } selectedAchievement = divId; var newAchievement = '#' + selectedAchievement; $(newAchievement).addClass('selected-achievement'); } } function loadFriends(page) { const resultsPerPage = 18; const friendContainer = $('#friends'); const paginationFooter = $('.user-profile__card-footer.pagination'); var numFriends = friendsListData.data.totalFriends; friendContainer.empty(); var startingIndex = (page - 1) * resultsPerPage; var endingIndex = page * resultsPerPage; if (endingIndex > numFriends) { endingIndex = numFriends; } for (var i = startingIndex; i < endingIndex; i++) { friendContainer.append(`
`); } if (startingIndex < resultsPerPage) { $('#pagination-previous').attr('disabled', true); } else { $('#pagination-previous').attr('disabled', false); } if (endingIndex >= numFriends) { $('#pagination-next').attr('disabled', true); $('#pagination-max').text(numFriends); } else { $('#pagination-next').attr('disabled', false); $('#pagination-max').text((page * resultsPerPage)); } $('#pagination-min').text(page > 1 ? (page - 1) * resultsPerPage : 1); paginationFooter.attr('id', `page-${page}`); } function initFriendsPagination() { const resultsPerPage = 18; var numFriends = friendsListData.data.totalFriends; $('#pagination-min').text(numFriends > 0 ? '1' : '0'); if (numFriends < resultsPerPage) { $('#pagination-max').text(numFriends); } else { $('#pagination-max').text(resultsPerPage); } $('#pagination-total').text(numFriends); $('#pagination-previous').attr('disabled', true); if (numFriends > 0) { loadFriends(1); } else { $('#pagination-next').attr('disabled', true); } } function initBaseProfile() { initButtons(); initFriendsPagination(); const paginationFooter = $('.user-profile__card-footer.pagination'); $('#pagination-previous').on('click', function () { loadFriends(parseInt(paginationFooter.attr('id').substring(5)) - 1) }); $('#pagination-next').on('click', function () { loadFriends(parseInt(paginationFooter.attr('id').substring(5)) + 1) }); }