mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 23:26:39 +02:00
✨ Reorganize resources directory
This commit is contained in:
parent
4266d9be83
commit
d30b6ac5b9
31 changed files with 14 additions and 14 deletions
27
backend/resources/app/templates/api-doc.js
Normal file
27
backend/resources/app/templates/api-doc.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
(function() {
|
||||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
const rows = document.querySelectorAll(".rpc-row-info");
|
||||
|
||||
const onRowClick = (event) => {
|
||||
const target = event.currentTarget;
|
||||
for (let node of rows) {
|
||||
if (node !== target) {
|
||||
node.nextElementSibling.classList.add("hidden");
|
||||
} else {
|
||||
const sibling = target.nextElementSibling;
|
||||
|
||||
if (sibling.classList.contains("hidden")) {
|
||||
sibling.classList.remove("hidden");
|
||||
} else {
|
||||
sibling.classList.add("hidden");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (let node of rows) {
|
||||
node.addEventListener("click", onRowClick);
|
||||
}
|
||||
|
||||
});
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue