debian-mirror-gitlab/app/assets/javascripts/notes/mixins/autosave.js

16 lines
336 B
JavaScript
Raw Normal View History

2018-03-17 18:26:18 +05:30
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();
},
},
};