Skip to content

Commit

Permalink
Merge pull request #139 from cfengine/master
Browse files Browse the repository at this point in the history
Fixes for copy to clipboard button and version dropdown (production)
  • Loading branch information
olehermanse authored Nov 29, 2023
2 parents 9d4e6aa + aa205b0 commit 085bec3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,8 @@ document.querySelectorAll('.dropdown-select span').forEach(item => item.onclick
const versionsDropdown = document.querySelector('.dropdown-select.versions');
if (versionsDropdown) {
versionsDropdown.querySelectorAll('.dropdown-select_options > div').forEach(item => item.addEventListener('click', e => {
const {latest, version, module} = e.target.dataset
let url = `/modules/${module}/`
if (latest !== 'true') {
url += `${version}/`;
}
window.location.href = url;
const {version, module} = e.target.dataset
window.location.href = `/modules/${module}/${version}/`;
}))
}

Expand Down
2 changes: 1 addition & 1 deletion themes/cfbs-theme/styles/less/modulePage.less
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
i.bi {
position: absolute;
right: 0;
top: 1.9rem;
top: 1.5rem;
font-size: 2.1rem;
cursor: pointer;
background: @lightGray;
Expand Down

0 comments on commit 085bec3

Please sign in to comment.