-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(shs-5693): attached file for table wrap and table scope in text …
…area tables and add drupal behavior to vertical tabs
- Loading branch information
Mari Nez
committed
Dec 2, 2024
1 parent
e1a7c7c
commit d20ea84
Showing
4 changed files
with
29 additions
and
16 deletions.
There are no files selected for viewing
31 changes: 19 additions & 12 deletions
31
docroot/themes/humsci/humsci_basic/src/js/shared/vertical-tabs/vertical-tabs.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
function closeDetails() { | ||
// Close Revision Information Details element in Layout Builder by default. | ||
if (document.querySelector('.layout-builder-form')) { | ||
const details = document.querySelector('.layout-builder-form details'); | ||
if (details) { | ||
details.removeAttribute('open'); | ||
} | ||
} | ||
} | ||
(function (Drupal) { | ||
Drupal.behaviors.addTableScopeAttributes = { | ||
// eslint-disable-next-line no-unused-vars | ||
attach(context) { | ||
function closeDetails() { | ||
// Close Revision Information Details element in Layout Builder by default. | ||
if (document.querySelector('.layout-builder-form')) { | ||
const details = document.querySelector('.layout-builder-form details'); | ||
if (details) { | ||
details.removeAttribute('open'); | ||
} | ||
} | ||
} | ||
|
||
document.addEventListener('DOMContentLoaded', () => { | ||
closeDetails(document); | ||
}); | ||
document.addEventListener('DOMContentLoaded', () => { | ||
closeDetails(document); | ||
}); | ||
}, | ||
}; | ||
}(Drupal)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,3 @@ admin-preview: | |
css: | ||
theme: | ||
css/humsci_colorful-preview.css: {} | ||
js: | ||
js/index.js: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,3 @@ admin-preview: | |
css: | ||
theme: | ||
css/humsci_traditional-preview.css: {} | ||
js: | ||
js/index.js: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters