Skip to content

Commit

Permalink
fix passing the menu item ID
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarlovi authored Oct 4, 2023
1 parent 3c55759 commit 02a91df
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ document.addEventListener(pimcore.events.prepareObjectTreeContextMenu, function
}

const tree = event.detail.menu;
const item = event.detail.object;

Ext.create('Ext.data.Store', {
model: 'Executable',
Expand Down Expand Up @@ -36,13 +37,13 @@ document.addEventListener(pimcore.events.prepareObjectTreeContextMenu, function
exportMenu.push({
text: executable.get('name'),
iconCls: "pimcore_icon_object pimcore_icon_overlay_add",
handler: function (menuItem) {
handler: function () {
Ext.Ajax.request({
url: '/admin/process_manager/executables/run',
params: {
id: executable.id,
startupConfig: Ext.encode({
root: menuItem.$iid,
root: item.get('id'),
}),
csrfToken: pimcore.settings['csrfToken']
},
Expand Down

0 comments on commit 02a91df

Please sign in to comment.