Skip to content

Commit

Permalink
pkp/pkp-lib#7505 Change getAndUpdatePublication function
Browse files Browse the repository at this point in the history
  • Loading branch information
defstat committed Dec 19, 2023
1 parent 4f659c4 commit f23d751
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/ListPanel/contributors/ContributorsListPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,9 @@ export default {
openPreviewModal() {
this.isLoading = true;
this.getAndUpdatePublication(true);
this.getAndUpdatePublication(() => {
this.isModalOpenedPreview = true;
});
},
/**
Expand Down Expand Up @@ -520,10 +522,10 @@ export default {
cancelOrdering() {
this.$emit('updated:contributors', this.itemsBeforeReordering);
this.getAndUpdatePublication();
this.itemsBeforeReordering = null;
this.isOrdering = false;
this.getAndUpdatePublication();
},
/**
Expand Down Expand Up @@ -636,17 +638,15 @@ export default {
* Update the publication in the background so that
* any author strings are updated
*/
getAndUpdatePublication(openPreview = false) {
getAndUpdatePublication(onComplete = () => {}) {
$.ajax({
url: this.publicationApiUrl,
context: this,
type: 'GET',
success(publication) {
this.$emit('updated:publication', publication);
if (openPreview) {
this.isModalOpenedPreview = true;
}
onComplete();
},
complete() {
this.isLoading = false;
Expand Down

0 comments on commit f23d751

Please sign in to comment.