Skip to content

Commit

Permalink
[UI-LIBRARY][main] #7505 Initial Commit Upload - Delete - Download JA…
Browse files Browse the repository at this point in the history
…TS File (#300)

* pkp/pkp-lib#7505 Support for JATS files/content added

* pkp/pkp-lib#7505 Review Changes

* pkp/pkp-lib#7505 Remove new Jats Component dependency from ListPanel

* pkp/pkp-lib#7505 Handle Jats creation Errors

* pkp/pkp-lib#7505 Fix UI in error cases

* pkp/pkp-lib#7505 Review Changes
  • Loading branch information
defstat authored Dec 18, 2023
1 parent 140d383 commit fa798c7
Show file tree
Hide file tree
Showing 3 changed files with 389 additions and 28 deletions.
2 changes: 2 additions & 0 deletions src/components/Container/WorkflowPage.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script type="text/javascript">
import Page from './Page.vue';
import ContributorsListPanel from '@/components/ListPanel/contributors/ContributorsListPanel.vue';
import PublicationSectionJats from '@/pages/workflow/PublicationSectionJats.vue';
import Composer from '@/components/Composer/Composer.vue';
import Dropdown from '@/components/Dropdown/Dropdown.vue';
import Modal from '@/components/Modal/Modal.vue';
Expand All @@ -17,6 +18,7 @@ export default {
Dropdown,
Modal,
PkpHeader,
PublicationSectionJats,
},
extends: Page,
mixins: [LocalizeSubmission, dialog, ajaxError],
Expand Down
56 changes: 28 additions & 28 deletions src/components/ListPanel/contributors/ContributorsListPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ export default {
this.$emit('updated:contributors', newContributors);
}
this.closeFormModal();
this.getAndUpdatePublication();
},
/**
Expand All @@ -374,20 +376,7 @@ export default {
openPreviewModal() {
this.isLoading = true;
$.ajax({
url: this.publicationApiUrl,
type: 'GET',
context: this,
error: this.ajaxErrorCallback,
success(publication) {
this.$emit('updated:publication', publication);
this.isModalOpenedPreview = true;
},
complete(r) {
this.isLoading = false;
},
});
this.getAndUpdatePublication();
},
/**
Expand Down Expand Up @@ -445,6 +434,8 @@ export default {
},
);
this.$emit('updated:contributors', newContributors);
this.getAndUpdatePublication();
},
complete(r) {
this.isLoading = false;
Expand Down Expand Up @@ -529,6 +520,8 @@ export default {
cancelOrdering() {
this.$emit('updated:contributors', this.itemsBeforeReordering);
this.getAndUpdatePublication();
this.itemsBeforeReordering = null;
this.isOrdering = false;
},
Expand Down Expand Up @@ -563,20 +556,7 @@ export default {
success(contributors) {
this.$emit('updated:contributors', contributors);
// Update the publication in the background so that
// any author strings are updated
$.ajax({
url: this.publicationApiUrl,
context: this,
type: 'GET',
success(publication) {
this.$emit('updated:publication', publication);
},
complete() {
this.isLoading = false;
this.isOrdering = false;
},
});
this.getAndUpdatePublication();
},
error: this.ajaxErrorCallback,
complete() {
Expand Down Expand Up @@ -651,6 +631,26 @@ export default {
this.$emit('updated:contributors', newItems);
},
/**
* Update the publication in the background so that
* any author strings are updated
*/
getAndUpdatePublication() {
$.ajax({
url: this.publicationApiUrl,
context: this,
type: 'GET',
success(publication) {
this.$emit('updated:publication', publication);
},
complete() {
this.isLoading = false;
this.isOrdering = false;
},
});
},
},
};
</script>
Expand Down
Loading

0 comments on commit fa798c7

Please sign in to comment.