mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-12 12:16:06 +08:00
15 lines
469 B
JavaScript
15 lines
469 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');
|
||
|
}).error(() => {
|
||
|
HelperModule.flashAlertMsg(this.i18n.t('protocols.steps.component_duplication_failed'), 'danger');
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
};
|