Skip to content

Commit

Permalink
pkp/pkp-lib#10444 Add modalStyle param to existing openDialog calls
Browse files Browse the repository at this point in the history
  • Loading branch information
blesildaramirez committed Oct 8, 2024
1 parent 59e465d commit 3224f24
Show file tree
Hide file tree
Showing 20 changed files with 31 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/components/ActionPanel/ActionPanel.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const Default = {
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
}
return {
Expand Down
1 change: 1 addition & 0 deletions src/components/Composer/Composer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'primary',
});
},
Expand Down
2 changes: 2 additions & 0 deletions src/components/Container/DecisionPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
},
Expand Down Expand Up @@ -266,6 +267,7 @@ export default {
message: this.decisionCompleteDescription,
actions,
close,
modalStyle: 'success',
});
},
Expand Down
5 changes: 4 additions & 1 deletion src/components/Container/ManageEmailsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
},
Expand Down Expand Up @@ -187,6 +188,7 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
},
Expand Down Expand Up @@ -224,6 +226,7 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
},
Expand Down Expand Up @@ -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,
});
});
Expand Down
2 changes: 2 additions & 0 deletions src/components/Container/SubmissionWizardPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
},
Expand Down Expand Up @@ -661,6 +662,7 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'primary',
});
},
Expand Down
1 change: 1 addition & 0 deletions src/components/Container/WorkflowPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'primary',
});
},
Expand Down
1 change: 1 addition & 0 deletions src/components/Form/context/NotifyUsersForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'primary',
});
},
},
Expand Down
3 changes: 2 additions & 1 deletion src/components/Form/fields/FieldShowEnsuringLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand All @@ -36,6 +36,7 @@ export default {
callback: (close) => {
close();
},
modalStyle: 'primary',
},
{
height: 'auto',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export default {
actions: [
{
label: this.t('common.yes'),
isPrimary: true,
isWarnable: true,
callback: (close) => {
var self = this;
$.ajax({
Expand All @@ -233,10 +233,10 @@ export default {
},
{
label: this.t('common.no'),
isWarnable: true,
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
},
Expand Down
1 change: 1 addition & 0 deletions src/components/ListPanel/doi/DoiListPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'primary',
});
},
/**
Expand Down
4 changes: 2 additions & 2 deletions src/components/ListPanel/highlights/HighlightsListPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export default {
actions: [
{
label: this.t('common.yes'),
isPrimary: true,
isWarnable: true,
callback: (close) => {
$.ajax({
url: this.apiUrl + '/' + id,
Expand All @@ -251,10 +251,10 @@ export default {
},
{
label: this.t('common.no'),
isWarnable: true,
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export default {
actions: [
{
label: this.t('common.yes'),
isPrimary: true,
isWarnable: true,
callback: (close) => {
var self = this;
$.ajax({
Expand All @@ -235,10 +235,10 @@ export default {
},
{
label: this.t('common.no'),
isWarnable: true,
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -281,10 +281,10 @@ export default {
},
{
label: this.t('common.no'),
isWarnable: true,
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/ListPanel/submissions/SubmissionsListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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',
});
},
Expand Down
1 change: 1 addition & 0 deletions src/mixins/ajaxError.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
},
},
Expand Down
1 change: 1 addition & 0 deletions src/mixins/autosave.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ export default {
},
},
],
modalStyle: 'primary',
});
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ export default {
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
},
Expand Down
1 change: 1 addition & 0 deletions src/stores/modalStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const useModalStore = defineStore('modal', () => {
callback: (close) => close(),
},
],
modalStyle: 'negative',
});
}

Expand Down

0 comments on commit 3224f24

Please sign in to comment.