mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-17 06:35:14 +08:00
a1e6392a45
* Fix bugs with jquery3 upgrade [SCI-8973] * Remove deprecated jquery method (.error, .completed, .success) [SCI-8973] * Fix linter error [SCI-8973]
14 lines
468 B
JavaScript
14 lines
468 B
JavaScript
/* global HelperModule */
|
|
|
|
export default {
|
|
methods: {
|
|
duplicateElement() {
|
|
$.post(this.element.attributes.orderable.urls.duplicate_url, (result) => {
|
|
this.$emit('component:insert', result.data);
|
|
HelperModule.flashAlertMsg(this.i18n.t('protocols.steps.component_duplicated'), 'success');
|
|
}).fail(() => {
|
|
HelperModule.flashAlertMsg(this.i18n.t('protocols.steps.component_duplication_failed'), 'danger');
|
|
});
|
|
}
|
|
}
|
|
};
|