mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-06 08:44:02 +01:00
Pass iceRoot in config, set in func, update display
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -115,7 +115,7 @@ h2 {color: rgba(0,198,255,0.7)}
|
||||
<span class="heading"><?php echo $t['Root'];?></span><br>
|
||||
<?php echo $docRoot;?><br><br>
|
||||
<span class="heading"><?php echo $t['ICEcoder root'];?></span><br>
|
||||
<?php echo "" !== $iceRoot ? $iceRoot : "[Default]";?><br><br>
|
||||
<div id="iceRootDisplay"><?php echo "" !== $iceRoot ? $iceRoot : "[Default]";?></div><br><br>
|
||||
<span class="heading"><?php echo $t['PHP version'];?></span><br>
|
||||
<?php echo phpversion();?><br><br>
|
||||
<span class="heading"><?php echo $t['Date & time'];?></span><br>
|
||||
|
||||
@@ -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 "<script>parent.ICEcoder.settingsScreen(true); parent.ICEcoder.useNewSettings({" .
|
||||
"iceRoot: '" . $ICEcoder["root"] . "', " .
|
||||
"themeURL: '" . $themeURL . "', " .
|
||||
"codeAssist: " . (true === $ICEcoder["codeAssist"] ? "true" : "false") . ", " .
|
||||
"lockedNav: " . (true === $ICEcoder["lockedNav"] ? "true" : "false") . ", " .
|
||||
@@ -143,6 +144,5 @@ if (false === $demoMode && true === isset($_SESSION['loggedIn']) && true === $_S
|
||||
"updateDiffOnSave: " . (true === $ICEcoder["updateDiffOnSave"] ? "true" : "false") . ", " .
|
||||
"autoLogoutMins: " . $ICEcoder["autoLogoutMins"] . ", " .
|
||||
"refreshFM: " . $refreshFM .
|
||||
"}); iceRoot = '" . $ICEcoder["root"] .
|
||||
"';</script>";
|
||||
"});</script>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user