Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
:clipped-right="$isRTL"
app
>
<VBtn data-test="close" icon dark @click="handleClose">
<VBtn data-test="close" icon dark @click="handleClose()">
<Icon>clear</Icon>
</VBtn>
<VToolbarTitle>{{ modalTitle }}</VToolbarTitle>
Expand Down Expand Up @@ -116,7 +116,7 @@
</div>
</VFlex>
<VFlex shrink>
<VBtn color="primary" @click="handleClose">
<VBtn color="primary" @click="handleClose()">
{{ $tr('finishButton') }}
</VBtn>
</VFlex>
Expand Down Expand Up @@ -421,27 +421,35 @@
/* Button actions */
handleClose() {
// X button action
this.enableValidation(this.nodeIds);
let assessmentItems = this.getAssessmentItems(this.nodeIds);
assessmentItems.forEach(item => (item.question ? (item[DELAYED_VALIDATION] = false) : ''));
this.updateAssessmentItems(assessmentItems);
// reaches into Details Tab to run save of diffTracker
// before the validation pop up is executed
if (this.$refs.editView) {
this.$refs.editView.immediateSaveAll().then(() => {
// Catch uploads in progress and invalid nodes
if (this.invalidNodes.length) {
this.selected = [this.invalidNodes[0]];
this.promptInvalid = true;
} else if (this.contentNodesAreUploading(this.nodeIds)) {
this.promptUploading = true;
} else {
this.closeModal();
}
});
} else {
this.closeModal();
}
this.selected = this.nodeIds;
this.$nextTick(() => {
this.enableValidation(this.nodeIds);
let assessmentItems = this.getAssessmentItems(this.nodeIds);
assessmentItems.forEach(item =>
item.question ? (item[DELAYED_VALIDATION] = false) : ''
);
this.updateAssessmentItems(assessmentItems);

// reaches into Details Tab to run save of diffTracker
// before the validation pop up is executed
if (this.$refs.editView) {
this.$nextTick(() => {
this.$refs.editView.immediateSaveAll().then(() => {
// Catch uploads in progress and invalid nodes
if (this.invalidNodes.length) {
this.selected = [this.invalidNodes[0]];
this.promptInvalid = true;
} else if (this.contentNodesAreUploading(this.nodeIds)) {
this.promptUploading = true;
} else {
this.closeModal();
}
});
});
} else {
this.closeModal();
}
});
},

/* Creation actions */
Expand Down