From 2e7e5a8bcd9a4872c7d22b0f1744d47a69a825ba Mon Sep 17 00:00:00 2001 From: mattpass Date: Wed, 23 Dec 2020 17:26:31 +0000 Subject: [PATCH] Pass iceRoot in config, set in func, update display --- assets/js/icecoder.js | 4 ++++ editor.php | 2 +- lib/settings-update.php | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/assets/js/icecoder.js b/assets/js/icecoder.js index c699d40..32815f5 100644 --- a/assets/js/icecoder.js +++ b/assets/js/icecoder.js @@ -3691,6 +3691,10 @@ var ICEcoder = { useNewSettings: function(settings) { let styleNode, thisCSS, strCSS, activeLineBG; + // Set iceRoot and update in settings display + iceRoot = settings.iceRoot; + this.content.contentWindow.document.getElementById('iceRootDisplay').innerText = "" !== iceRoot ? iceRoot : "[Default]"; + // Cut out path prefix, .css file extension and ?microtime= querystring const newTheme = settings.themeURL.replace(/.+\/|.css.+/g, ""); // If theme was not changed - no need to do all these tricks diff --git a/editor.php b/editor.php index 796d465..b6c3ee3 100644 --- a/editor.php +++ b/editor.php @@ -115,7 +115,7 @@ h2 {color: rgba(0,198,255,0.7)}



-

+






diff --git a/lib/settings-update.php b/lib/settings-update.php index 782991d..7e48c29 100644 --- a/lib/settings-update.php +++ b/lib/settings-update.php @@ -119,6 +119,7 @@ if (false === $demoMode && true === isset($_SESSION['loggedIn']) && true === $_S // With all that worked out, we can now hide the settings screen and apply the new settings $jsBugFilePaths = "['" . str_replace(",", "','", str_replace(" ", "", $_POST['bugFilePaths'])) . "']"; echo ""; + "});"; }