From 3b821a0a3430a56a1ddacc003b86dad93d3014f4 Mon Sep 17 00:00:00 2001 From: Geoffroy Arnoud Date: Mon, 25 Mar 2019 11:53:42 +0100 Subject: [PATCH] Added $apiURL param Changed when select2Functions.js is loaded #K69 --- etc/config.dist.php | 3 ++- www/js/embeddedWAYF.js | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/etc/config.dist.php b/etc/config.dist.php index a30764d..2d9375c 100644 --- a/etc/config.dist.php +++ b/etc/config.dist.php @@ -244,7 +244,8 @@ // the WAYF script. //$javascriptURL = 'https://ds.example.org/SWITCHwayf/js'; - +// Abolute URL to point to APIs +//$apiURL = 'https://ds.example.org/SWITCHwayf/api'; // 5. Appearance Settings //************************** diff --git a/www/js/embeddedWAYF.js b/www/js/embeddedWAYF.js index d51532b..ba2fce6 100644 --- a/www/js/embeddedWAYF.js +++ b/www/js/embeddedWAYF.js @@ -672,12 +672,6 @@ var head = document.getElementsByTagName('head')[0]; var select2Loaded = false; - var select2Functions = document.createElement('script'); - select2Functions.src = "/select2Functions.js"; - select2Functions.type = 'text/javascript'; - - head.appendChild(select2Functions); - var script = document.createElement('script'); script.src = '/jquery.js'; script.type = 'text/javascript'; @@ -710,6 +704,12 @@ // Load Select2 JS var head = document.getElementsByTagName('head')[0]; + var select2Functions = document.createElement('script'); + select2Functions.src = "/select2Functions.js"; + select2Functions.type = 'text/javascript'; + + head.appendChild(select2Functions); + var select2Script = document.createElement('script'); select2Script.src = ""; select2Script.type = 'text/javascript'; -- GitLab