Skip to content

Commit

Permalink
Make regClientScript work in the manager
Browse files Browse the repository at this point in the history
  • Loading branch information
halftrainedharry committed Feb 1, 2025
1 parent b6c21de commit 704adab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/src/Revolution/modManagerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,6 @@ public function registerCssJs()
$cssjs[] = $scr;
}


$lastjs = [];
foreach ($this->head['lastjs'] as $js) {
$lastjs[] = $js;
Expand All @@ -798,8 +797,14 @@ public function registerCssJs()
}
}


$this->modx->smarty->assign('cssjs', $cssjs);

$jsbody = [];
foreach ($this->modx->jscripts as $scr) {
$scr = $this->_postfixVersionToScript($scr, $versionPostFix);
$jsbody[] = $scr;

Check warning on line 805 in core/src/Revolution/modManagerController.php

View check run for this annotation

Codecov / codecov/patch

core/src/Revolution/modManagerController.php#L804-L805

Added lines #L804 - L805 were not covered by tests
}
$this->modx->smarty->assign('jsbody', $jsbody);
}

/**
Expand Down
4 changes: 4 additions & 0 deletions manager/templates/default/footer.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@
</div>
<!-- #modx-container -->

{foreach from=$jsbody item=scr}
{$scr}
{/foreach}

</body>
</html>

0 comments on commit 704adab

Please sign in to comment.