# STC Teamraiser Script

All code lives in the file /js/stc-teamraiser.js

# Overview

This script is embeded on the Teamraiser, entry, search, registration, personal and team pages.

# Globals

# Global libraries and dependencies

The stc-teamraiser.js relies on the following Javascript libraries, which are loaded in /js/stc-vendor.js or /js/stc-aem-vendor.js file. Additional libraries may be loaded in /js/stc-vendor.js, however, this specific script does not rely on those libraries. For the full list and differences see files /vendor-list.json & /vendor-list-aem.json in this repository.

# Key Functionality

# Code execution tree

  • When the document is ready, execute the following function calls.
    • stcTeamraiser() - Parent function for executing all scripts
    • modifyRegistrationPages() - Modifies the common registration elements.
    • modify{PageName}Page() - Modifies specific page in the registration workflow.
    • getUserInfoSetAnalytics() - Sets up user analytics when the user logs in.
    • setMarketingSourceCodes() - Sets analytics marketing source codes as source and subsource on pages with forms.

# Code structure

  • /main/stc-teamraiser.js - Initializes JavaScript execution on document ready.
  • /main/components/*.js - A list of functions that are called directly in /main/stc-teamraiser.js.
  • /main/library/*/js - A list of helper functions that are used by functions in /main/components/*.js.
  • /donation/library/merge-elements-to-row.js - A utility function that combines 2 row into 1, used on registration pages.
  • /lib/general/button-processing.js - A utility function for setting button processing state.
  • /lib/general/stc-session-storage.js - A utility class for putting data into session storage.