Skip to content

Commit

Permalink
sticky sidepanel
Browse files Browse the repository at this point in the history
The ease navigation make the sidepanel sticky so it is always shown.
  • Loading branch information
mawinter69 committed Aug 10, 2023
1 parent aaa174f commit 11ffa49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<script type="text/javascript" src="${rootURL}/plugin/role-strategy/js/sticky-sidepanel.js"/>
<l:side-panel>
<l:tasks>
<l:task href="${rootURL}/manage/role-strategy/" icon="symbol-finger-print-outline plugin-ionicons-api" title="${%Manage Roles}"/>
Expand Down
4 changes: 4 additions & 0 deletions src/main/webapp/js/sticky-sidepanel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
window.addEventListener("load", function () {
const sidebar = document.querySelector("#side-panel");
sidebar.classList.add("app-page-body__sidebar--sticky");
});

0 comments on commit 11ffa49

Please sign in to comment.