debian-mirror-gitlab/app/assets/javascripts/notes/mixins/autosave.js
2018-03-17 18:26:18 +05:30

15 lines
336 B
JavaScript

import Autosave from '../../autosave';
export default {
methods: {
initAutoSave() {
this.autosave = new Autosave($(this.$refs.noteForm.$refs.textarea), ['Note', 'Issue', this.note.id], 'issue');
},
resetAutoSave() {
this.autosave.reset();
},
setAutoSave() {
this.autosave.save();
},
},
};