Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions djangocms_versioning/static/djangocms_versioning/js/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,17 @@
li_anchor.setAttribute('class', 'cms-actions-dropdown-menu-item-anchor');
li_anchor.setAttribute('href', $(item).attr('href'));

// Copy the id attribute if it is set
const itemId = $(item).attr('id');
if (itemId !== undefined) {
li_anchor.setAttribute('id', itemId);
}
// Copy the target attribute if it is set
const itemTarget = $(item).attr('target');
if (itemTarget !== undefined) {
li_anchor.setAttribute('target', itemTarget);
}

if ($(item).hasClass('cms-form-get-method')) {
li_anchor.classList.add('cms-form-get-method'); // Ensure the fake-form selector is propagated to the new anchor
}
Expand Down