mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-12 20:24:43 +08:00
23872f519b
* Implement step element sorting modal [SCI-6849] * Implement step reordering modal [SCI-6850] * Refactor reorderable items a bit [SCI-6850]
28 lines
569 B
JavaScript
28 lines
569 B
JavaScript
export default {
|
|
data() {
|
|
return {
|
|
confirmingDelete: false
|
|
};
|
|
},
|
|
methods: {
|
|
showDeleteModal(event) {
|
|
event.stopPropagation();
|
|
this.confirmingDelete = true;
|
|
},
|
|
closeDeleteModal() {
|
|
this.confirmingDelete = false;
|
|
},
|
|
deleteElement() {
|
|
$.ajax({
|
|
url: this.element.attributes.orderable.urls.delete_url,
|
|
type: 'DELETE',
|
|
success: (result) => {
|
|
this.$emit(
|
|
'component:delete',
|
|
this.element.attributes.position
|
|
);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
};
|