mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 06:35:56 +08:00
Fix tags interaction on canvas and task page [SCI-10933]
This commit is contained in:
parent
9a257e0a81
commit
47bbc1d43d
|
@ -10,6 +10,7 @@ const app = createApp({
|
|||
myModuleParams: null,
|
||||
myModuleUrl: null,
|
||||
tagsModalOpen: false,
|
||||
tagDeleted: false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -35,6 +36,10 @@ const app = createApp({
|
|||
this.myModuleParams = null;
|
||||
this.myModuleUrl = null;
|
||||
this.tagsModalOpen = false;
|
||||
|
||||
if ($('#canvas-container').length && this.tagDeleted) {
|
||||
window.location.reload();
|
||||
}
|
||||
},
|
||||
syncTags(tags) {
|
||||
// My module page
|
||||
|
|
|
@ -147,7 +147,7 @@ import ConfirmationModal from '../../shared/confirmation_modal.vue';
|
|||
|
||||
export default {
|
||||
name: 'TagsModal',
|
||||
emits: ['close', 'tagsLoaded'],
|
||||
emits: ['close', 'tagsLoaded', 'tagDeleted'],
|
||||
props: {
|
||||
params: {
|
||||
required: true
|
||||
|
@ -288,6 +288,8 @@ export default {
|
|||
color: tag.attributes.color
|
||||
},
|
||||
my_module_id: this.params.id
|
||||
}).then(() => {
|
||||
this.$emit('tagsLoaded', this.allTags);
|
||||
});
|
||||
},
|
||||
createTag() {
|
||||
|
@ -309,6 +311,7 @@ export default {
|
|||
}
|
||||
}).then(() => {
|
||||
this.loadAlltags();
|
||||
this.$emit('tagDeleted', tag);
|
||||
document.body.style.overflow = 'hidden';
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
project-tags-url="<%= project_tags_path(@project) %>"
|
||||
@close="close"
|
||||
@tags-loaded="syncTags"
|
||||
@tag-deleted="tagDeleted = true"
|
||||
/>
|
||||
</teleport>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue