From 3224f24412ed447407240db5eda5fe6570bf8fde Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Tue, 1 Oct 2024 17:42:44 +0800 Subject: [PATCH] pkp/pkp-lib#10444 Add modalStyle param to existing openDialog calls --- src/components/ActionPanel/ActionPanel.stories.js | 1 + src/components/Composer/Composer.vue | 1 + src/components/Container/DecisionPage.vue | 2 ++ src/components/Container/ManageEmailsPage.vue | 5 ++++- src/components/Container/SubmissionWizardPage.vue | 2 ++ src/components/Container/WorkflowPage.vue | 1 + src/components/Form/context/NotifyUsersForm.vue | 1 + src/components/Form/fields/FieldShowEnsuringLink.vue | 3 ++- .../ListPanel/announcements/AnnouncementsListPanel.vue | 4 ++-- .../ListPanel/contributors/ContributorsListPanel.vue | 1 + src/components/ListPanel/doi/DoiListPanel.vue | 1 + src/components/ListPanel/highlights/HighlightsListPanel.vue | 4 ++-- .../ListPanel/institutions/InstitutionsListPanel.vue | 4 ++-- .../ListPanel/submissionFiles/SubmissionFilesListPanel.vue | 4 ++-- src/components/ListPanel/submissions/SubmissionsListItem.vue | 4 ++-- src/mixins/ajaxError.js | 1 + src/mixins/autosave.js | 1 + .../components/publication/WorkflowPublicationJats.vue | 1 + .../publication/WorkflowPublicationSectionJats.vue | 1 + src/stores/modalStore.js | 1 + 20 files changed, 31 insertions(+), 12 deletions(-) diff --git a/src/components/ActionPanel/ActionPanel.stories.js b/src/components/ActionPanel/ActionPanel.stories.js index 887cc67ca..ec02c6f6b 100644 --- a/src/components/ActionPanel/ActionPanel.stories.js +++ b/src/components/ActionPanel/ActionPanel.stories.js @@ -35,6 +35,7 @@ export const Default = { callback: (close) => close(), }, ], + modalStyle: 'negative', }); } return { diff --git a/src/components/Composer/Composer.vue b/src/components/Composer/Composer.vue index 0c740dbae..87abe7085 100644 --- a/src/components/Composer/Composer.vue +++ b/src/components/Composer/Composer.vue @@ -906,6 +906,7 @@ export default { callback: (close) => close(), }, ], + modalStyle: 'primary', }); }, diff --git a/src/components/Container/DecisionPage.vue b/src/components/Container/DecisionPage.vue index be9b2c579..2a3f9ee7e 100644 --- a/src/components/Container/DecisionPage.vue +++ b/src/components/Container/DecisionPage.vue @@ -182,6 +182,7 @@ export default { callback: (close) => close(), }, ], + modalStyle: 'negative', }); }, @@ -266,6 +267,7 @@ export default { message: this.decisionCompleteDescription, actions, close, + modalStyle: 'success', }); }, diff --git a/src/components/Container/ManageEmailsPage.vue b/src/components/Container/ManageEmailsPage.vue index d685a9b1b..86cdfb11e 100644 --- a/src/components/Container/ManageEmailsPage.vue +++ b/src/components/Container/ManageEmailsPage.vue @@ -151,6 +151,7 @@ export default { callback: (close) => close(), }, ], + modalStyle: 'negative', }); }, @@ -187,6 +188,7 @@ export default { callback: (close) => close(), }, ], + modalStyle: 'negative', }); }, @@ -224,6 +226,7 @@ export default { callback: (close) => close(), }, ], + modalStyle: 'negative', }); }, @@ -325,7 +328,7 @@ export default { title: mailable ? mailable.name : '', mailable: this.currentMailable, onOpenTemplate: this.openTemplate, - onConfirmResetTemplate: this.confirmRemoveTemplate, + onConfirmResetTemplate: this.confirmResetTemplate, onConfirmRemoveTemplate: this.confirmRemoveTemplate, }); }); diff --git a/src/components/Container/SubmissionWizardPage.vue b/src/components/Container/SubmissionWizardPage.vue index cc49e8a61..d9fbc8bc3 100644 --- a/src/components/Container/SubmissionWizardPage.vue +++ b/src/components/Container/SubmissionWizardPage.vue @@ -432,6 +432,7 @@ export default { callback: (close) => close(), }, ], + modalStyle: 'negative', }); }, @@ -661,6 +662,7 @@ export default { callback: (close) => close(), }, ], + modalStyle: 'primary', }); }, diff --git a/src/components/Container/WorkflowPage.vue b/src/components/Container/WorkflowPage.vue index abca15ab5..bd880fd03 100644 --- a/src/components/Container/WorkflowPage.vue +++ b/src/components/Container/WorkflowPage.vue @@ -352,6 +352,7 @@ export default { callback: (close) => close(), }, ], + modalStyle: 'primary', }); }, diff --git a/src/components/Form/context/NotifyUsersForm.vue b/src/components/Form/context/NotifyUsersForm.vue index c7b6d7adb..5cf6a10a8 100644 --- a/src/components/Form/context/NotifyUsersForm.vue +++ b/src/components/Form/context/NotifyUsersForm.vue @@ -53,6 +53,7 @@ export default { callback: (close) => close(), }, ], + modalStyle: 'primary', }); }, }, diff --git a/src/components/Form/fields/FieldShowEnsuringLink.vue b/src/components/Form/fields/FieldShowEnsuringLink.vue index 078da1856..92f7acd4e 100644 --- a/src/components/Form/fields/FieldShowEnsuringLink.vue +++ b/src/components/Form/fields/FieldShowEnsuringLink.vue @@ -23,7 +23,7 @@ export default { }, mounted() { /** - * Show the requested message in a modal when the link in the messgae is + * Show the requested message in a modal when the link in the message is * clicked. */ $('.pkpFormField--options__option button', this.$el).click(() => { @@ -36,6 +36,7 @@ export default { callback: (close) => { close(); }, + modalStyle: 'primary', }, { height: 'auto', diff --git a/src/components/ListPanel/announcements/AnnouncementsListPanel.vue b/src/components/ListPanel/announcements/AnnouncementsListPanel.vue index 916245723..e4f9ef03c 100644 --- a/src/components/ListPanel/announcements/AnnouncementsListPanel.vue +++ b/src/components/ListPanel/announcements/AnnouncementsListPanel.vue @@ -209,7 +209,7 @@ export default { actions: [ { label: this.t('common.yes'), - isPrimary: true, + isWarnable: true, callback: (close) => { var self = this; $.ajax({ @@ -233,10 +233,10 @@ export default { }, { label: this.t('common.no'), - isWarnable: true, callback: (close) => close(), }, ], + modalStyle: 'negative', }); }, diff --git a/src/components/ListPanel/contributors/ContributorsListPanel.vue b/src/components/ListPanel/contributors/ContributorsListPanel.vue index 6ac8992b1..c665bdaa6 100644 --- a/src/components/ListPanel/contributors/ContributorsListPanel.vue +++ b/src/components/ListPanel/contributors/ContributorsListPanel.vue @@ -359,6 +359,7 @@ export default { callback: (close) => close(), }, ], + modalStyle: 'negative', }); }, diff --git a/src/components/ListPanel/doi/DoiListPanel.vue b/src/components/ListPanel/doi/DoiListPanel.vue index cdc06db7a..65609012d 100644 --- a/src/components/ListPanel/doi/DoiListPanel.vue +++ b/src/components/ListPanel/doi/DoiListPanel.vue @@ -789,6 +789,7 @@ export default { callback: (close) => close(), }, ], + modalStyle: 'primary', }); }, /** diff --git a/src/components/ListPanel/highlights/HighlightsListPanel.vue b/src/components/ListPanel/highlights/HighlightsListPanel.vue index f245415c1..a8257c884 100644 --- a/src/components/ListPanel/highlights/HighlightsListPanel.vue +++ b/src/components/ListPanel/highlights/HighlightsListPanel.vue @@ -228,7 +228,7 @@ export default { actions: [ { label: this.t('common.yes'), - isPrimary: true, + isWarnable: true, callback: (close) => { $.ajax({ url: this.apiUrl + '/' + id, @@ -251,10 +251,10 @@ export default { }, { label: this.t('common.no'), - isWarnable: true, callback: (close) => close(), }, ], + modalStyle: 'negative', }); }, diff --git a/src/components/ListPanel/institutions/InstitutionsListPanel.vue b/src/components/ListPanel/institutions/InstitutionsListPanel.vue index 59240f1ca..33e19e4fc 100644 --- a/src/components/ListPanel/institutions/InstitutionsListPanel.vue +++ b/src/components/ListPanel/institutions/InstitutionsListPanel.vue @@ -211,7 +211,7 @@ export default { actions: [ { label: this.t('common.yes'), - isPrimary: true, + isWarnable: true, callback: (close) => { var self = this; $.ajax({ @@ -235,10 +235,10 @@ export default { }, { label: this.t('common.no'), - isWarnable: true, callback: (close) => close(), }, ], + modalStyle: 'negative', }); }, diff --git a/src/components/ListPanel/submissionFiles/SubmissionFilesListPanel.vue b/src/components/ListPanel/submissionFiles/SubmissionFilesListPanel.vue index 229f16639..897c46d49 100644 --- a/src/components/ListPanel/submissionFiles/SubmissionFilesListPanel.vue +++ b/src/components/ListPanel/submissionFiles/SubmissionFilesListPanel.vue @@ -259,7 +259,7 @@ export default { actions: [ { label: this.t('common.yes'), - isPrimary: true, + isWarnable: true, callback: (close) => { $.ajax({ url: this.apiUrl + '/' + item.id + '?stageId=' + this.stageId, @@ -281,10 +281,10 @@ export default { }, { label: this.t('common.no'), - isWarnable: true, callback: (close) => close(), }, ], + modalStyle: 'negative', }); }, diff --git a/src/components/ListPanel/submissions/SubmissionsListItem.vue b/src/components/ListPanel/submissions/SubmissionsListItem.vue index 84fb6e968..e66332bf6 100644 --- a/src/components/ListPanel/submissions/SubmissionsListItem.vue +++ b/src/components/ListPanel/submissions/SubmissionsListItem.vue @@ -813,15 +813,15 @@ export default { actions: [ { label: this.t('common.yes'), - isPrimary: true, + isWarnable: true, callback: this.deleteSubmission, }, { label: this.t('common.no'), - isWarnable: true, callback: (close) => close(), }, ], + modalStyle: 'negative', }); }, diff --git a/src/mixins/ajaxError.js b/src/mixins/ajaxError.js index dc8d35f1c..20ad96216 100644 --- a/src/mixins/ajaxError.js +++ b/src/mixins/ajaxError.js @@ -52,6 +52,7 @@ export default { callback: (close) => close(), }, ], + modalStyle: 'negative', }); }, }, diff --git a/src/mixins/autosave.js b/src/mixins/autosave.js index f66f9d1f4..1103d1f4a 100644 --- a/src/mixins/autosave.js +++ b/src/mixins/autosave.js @@ -169,6 +169,7 @@ export default { }, }, ], + modalStyle: 'primary', }); }); }, diff --git a/src/pages/workflow/components/publication/WorkflowPublicationJats.vue b/src/pages/workflow/components/publication/WorkflowPublicationJats.vue index f7c5bab8c..58a01f1ce 100644 --- a/src/pages/workflow/components/publication/WorkflowPublicationJats.vue +++ b/src/pages/workflow/components/publication/WorkflowPublicationJats.vue @@ -267,6 +267,7 @@ export default { callback: (close) => close(), }, ], + modalStyle: 'negative', }); }, diff --git a/src/pages/workflow/components/publication/WorkflowPublicationSectionJats.vue b/src/pages/workflow/components/publication/WorkflowPublicationSectionJats.vue index 005d3d03d..2975647f7 100644 --- a/src/pages/workflow/components/publication/WorkflowPublicationSectionJats.vue +++ b/src/pages/workflow/components/publication/WorkflowPublicationSectionJats.vue @@ -276,6 +276,7 @@ export default { callback: (close) => close(), }, ], + modalStyle: 'negative', }); }, diff --git a/src/stores/modalStore.js b/src/stores/modalStore.js index beac13296..cee6ccf9f 100644 --- a/src/stores/modalStore.js +++ b/src/stores/modalStore.js @@ -51,6 +51,7 @@ export const useModalStore = defineStore('modal', () => { callback: (close) => close(), }, ], + modalStyle: 'negative', }); }