diff --git a/client/modules/crm/src/views/calendar/modals/edit.js b/client/modules/crm/src/views/calendar/modals/edit.js index 82601c7be3..99fa3affb3 100644 --- a/client/modules/crm/src/views/calendar/modals/edit.js +++ b/client/modules/crm/src/views/calendar/modals/edit.js @@ -273,6 +273,8 @@ class CalenderEditModalView extends EditModalView { }); }); } + + setupActionItems() {} } export default CalenderEditModalView; diff --git a/client/src/helpers/action-item-setup.js b/client/src/helpers/action-item-setup.js index 83f1174f33..66c4af5cf3 100644 --- a/client/src/helpers/action-item-setup.js +++ b/client/src/helpers/action-item-setup.js @@ -34,6 +34,9 @@ import Language from 'language'; /** @module helpers/action-item-setup */ +/** + * @internal + */ class ActionItemSetupHelper { /** diff --git a/client/src/views/modals/compose-email.js b/client/src/views/modals/compose-email.js index 48a897dee7..a5e4623993 100644 --- a/client/src/views/modals/compose-email.js +++ b/client/src/views/modals/compose-email.js @@ -29,6 +29,7 @@ import EditModalView from 'views/modals/edit'; import MailtoHelper from 'helpers/misc/mailto'; import EmailScheduleSendModalView from 'views/email/modals/schedule-send'; +import ActionItemSetup from 'helpers/action-item-setup'; class ComposeEmailModalView extends EditModalView { @@ -338,6 +339,38 @@ class ComposeEmailModalView extends EditModalView { await this.assignView('dialog', view); await view.render(); } + + /** + * @protected + */ + setupActionItems() { + const actionItemSetup = new ActionItemSetup(); + + actionItemSetup.setup({ + view: this, + type: 'recordControls.compose.dropdown', + waitFunc: promise => this.wait(promise), + addFunc: item => this.addDropdownItem(item), + showFunc: name => this.showActionItem(name), + hideFunc: name => this.hideActionItem(name), + }); + + actionItemSetup.setup({ + view: this, + type: 'recordControls.composeSide.buttons', + waitFunc: promise => this.wait(promise), + addFunc: item => { + this.addButton({ + ...item, + position: 'right', + }) + }, + showFunc: name => this.showActionItem(name), + hideFunc: name => this.hideActionItem(name), + enableFunc: name => this.enableButton(name), + disableFunc: name => this.disableButton(name), + }); + } } export default ComposeEmailModalView; diff --git a/client/src/views/modals/edit.js b/client/src/views/modals/edit.js index 43355bd077..5349f1a45b 100644 --- a/client/src/views/modals/edit.js +++ b/client/src/views/modals/edit.js @@ -544,7 +544,8 @@ class EditModalView extends ModalView { } /** - * @private + * @protected + * @internal */ setupActionItems() { const actionItemSetup = new ActionItemSetup();