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,
|
myModuleParams: null,
|
||||||
myModuleUrl: null,
|
myModuleUrl: null,
|
||||||
tagsModalOpen: false,
|
tagsModalOpen: false,
|
||||||
|
tagDeleted: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -35,6 +36,10 @@ const app = createApp({
|
||||||
this.myModuleParams = null;
|
this.myModuleParams = null;
|
||||||
this.myModuleUrl = null;
|
this.myModuleUrl = null;
|
||||||
this.tagsModalOpen = false;
|
this.tagsModalOpen = false;
|
||||||
|
|
||||||
|
if ($('#canvas-container').length && this.tagDeleted) {
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
syncTags(tags) {
|
syncTags(tags) {
|
||||||
// My module page
|
// My module page
|
||||||
|
|
|
@ -147,7 +147,7 @@ import ConfirmationModal from '../../shared/confirmation_modal.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TagsModal',
|
name: 'TagsModal',
|
||||||
emits: ['close', 'tagsLoaded'],
|
emits: ['close', 'tagsLoaded', 'tagDeleted'],
|
||||||
props: {
|
props: {
|
||||||
params: {
|
params: {
|
||||||
required: true
|
required: true
|
||||||
|
@ -288,6 +288,8 @@ export default {
|
||||||
color: tag.attributes.color
|
color: tag.attributes.color
|
||||||
},
|
},
|
||||||
my_module_id: this.params.id
|
my_module_id: this.params.id
|
||||||
|
}).then(() => {
|
||||||
|
this.$emit('tagsLoaded', this.allTags);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
createTag() {
|
createTag() {
|
||||||
|
@ -309,6 +311,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.loadAlltags();
|
this.loadAlltags();
|
||||||
|
this.$emit('tagDeleted', tag);
|
||||||
document.body.style.overflow = 'hidden';
|
document.body.style.overflow = 'hidden';
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
project-tags-url="<%= project_tags_path(@project) %>"
|
project-tags-url="<%= project_tags_path(@project) %>"
|
||||||
@close="close"
|
@close="close"
|
||||||
@tags-loaded="syncTags"
|
@tags-loaded="syncTags"
|
||||||
|
@tag-deleted="tagDeleted = true"
|
||||||
/>
|
/>
|
||||||
</teleport>
|
</teleport>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue