Skip to content

Commit

Permalink
FIX: generated site.js includes js_modules with a one-level deep folder
Browse files Browse the repository at this point in the history
  • Loading branch information
mercihabam committed Oct 21, 2024
1 parent fd2d675 commit b2958a7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
14 changes: 0 additions & 14 deletions modules/core/navigation/utils.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
const toastHTML = `
<div class="position-fixed bottom-0 start-0 p-3" style="z-index: 11">
<div class="toast bg-primary text-white" id="routing-toast" role="alert" aria-live="assertive" aria-atomic="true" data-bs-autohide="false">
<div class="toast-body">
<div class="d-flex align-items-center">
<strong>Redirecting...</strong>
<div class="spinner-border ms-auto" role="status" aria-hidden="true"></div>
</div>
</div>
</div>
</div>
`
document.body.insertAdjacentHTML('beforeend', toastHTML)

function showRoutingToast() {
window.routingToast = showLoaderToast('Redirecting...');
}
Expand Down
3 changes: 2 additions & 1 deletion scripts/config_gen.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ function get_module_assignments($settings) {
$js .= file_get_contents($js_module);
}
}
foreach (glob('modules' . DIRECTORY_SEPARATOR . $mod . DIRECTORY_SEPARATOR . 'js_modules' . DIRECTORY_SEPARATOR . '*.js') as $js_module) {
$directoriesPattern = str_replace('/', DIRECTORY_SEPARATOR, "{*,*/*}");
foreach (glob('modules' . DIRECTORY_SEPARATOR . $mod . DIRECTORY_SEPARATOR . 'js_modules' . DIRECTORY_SEPARATOR . $directoriesPattern . '*.js', GLOB_BRACE) as $js_module) {
$js .= file_get_contents($js_module);
}
if (is_readable(sprintf("modules/%s/site.js", $mod))) {
Expand Down
2 changes: 1 addition & 1 deletion tests/selenium/folder_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def hide_folders(self):
self.driver.execute_script("arguments[0].click();", hide_button)
assert self.by_class('folder_toggle').text.startswith('Show folders')
list_item = self.by_class('menu_home')
link = list_item.find_element(By.TAG_NAME, 'a');
link = list_item.find_element(By.TAG_NAME, 'a')
assert link.is_displayed() == False

def show_folders(self):
Expand Down

0 comments on commit b2958a7

Please sign in to comment.