Skip to content

Commit

Permalink
no confirmation dialog before parameter opener button
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborflorian committed Aug 5, 2024
1 parent 3363c4f commit 09b4eac
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ export default function {{ containerComponentName container }}Dialog({{# unless
}
{{/ if }}
onClick={ async () => {
{{> actor/src/fragments/container/action-call-confirm-check.fragment.hbs button=button dataParam='data' }}
{{# unless (isParameterOpenerButton button) }}
{{> actor/src/fragments/container/action-call-confirm-check.fragment.hbs button=button dataParam='data' }}
{{/ unless }}
{{# if button.actionDefinition.isDeleteAction }}
actions.{{ simpleActionDefinitionName actionDefinition }}!();
{{ else }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ export default function {{ containerComponentName container }}Page ({{# unless (
disabled={ {{{ containerButtonGroupButtonDisabledConditions button container }}} }
{{/ if }}
onClick={ async () => {
{{> actor/src/fragments/container/action-call-confirm-check.fragment.hbs button=button dataParam='data' }}
{{# unless (isParameterOpenerButton button) }}
{{> actor/src/fragments/container/action-call-confirm-check.fragment.hbs button=button dataParam='data' }}
{{/ unless }}
{{# if button.actionDefinition.isDeleteAction }}
actions.{{ simpleActionDefinitionName actionDefinition }}!();
{{ else }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
loadingPosition="start"
{{/ if }}
onClick={ async () => {
{{> actor/src/fragments/container/action-call-confirm-check.fragment.hbs button=child dataParam='data' }}
{{# unless (isParameterOpenerButton child) }}
{{> actor/src/fragments/container/action-call-confirm-check.fragment.hbs button=child dataParam='data' }}
{{/ unless }}
if (actions.{{ simpleActionDefinitionName child.actionDefinition }}) {
await actions.{{ simpleActionDefinitionName child.actionDefinition }}!();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
loadingPosition="start"
{{/ if }}
onClick={ actions.{{ simpleActionDefinitionName button.actionDefinition }} ? async () => {
{{> actor/src/fragments/container/action-call-confirm-check.fragment.hbs button=button dataParam='data' }}
{{# unless (isParameterOpenerButton button) }}
{{> actor/src/fragments/container/action-call-confirm-check.fragment.hbs button=button dataParam='data' }}
{{/ unless}}
await actions.{{ simpleActionDefinitionName button.actionDefinition }}!();
} : undefined }
{{# if (containerButtonHasDisabledConditions button container) }}
Expand All @@ -46,7 +48,9 @@
id: '{{ getXMIID button }}',
label: t('{{ getTranslationKeyForVisualElement button }}', { defaultValue: '{{ button.label }}' }) as string,
onClick: actions.{{ simpleActionDefinitionName button.actionDefinition }} ? async () => {
{{> actor/src/fragments/container/action-call-confirm-check.fragment.hbs button=button dataParam='data' }}
{{# unless (isParameterOpenerButton button) }}
{{> actor/src/fragments/container/action-call-confirm-check.fragment.hbs button=button dataParam='data' }}
{{/ unless}}
await actions.{{ simpleActionDefinitionName button.actionDefinition }}!();
} : undefined,
{{# if button.icon }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
title={ t('{{ getTranslationKeyForVisualElement button }}', { defaultValue: '{{ button.label }}' }) as string }
color="primary"
onClick={ async () => {
{{> actor/src/fragments/container/action-call-confirm-check.fragment.hbs button=button dataParam='data' }}
{{# unless (isParameterOpenerButton button) }}
{{> actor/src/fragments/container/action-call-confirm-check.fragment.hbs button=button dataParam='data' }}
{{/ unless }}
await actions.{{ simpleActionDefinitionName button.actionDefinition }}!();
} }
>
Expand Down

0 comments on commit 09b4eac

Please sign in to comment.