function bbMenuActive() { $('#BodyId').addClass('bbMenuActive'); } function FormLoginLink() { var PageID = BLACKBAUD.netcommunity.PageID; var loginLink = $('.conditionalLogin').attr('href'); $('.conditionalLogin').attr('href', loginLink + '?rcpid=' + PageID); } function DonationForm() { $('.DonationGrid .DonationGridCell input[id*="_dgCart_btnRemove"]').each(function(){ $(this).val("X"); }); } function EcardSteps() { $('.ECardProgressIndicator div[class*="ECard"][class*="Step"]').each(function(index) { var eCardStepText = $(this).html(); var eCardStepTextSplit = eCardStepText.split('
'); $(this).html('' + (index+1) + '' + eCardStepTextSplit[1] + ''); }); } function EventCalendar() { $('.CalendarViewEventItemContainer').each(function(){ if ($(this).children().length > 0) { $(this).parent().addClass('hasEvent'); } }); $('.CalendarViewDayHeader').each(function() { var firstLetter = $(this).text().charAt(0); $(this).text(firstLetter); }); $('.CalendarViewEvent').attr('onmouseover',''); $('.CalendarViewAllDayEvent').unbind('onmouseover'); $('.CalendarViewTopLeft').append('
Prev
'); $('.CalendarViewTopRight').append('
Next
'); var currMonth = $('.CalendarViewTopLeft option:selected'); $('#prevMonth').click(function(){ currMonth.prev().attr('selected','selected'); currMonth.parent().change(); }); $('#nextMonth').click(function(){ currMonth.next().attr('selected','selected'); currMonth.parent().change(); }); var EventContents = ""; var EventListingContainerOffset = 0; var ListingOpen = false; $('.hasEvent').click(function(){ try{UnTip()}catch(x){} EventContents = $(this).children('.CalendarViewEventItemContainer').html(); $("#EventListingContainer .EventListing").html(EventContents); if($("#EventListingContainer:visible").length == 0){ $("#EventListingContainer").slideDown(); ListingOpen = false; } else{ ListingOpen = true; } if(!ListingOpen){ EventListingContainerOffset = $("#EventListingContainer").offset().top; $('html, body').animate({scrollTop: EventListingContainerOffset}, 1000); } }); $('#printStartCV').append('
Close
'); $('.closeEventItem').click(function(e){ $('#EventListingContainer').slideUp();}); if ( $('.CalendarViewContainer').length > 0 ) { $('#EventListingContainer').wrap('
') } } function EVClassicPart() { $('.EventTable table[id$="tblProgress"] th').each(function(index) { var stepText = $(this).html(); var stepTextSplit = stepText.split('>'); $(this).html('' + (index+1) + '' + stepTextSplit[1] + ''); }); $('.EventTable table[id$="tblProgress"] th').last().addClass('last'); $('div.LoginFormCheckListContainer').parent().prev('td').addClass('checklistLabelContainer'); $('td.EventItemRegistrantControlCellName').parent().parent().parent().addClass('eventAttributeContainer'); } function EventCaptureTable() { var amountCaption = $('.DonationCaptureFormTable tr[id*="trAmount"] .DonationCaptureFieldCaption').html(); var amountTotal = $('.DonationCaptureFormTable tr[id*="trAmount"] .DonationCaptureFieldControlCellAmount').html(); $('.DonationCaptureFormTable tr[id*="trAmount"]').append(''); $('.DonationCaptureFormTable tr[id*="trAmount"] .eventTransactionAmount').append(amountCaption,amountTotal); $('.DonationCaptureFormTable tr[id*="trAmount"] .DonationCaptureFieldCaption').remove(); $('.DonationCaptureFormTable tr[id*="trAmount"] .DonationCaptureFieldControlCellAmount').remove(); } function EV2Part() { $('div [id*="ev2wiz"] .BBEventRegSequenceMap').addClass('clearfix'); $('div.Ev2_PriceTypesHeader, div.Ev2_PriceTypesRow, div.Ev2_SummaryTotal, div.Ev2_RegistrantFieldCell').addClass('clearfix'); $('input[id*="txtQty"]').blur(function() { var $targetSpan = $(this).parent().nextAll('.Ev2_PriceTypeValidatorColumn').children('span.Ev2_Step1QtyValidation'); setTimeout(function(){ if ($targetSpan.css('visibility') == 'visible') { $targetSpan.parent().addClass('validationActive'); } else { $targetSpan.parent().removeClass('validationActive'); } },500); }); } // giving search part function givingSearch() { $('.GivingSearchPagination').addClass('clearfix'); } function ProfileUpdateForm() { $('label[for*="private"]').each(function(){ $(this).html("Private"); }); } function jobBoard() { $('.JobResultsDeleteButton').each(function(){ $(this).text('Delete'); }); } function PersonalNotesPart() { $('#tblNote #trNote .BBNotesNoteCell').each(function(){ $(this).attr('colspan',"5"); }); $('#tblNote #trNoteData').each(function(){ $('+').appendTo(this); $(this).on('click',function(){ $(this).siblings('#tblNote #trNote').slideToggle(300); }); }); } function billMeLaterForm() { $('.BML_Content > div').addClass('clearfix'); $('.BML_Content div[id*="ctlBillMeLater_divADDR"] > div').addClass('clearfix'); } // Functions for BBNC var bbpage = Sys.WebForms.PageRequestManager.getInstance(); bbpage.add_pageLoaded(function(){ // check for bbMenu and add body class for the masthead if ( $('div[id*="AdminMenuDiv"].bb_menu').length > 0 ) { bbMenuActive(); } // fire custom login link function if ($('.conditionalLogin').length > 0) { FormLoginLink(); } // fire donation form functions if ($('.DonationFormTable').length > 0) { // DonationForm(); } // Ecards if ($('.ECardProgressIndicator').length > 0) { EcardSteps(); } // Event Calendar if ($('.CalendarViewContainer').length > 0) { EventCalendar(); }; // Event Registration Classic Form if($('.EventTable .EventProgressCell').length > 0) { EVClassicPart(); }; // Event Registration Classic Form - Payment if ($('.EventTable .DonationCaptureFormTable').length > 0) { EventCaptureTable(); } // Event Registration 2.0 classes and behavior for responsive if ($('.BBEventRegSequenceMap').length > 0) { EV2Part(); }; if ($('.GivingSearchPagination').length > 0) { givingSearch(); } // User Profile Form if ($('.ProfileFormTable').length > 0) { ProfileUpdateForm(); } // job board part if ($('.JobBoardListingTable').length > 0) { jobBoard(); } // fire personal notes functions if ($('.BBNotesList').length > 0) { PersonalNotesPart(); } // bill me later classes and behavior for responsive if ( $('.BML_Content').length > 0 ) { billMeLaterForm(); } });