Merge branch 'dev' of gitlab.com:lilcity/backend into dev

remotes/origin/hasaccess
Ivlev Denis 8 years ago
commit 0ed0662b98
  1. 6
      apps/school/templates/school/livelesson_detail.html
  2. 41
      web/src/components/CourseRedactor.vue
  3. 2
      web/src/components/LessonRedactor.vue
  4. 2
      web/src/components/inputs/LilSelect.vue
  5. 11
      web/src/sass/_common.sass

@ -9,11 +9,11 @@
<div class="lesson__subtitle subtitle">{{ livelesson.title }}</div>
<div class="lesson__content">{{ livelesson.short_description }}</div>
<a class="lesson__video video" href="#">
{% if livelesson.stream_index %}
<iframe src="https://player.vimeo.com/video/{{ livelesson.stream_index }}" width="640" height="360" frameborder="0" webkitallowfullscreen
{% if livelesson.stream_index %}
<iframe class="lesson__video_frame" src="https://player.vimeo.com/video/{{ livelesson.stream_index }}" frameborder="0" webkitallowfullscreen
mozallowfullscreen allowfullscreen>
</iframe>
<iframe src="https://vimeo.com/live-chat/{{ livelesson.stream_index }}" width="600" height="600" frameborder="0"></iframe>
<iframe class="lesson__chat_frame" src="https://vimeo.com/live-chat/{{ livelesson.stream_index }}" frameborder="0"></iframe>
{% else %}
{% if livelesson.cover %}
<img class="video__pic" src="{{ livelesson.cover.image.url }}"/>

@ -115,10 +115,10 @@
<button disabled class="field__append">руб.</button>
</div>
</div>
<!--<label v-if="!live" class="info__switch switch switch_lg">-->
<!--<input type="checkbox" class="switch__input" v-model="course.is_featured">-->
<!--<span class="switch__content">Выделить</span>-->
<!--</label>-->
<label v-if="me && !live && me.role === ROLE_ADMIN" class="info__switch switch switch_lg">
<input type="checkbox" class="switch__input" v-model="course.is_featured">
<span class="switch__content">Выделить</span>
</label>
</div>
<div v-if="!live" class="info__fieldset">
<div class="info__field field">
@ -850,15 +850,34 @@
schedule.then((response) => {
if (response.data) {
this.scheduleOptions = _.orderBy(response.data.results.map((schedule) => {
var now = new Date();
now.setDate(now.getDate() + (schedule.weekday + (7 - now.getDay())) % 7);
return {
title: `${schedule.title} (${this.weekdays[schedule.weekday]}, ${moment(now).format("D MMM")})`,
let schedule = [];
response.data.results.forEach((item) => {
schedule[item.weekday] = item.title;
});
console.log('schedule', schedule);
let options = [];
for(let i=-7;i<=10;i++) {
let now = new Date();
now.setDate(now.getDate() + i);
let weekday = now.getDay() || 7;
console.log('data', i, now.getDay(), weekday, now, moment(now).format("D MMM"));
options.push({
title: `${schedule[weekday]} (${this.weekdays[weekday]}, ${moment(now).format("D MMM")})`,
value: moment(now).format('YYYY-MM-DD')
}
}), (item)=>{return moment(item.value)});
});
}
console.log('options',options);
this.scheduleOptions = _.orderBy(options, (item)=>{return moment(item.value)});
}
this.updateCategory();
});

@ -21,7 +21,7 @@
</div>
<div class="kit__field field">
<div class="field__wrap">
<textarea class="field__input" placeholder="Описание урока" v-model="lesson.short_description"></textarea>
<textarea class="field__input" v-autosize="lesson.short_description" placeholder="Описание урока" v-model="lesson.short_description"></textarea>
</div>
</div>
</div>

@ -4,7 +4,7 @@
{{ selectedTitle }}
</div>
<div class="select__drop">
<div class="select__option" v-for="option in options" @click.stop.prevent="selectOption(option)">
<div v-for="option in options" :class="{ select__option: true, active: value && option.value == value.value }" @click.stop.prevent="selectOption(option)">
<div class="select__title">{{ option.title }}</div>
</div>
</div>

@ -2658,6 +2658,17 @@ a.grey-link
&__content
margin-bottom: 30px
color: #191919
&__video_frame
width: 640px
height: 360px
+m
width: 100%
&__chat_frame
width: 600px
height: 600px
+m
width: 100%
.lessons
&__subtitle

Loading…
Cancel
Save