Skip to content

Commit

Permalink
Add a check for adding the menu item to^Che new-style menu
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffbaumes committed Dec 5, 2024
1 parent 3e2985b commit b96b5d2
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 b96b5d2

Please sign in to comment.