mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 22:25:30 +08:00
25 lines
596 B
JavaScript
25 lines
596 B
JavaScript
import axios from '../../../../../packs/custom_axios.js';
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
movingAttachment: false
|
|
};
|
|
},
|
|
methods: {
|
|
showMoveModal(event) {
|
|
event.stopPropagation();
|
|
this.movingAttachment= true;
|
|
},
|
|
closeMoveModal() {
|
|
this.movingAttachment = false;
|
|
},
|
|
moveAttachment(target_id) {
|
|
axios.post(this.attachment.attributes.urls.move, { target_id: target_id }).
|
|
then(() => {
|
|
this.movingAttachment = false;
|
|
this.$emit('attachment:moved', this.attachment.id, target_id);
|
|
});
|
|
}
|
|
}
|
|
};
|