Мелкие правки

remotes/origin/hasaccess
Vitaly Baev 8 years ago
parent 465a927b96
commit 9605f88a09
  1. 10
      web/src/components/CourseRedactor.vue

@ -334,6 +334,7 @@
],
showErrors: false,
savingTimeout: null,
savingDebounceTimeout: null,
categoryOptions: [],
courseSyncHook: false, // Если true, то watch не будет отправлять курс на обновление
}
@ -519,10 +520,14 @@
let newTab = window.open(`/course/${this.course.id}`, '_blank');
newTab.focus();
},
saveCourseDraft: debounce(function (newValue, oldValue) {
saveCourseDraft: function (newValue, oldValue) {
if (!oldValue.id) {
return;
}
if (this.savingDebounceTimeout) {
clearTimeout(this.savingDebounceTimeout);
}
this.savingDebounceTimeout = setTimeout(() => {
this.courseSaving = true;
clearTimeout(this.savingTimeout);
document.getElementById('course-redactor__saving-status').innerText = 'СОХРАНЕНИЕ';
@ -542,7 +547,8 @@
.catch((err) => {
this.courseSaving = false;
});
}, 2000)
}, 2000);
}
},
mounted() {
api.getCategories(this.accessToken)

Loading…
Cancel
Save