mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
24 lines
557 B
JavaScript
24 lines
557 B
JavaScript
import axios from '../../../../packs/custom_axios.js';
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
movingElement: false
|
|
};
|
|
},
|
|
methods: {
|
|
showMoveModal() {
|
|
this.movingElement = true;
|
|
},
|
|
closeMoveModal() {
|
|
this.movingElement = false;
|
|
},
|
|
moveElement(target_id) {
|
|
axios.post(this.element.attributes.orderable.urls.move_url, { target_id: target_id }).
|
|
then(() => {
|
|
this.movingElement = false;
|
|
this.$emit('moved', this.element.attributes.position, target_id);
|
|
});
|
|
}
|
|
}
|
|
};
|