$(document).ready(function () { if ( $(".nav-account").length !=0) { $(".nav-account").hide(); document.querySelector('[aria-label="Sign in"]').style.visibility = 'hidden'; } $(".divider-vertical").hide(); var query = window.location.search.substring(1) if(query.length) { if(window.history != undefined && window.history.pushState != undefined) { // window.history.pushState({}, document.title, window.location.pathname); } } if($('#voco_registeredforfund').length) { if ($("#voco_registeredforfund").val()) { $('#voco_registeredforfund').remove(); $('#voco_registeredforfund_label').remove(); } else { $('#voco_registeredforfund').val(window.location); $('#voco_registeredforfund').hide(); $('#voco_registeredforfund_label').hide(); } } }); function getParameterByName( name ){ var regexS = "[\\?&]"+name+"=([^&#]*)", regex = new RegExp( regexS ), results = regex.exec( window.location.search ); if( results == null ){ return ""; } else{ return decodeURIComponent(results[1].replace(/\+/g, " ")); } } function ChangeReviewerEditToViewButton(){ let reviewContainer = document.getElementById("reviewContainer"); $("#reviewContainer tr").each(function() { if ($(this).children("td").length == 5) { if ($(this).children().eq(3).text() == 'Submitted') { if ($(this).children().eq(4).find('a').text() != 'View') $(this).children().eq(4).find('a').text('View'); } } }); } function setPortalMessageUnreadStyle(){ let portalMessageContainer = document.getElementById("portalMessageContainer"); $("#portalMessageContainer tr").each(function() { if ($(this).children("td").length == 4) { if ( $(this).children().eq(2).text() === 'Unread' && $(this).children().eq(3).text() === 'Received' ) { $(this).addClass('UnreadMessage'); } if ( $(this).children().eq(2).text() === 'Unread' && $(this).children().eq(3).text() === 'Sent' ) { if ($(this).children().eq(2).text != 'Sent') { $(this).children().eq(2).text('Sent') ; $(this).removeClass('UnreadMessage'); } } } }); } // Executes after page finishes loading. window.addEventListener('load', () => { if ( $( "#reviewContainer" ).length ) { setTimeout(ChangeReviewerEditToViewButton,500); } setTimeout(setPortalMessageUnreadStyle,2000); });