Skip to content

Commit

Permalink
After CR
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasOsti committed Oct 9, 2023
1 parent 5d24dc6 commit b888211
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
10 changes: 9 additions & 1 deletion src/bundle/Resources/public/js/scripts/embedded.item.actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,14 @@
languageCode: languages[0].languageCode,
}),
}
: { onClick: () => editContent({ contentId, locationId, languageCode: languages[0].languageCode }) };
: {
onClick: () =>
editContent({
contentId,
locationId,
languageCode: languages[0].languageCode,
}),
};

return {
label: Translator.trans(/*@Desc("Edit")*/ 'embedded_items.action.edit', {}, 'ibexa_content'),
Expand Down Expand Up @@ -226,6 +233,7 @@
container,
triggerElement,
});

menuInstance.init();
menuInstance.generateMenu({
triggerElement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,9 @@
const itemNode = itemNodes[itemNodes.length - 1];
const contentId = escapeHTML(item.ContentInfo.Content._id);
const locationId = item.id;
const currentVersionNo = item.ContentInfo.Content.CurrentVersion.Version.VersionInfo.versionNo;
const languageCodes = item.ContentInfo.Content.CurrentVersion.Version.VersionInfo.VersionTranslationInfo.Language.map(
(language) => language.languageCode,
);
const { VersionInfo } = item.ContentInfo.Content.CurrentVersion.Version;
const currentVersionNo = VersionInfo.versionNo;
const languageCodes = VersionInfo.VersionTranslationInfo.Language.map((language) => language.languageCode);
const itemActionsMenuContainer = relationsContainer.querySelector('.ibexa-embedded-item-actions__menu');
const itemActionsTriggerElement = relationsContainer.querySelector('.ibexa-embedded-item-actions__menu-trigger-btn');
const itemNodeNameCell = itemNode.querySelector('.ibexa-relations__item-name');
Expand Down

0 comments on commit b888211

Please sign in to comment.