-
@@ -291,6 +289,7 @@
props: ["authorName", "authorPicture", "accessToken", "courseId", "live"],
data() {
return {
+ titles: {},
mounting: false,
viewSection: 'course',
me: null,
@@ -635,17 +634,18 @@
if(this.validate()) {
const publishButton = $('#course-redactor__publish-button');
publishButton.attr('disabled', 'disabled');
- api.publishCourse(this.course.id, this.accessToken)
- .then((response) => {
- if(this.live) {
- window.location = '/school/lessons';
- } else {
- window.location = '/course/on-moderation';
- }
- })
- .catch(() => {
- publishButton.removeAttr('disabled');
- });
+
+ if(this.live) {
+ window.location = '/school/lessons';
+ } else {
+ api.publishCourse(this.course.id, this.accessToken)
+ .then((response) => {
+ window.location = '/course/on-moderation';
+ })
+ .catch(() => {
+ publishButton.removeAttr('disabled');
+ });
+ }
}
},
validate(silent) {
@@ -802,6 +802,15 @@
mounted() {
this.mounting = true;
moment.locale('ru');
+
+ this.titles['courseTitle'] = 'НАЗВАНИЕ КУРСА';
+ this.titles['shortDescription'] = 'КРАТКО О КУРСЕ';
+
+ if(this.live) {
+ this.titles['courseTitle'] = 'НАЗВАНИЕ УРОКА';
+ this.titles['shortDescription'] = 'КРАТКО ОБ УРОКЕ';
+ }
+
this.course.live = this.live;
// Listen for changes to the current location.
this.unlisten = history.listen(this.updateViewSection);
@@ -823,7 +832,7 @@
});
if(this.live) {
- let schedule = api.getSchedule(this.accessToken);
+ let schedule = api.getSchedule(this.accessToken, {live_lesson_exist: false});
promises.push(schedule);
schedule.then((response) => {
diff --git a/web/src/components/LessonsAdmin.vue b/web/src/components/LessonsAdmin.vue
index ce503646..469dcf09 100644
--- a/web/src/components/LessonsAdmin.vue
+++ b/web/src/components/LessonsAdmin.vue
@@ -4,11 +4,11 @@
-
+
+
+
+
+