diff --git a/Projects/Superalgos/UI/Spaces/Floating-Space/CircularMenuItem.js b/Projects/Superalgos/UI/Spaces/Floating-Space/CircularMenuItem.js index df76465e1..145073aaf 100644 --- a/Projects/Superalgos/UI/Spaces/Floating-Space/CircularMenuItem.js +++ b/Projects/Superalgos/UI/Spaces/Floating-Space/CircularMenuItem.js @@ -316,12 +316,6 @@ function newCircularMenuItem() { function onMouseClick() { if (thisObject.isEnabled === false) { return } - if (thisObject.label === undefined) { - /* This is what we have in the case of menu items that are only Icons. In this situation there is no complex logic, just execute the specified action. */ - thisObject.actionFunction({ node: thisObject.payload.node, name: thisObject.action, project: thisObject.actionProject, relatedNodeType: thisObject.relatedUiObject }) - return - } - if (thisObject.askConfirmation !== true) { /* No confirmation is needed */ if (temporaryStatus === STATUS_NO_ACTION_TAKEN_YET || temporaryStatus === STATUS_PRIMARY_WORK_DONE) { executeAction() diff --git a/Projects/Superalgos/UI/Spaces/Floating-Space/UiObjectConstructor.js b/Projects/Superalgos/UI/Spaces/Floating-Space/UiObjectConstructor.js index 53d8b71e0..54ac6658a 100644 --- a/Projects/Superalgos/UI/Spaces/Floating-Space/UiObjectConstructor.js +++ b/Projects/Superalgos/UI/Spaces/Floating-Space/UiObjectConstructor.js @@ -44,8 +44,10 @@ function newUiObjectConstructor() { payload.floatingObject = floatingObject /* - When this object is created based on a backup, share or clone, we will have a savedPayload that we will use to set the initial properties. - If it is a new object being created out of the user interface, we jusst continue with the construction process. + When this object is created based on a backup, share or clone, + we will have a savedPayload that we will use to set the initial properties. + If it is a new object being created out of the user interface, + we jusst continue with the construction process. */ if (userAddingNew === false && payload.node.type !== 'Workspace') { let position = { @@ -81,7 +83,8 @@ function newUiObjectConstructor() { } /* - For brand new objects being created directly by the user, we will make them inherit some properties + For brand new objects being created directly by the user, + we will make them inherit some properties from their closest siblings, and if they don't have, from their parents. */ @@ -365,6 +368,8 @@ function newUiObjectConstructor() { menuItemsInitialValues.push( { action: 'Parent Detach', + askConfirmation: true, + confirmationLabel: "Confirm to Detach", actionFunction: floatingObject.payload.executeAction, actionProject: 'Superalgos', label: undefined, @@ -380,6 +385,8 @@ function newUiObjectConstructor() { menuItemsInitialValues.push( { action: 'Reference Detach', + askConfirmation: true, + confirmationLabel: "Confirm to Detach", actionFunction: floatingObject.payload.executeAction, actionProject: 'Superalgos', label: undefined,