Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds feature to view slides of the session #1878

Merged
merged 5 commits into from May 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 14 additions & 9 deletions src/backend/_scss/application.scss
Expand Up @@ -225,11 +225,18 @@ a {
}

@media (min-width: 600px) {
.video-iframe {
.video-iframe,
.iframe {
height: 370px;
}
}

@media (max-width: 600px) {
.iframe {
height: 250px;
}
}

@media (min-width: 768px) {
#day-menu {
.dropdown-menu {
Expand Down Expand Up @@ -1624,13 +1631,15 @@ a {
}
}

.bookmark {
.features {
@include cursorpointer;
padding: 5px;
padding: 2px;
position: absolute;
right: 0;
top: 0;
}

.bookmark {
&.starred {
color: black;
}
Expand Down Expand Up @@ -2187,11 +2196,7 @@ a.skip:hover {
overflow-y: auto;
}

.video {
@include cursorpointer;
padding: 5px;
position: absolute;
right: 23px;
top: 1px;
.video,
.slides {
color: $black;
}
1 change: 1 addition & 0 deletions src/backend/fold_v2.js
Expand Up @@ -786,6 +786,7 @@ function foldByRooms(room, sessions, speakers, trackInfo) {
session_id: session.id,
audio:session['audio-url'],
video: (checkNullHtml(session['video-url'])) ? '' : session['video-url'].split('=')[1],
slides: session['slides-url'],
speakers_list: session.speakers.map((speaker) => {
let spkr = speakersMap.get(speaker.id);
if(spkr['photo-url']){
Expand Down
42 changes: 29 additions & 13 deletions src/backend/templates/rooms.hbs
Expand Up @@ -123,18 +123,24 @@
{{#if ../../../mode}}
<div class="sizeevent event event-title" id="title-{{session_id}}" style="background-color: {{color}}; color:{{font_color}};">
{{else}}
<div class="sizeevent event event-title" onclick = "loadVideo('{{session_id}}', '{{video}}')" id="title-{{session_id}}" style="background-color: {{color}}; color:{{font_color}};" data-toggle="collapse" data-target="#desc-{{session_id}}, #desc2-{{session_id}}">
<div class="sizeevent event event-title" onclick = "loadVideoAndSlides('{{session_id}}', '{{video}}', '{{slides}}')" id="title-{{session_id}}" style="background-color: {{color}}; color:{{font_color}};" data-toggle="collapse" data-target="#desc-{{session_id}}, #desc2-{{session_id}}">
{{/if}}
<div class = "features">
{{#if slides}}
<i class="fa fa-file-powerpoint-o slides" aria-hidden="true"></i>
{{/if}}
{{#if audio}}
<i class="fa fa-music" aria-hidden="true"></i>
{{/if}}
{{#if video}}
<i class="fa fa-video-camera video" aria-hidden="true"></i>
{{/if}}
<a class = "bookmark" id = "c{{session_id}}" >
<i class="fa fa-star" aria-hidden="true">
</i>
</a>
</div>
<div class="margin-down-15">{{title}}</div>
<a class = "bookmark" id="b{{session_id}}">
<i class="fa fa-star" aria-hidden="true" ></i>
</a>
{{#if audio}}
<i class="fa fa-music" aria-hidden="true"></i>
{{/if}}
{{#if video}}
<i class="fa fa-video-camera video" aria-hidden="true"></i>
{{/if}}
<div id="desc2-{{session_id}}" class="collapse in"
style="background-color:{{{color}}}; color: {{{font_color}}};">
<div class="row">
Expand Down Expand Up @@ -842,14 +848,24 @@
initPage();
});

function loadVideo(div, videoURL){
function loadVideoAndSlides(div, videoURL, slideURL){
if(videoURL !== null && videoURL !== '') {
let isVideoDisplayed = $('#desc-' + div).hasClass('in');
if (!isVideoDisplayed) {
$('#desc-' + div).children('div').prepend('<iframe id = "' + videoURL + '" class = "video-iframe col-xs-12 col-sm-12 col-md-12" src="https://www.youtube.com/embed/' + videoURL + '"></iframe>')
$('#desc-' + div).children('div').prepend('<iframe id = "video-' + div + '" class = "video-iframe col-xs-12 col-sm-12 col-md-12" src="https://www.youtube.com/embed/' + videoURL + '"></iframe>')
}
else {
$('#video-' + div).remove();
}
}

if(slideURL !== null && slideURL !== '') {
let isSlideDisplayed = $('#desc-' + div).hasClass('in');
if (!isSlideDisplayed) {
$('#desc-' + div).children('div').prepend('<iframe id = "slide-' + div + '" class = "iframe col-xs-12 col-sm-12 col-md-12" frameborder="0" src="https://view.officeapps.live.com/op/embed.aspx?src=' + slideURL +'"></iframe>');
}
else {
$('#' + videoURL).remove();
$('#slide-' + div).remove();
}
}
}
Expand Down
42 changes: 28 additions & 14 deletions src/backend/templates/schedule.hbs
Expand Up @@ -120,7 +120,7 @@

<div class="tracks col-xs-10 col-sm-10 col-md-10">
{{#sessions}}
<div class="schedule-track" id="{{session_id}}" onclick = "loadVideo('{{session_id}}', '{{video}}')">
<div class="schedule-track" id="{{session_id}}" onclick = "loadVideoAndSlides('{{session_id}}', '{{video}}', '{{slides}}')">
<a class="anchor" id="s-{{session_id}}"></a>
<div class="schedule-container">
<div class="padding-right-zero">
Expand All @@ -134,17 +134,22 @@
aria-expanded="false"
aria-controls="desc-{{session_id}}">
{{/if}}
<div class = "features">
{{#if slides}}
<i class="fa fa-file-powerpoint-o slides" aria-hidden="true"></i>
{{/if}}
{{#if audio}}
<i class="fa fa-music" aria-hidden="true"></i>
{{/if}}
{{#if video}}
<i class="fa fa-video-camera video" aria-hidden="true"></i>
{{/if}}
<a class = "bookmark" id = "c{{session_id}}" >
<i class="fa fa-star" aria-hidden="true">
</i>
</a>
</div>
{{title}}
{{#if audio}}
<i class="fa fa-music" aria-hidden="true"></i>
{{/if}}
{{#if video}}
<i class="fa fa-video-camera video" aria-hidden="true"></i>
{{/if}}
<a class = "bookmark" id = "c{{session_id}}" >
<i class="fa fa-star" aria-hidden="true">
</i>
</a>
</h4>
<div id="desc-{{session_id}}" class="collapse">
{{{description}}}
Expand Down Expand Up @@ -1255,14 +1260,23 @@
initPage();
});

function loadVideo(div, videoURL){
function loadVideoAndSlides(div, videoURL, slideURL){
if(videoURL !== null && videoURL !== '') {
let isVideoDisplayed = $('#desc-' + div).hasClass('in');
if (!isVideoDisplayed) {
$('#desc-' + div).children('div').prepend('<iframe id = "' + videoURL + '" class = "video-iframe col-xs-12 col-sm-12 col-md-12" src="https://www.youtube.com/embed/' + videoURL + '"></iframe>')
$('#desc-' + div).children('div').prepend('<iframe id = "video-' + div + '" class = "video-iframe col-xs-12 col-sm-12 col-md-12" src="https://www.youtube.com/embed/' + videoURL + '"></iframe>');
}
else {
$('#video-' + div).remove();
}
}
if(slideURL !== null && slideURL !== '') {
let isSlideDisplayed = $('#desc-' + div).hasClass('in');
if (!isSlideDisplayed) {
$('#desc-' + div).children('div').prepend('<iframe id = "slide-' + div + '" class = "iframe col-xs-12 col-sm-12 col-md-12" frameborder="0" src="https://view.officeapps.live.com/op/embed.aspx?src=' + slideURL +'"></iframe>');
}
else {
$('#' + videoURL).remove();
$('#slide-' + div).remove();
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/backend/templates/session.hbs
Expand Up @@ -67,6 +67,10 @@
<source src="{{ audio }}">
</audio>
{{/if}}
{{#if slides}}
<iframe id = "slide" class = "iframe col-xs-12 col-sm-12 col-md-12" frameborder="0" src="https://view.officeapps.live.com/op/embed.aspx?src={{slides}}">
</iframe>
{{/if}}
{{#if video}}
<iframe id = "video" class = "video-iframe col-xs-12 col-sm-12 col-md-12" src="https://www.youtube.com/embed/{{video}}">
</iframe>
Expand Down
43 changes: 29 additions & 14 deletions src/backend/templates/tracks.hbs
Expand Up @@ -127,19 +127,24 @@
{{#if ../../../mode}}
<div class="sizeevent event event-title" id="title-{{session_id}}" style="background-color: {{../color}}; color:{{../font_color}};">
{{else}}
<div class="sizeevent event event-title" onclick = "loadVideo('{{session_id}}', '{{video}}')" id="title-{{session_id}}" style="background-color: {{../color}}; color:{{../font_color}};" data-toggle="collapse" data-target="#desc-{{session_id}}, #desc2-{{session_id}} ">
<div class="sizeevent event event-title" onclick = "loadVideoAndSlides('{{session_id}}', '{{video}}', '{{slides}}')" id="title-{{session_id}}" style="background-color: {{../color}}; color:{{../font_color}};" data-toggle="collapse" data-target="#desc-{{session_id}}, #desc2-{{session_id}} ">
{{/if}}
<div class="margin-down-15">{{title}}</div>
<a class="bookmark" id="b{{session_id}}">
<i class="fa fa-star" aria-hidden="true">
</i>
</a>
{{#if audio}}
<i class="fa fa-music" aria-hidden="true"></i>
{{/if}}
{{#if video}}
<div class = "features">
{{#if slides}}
<i class="fa fa-file-powerpoint-o slides" aria-hidden="true"></i>
{{/if}}
{{#if audio}}
<i class="fa fa-music" aria-hidden="true"></i>
{{/if}}
{{#if video}}
<i class="fa fa-video-camera video" aria-hidden="true"></i>
{{/if}}
{{/if}}
<a class = "bookmark" id = "c{{session_id}}" >
<i class="fa fa-star" aria-hidden="true">
</i>
</a>
</div>
<div class="margin-down-15">{{title}}</div>
<div id="desc2-{{session_id}}" class="collapse in"
style="background-color: {{../color}}; color: {{../font_color}};">
<div class="row">
Expand Down Expand Up @@ -829,14 +834,24 @@
initPage();
});

function loadVideo(div, videoURL){
function loadVideoAndSlides(div, videoURL, slideURL){
if(videoURL !== null && videoURL !== '') {
let isVideoDisplayed = $('#desc-' + div).hasClass('in');
if (!isVideoDisplayed) {
$('#desc-' + div).children('div').prepend('<iframe id = "' + videoURL + '" class = "video-iframe col-xs-12 col-sm-12 col-md-12" src="https://www.youtube.com/embed/' + videoURL + '"></iframe>')
$('#desc-' + div).children('div').prepend('<iframe id = "video-' + div + '" class = "video-iframe col-xs-12 col-sm-12 col-md-12" src="https://www.youtube.com/embed/' + videoURL + '"></iframe>');
}
else {
$('#video-' + div).remove();
}
}

if(slideURL !== null && slideURL !== '') {
let isSlideDisplayed = $('#desc-' + div).hasClass('in');
if (!isSlideDisplayed) {
$('#desc-' + div).children('div').prepend('<iframe id = "slide-' + div + '" class = "iframe col-xs-12 col-sm-12 col-md-12" frameborder="0" src="https://view.officeapps.live.com/op/embed.aspx?src=' + slideURL +'"></iframe>');
}
else {
$('#' + videoURL).remove();
$('#slide-' + div).remove();
}
}
}
Expand Down