History 2015-09-08 - GAC - Initial version. 2017-11-06 - GAC - Set up to only load jQuery and jQuery migrate Updated to change loading type from early to late ---> if ( !structKeyExists(attributes, "loadingType") ) attributes.loadingType = "early"; // options: late / early if ( !structKeyExists(attributes, "updateExisting") ) attributes.updateExisting = 0; /* PRIMARY - MAJOR LIBRARIES */ // these are the only js we load in the head by default, because they're called so much by existing code // even code that defers actual execution probably does that with the jQuery document ready function /* START - jQuery Resource Updater */ regData = []; regItem = {}; regItem.version = "1.12"; regItem.alias = ""; // Current Active Alias regItem.adf = "2.0"; regItem.loadingType = attributes.loadingType; regItem.update = attributes.updateExisting; arrayAppend(regData,regItem); regItem = {}; regItem.version = "2.2"; regItem.alias = "_2_2"; regItem.adf = "2.1"; regItem.loadingType = attributes.loadingType; regItem.update = attributes.updateExisting; arrayAppend(regData,regItem); regItem = {}; regItem.version = "3.2"; regItem.alias = "_3_2"; regItem.adf = "2.1"; regItem.loadingType = attributes.loadingType; regItem.update = attributes.updateExisting; arrayAppend(regData,regItem); resourceProps = {}; for ( i=1; i LTE ArrayLen(regData); i=i+1 ) { resourceProps = [{LoadTagType=2, SourceURL="/ADF/thirdParty/jquery/jquery-#regData[i].version#.js", canMinify=0, canCombine=0}]; resourcePropsEarly = []; resourcePropsLate = []; if ( regItem.loadingType EQ "early" ) resourcePropsEarly = resourceProps; else resourcePropsLate = resourceProps; application.ADF.scriptsService.registerResource ( "jQuery #regData[i].version#", "PRIMARY", resourcePropsEarly, resourcePropsLate, "jQuery resources.", "Included in ADF #regData[i].adf# and later.", "jQuery#regData[i].alias#" ,0,regData[i].update,0 ); } /* END - jQuery Resource Updater */ /* START - jQuery Migrate Resource Updater */ regData = []; regItem = {}; regItem.version = "1.2"; regItem.alias = "_1_2"; regItem.adf = "2.0"; regItem.loadingType = attributes.loadingType; regItem.update = 1; // Update Previous Version arrayAppend(regData,regItem); regItem = {}; regItem.version = "1.4"; regItem.alias = ""; // Current Active Alias regItem.adf = "2.1"; regItem.loadingType = attributes.loadingType; regItem.update = attributes.updateExisting; arrayAppend(regData,regItem); regItem = {}; regItem.version = "3.0"; regItem.alias = "_3_0"; regItem.adf = "2.1"; regItem.loadingType = attributes.loadingType; regItem.update = attributes.updateExisting; arrayAppend(regData,regItem); resourceProps = {}; for ( i=1; i LTE ArrayLen(regData); i=i+1 ) { resourceProps = [{LoadTagType=2, SourceURL="/ADF/thirdParty/jquery/migrate/jquery-migrate-#regData[i].version#.js", canMinify=0, canCombine=0}]; resourcePropsEarly = []; resourcePropsLate = []; if ( regItem.loadingType EQ "early" ) resourcePropsEarly = resourceProps; else resourcePropsLate = resourceProps; application.ADF.scriptsService.registerResource ( "jQueryMigrate #regData[i].version#", "PRIMARY", resourcePropsEarly, resourcePropsLate, "jQueryMigrate resources.", "Included in ADF #regData[i].adf# and later.", "jQueryMigrate#regData[i].alias#" ,0,regData[i].update,0 ); } /* END - jQuery Migrate Resource Updater */

jQuery Resources Registered.