Skip to content

Commit

Permalink
Merge pull request #1737 from girder/fix-annotation-access-control
Browse files Browse the repository at this point in the history
Add a check for adding the menu item to the new-style menu
  • Loading branch information
jeffbaumes authored Dec 5, 2024
2 parents 3e2985b + b96b5d2 commit 8155a1c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ function ownAnnotation(root, folderId) {

function addAccessControl(root) {
if (root.$('.g-edit-annotation-access').length === 0) {
if (root.$('.g-folder-actions-menu > .divider').length > 0) {
if (root.$('.g-folder-actions-menu.min-w-48').length > 0) {
root.$('.g-folder-actions-menu.min-w-48').append(
'<a class="g-edit-annotation-access text-gray-700 block px-3 py-2 text-sm hover:bg-zinc-100 rounded-md">' +
'<i class="ri-lock-line pr-2"></i>Annotation access control' +
'</a>'
);
} else if (root.$('.g-folder-actions-menu > .divider').length > 0) {
root.$('.g-folder-actions-menu > .divider').before(
'<li role="presentation">' +
'<a class="g-edit-annotation-access" role="menuitem">' +
Expand Down

0 comments on commit 8155a1c

Please sign in to comment.