Skip to content

Commit

Permalink
Add speaker name to schedule.
Browse files Browse the repository at this point in the history
  • Loading branch information
vidya-ram committed Feb 15, 2017
1 parent 24a2561 commit 98546ad
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
11 changes: 10 additions & 1 deletion funnel/static/css/schedules.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
font-size: .85em;
cursor: pointer;
}
.fc-header-title {
margin: 10px 0 0;
}
#rooms-list .room {
padding: 3px 5px;
}
Expand Down Expand Up @@ -46,9 +49,15 @@
height: 100%;
}
.modal-dialog {
width: 70%;
width: 98%;
height: 100%;
position: relative;
margin: 10px auto;
}
@media(min-width: 768px) {
.modal-dialog {
width: 70%;
}
}
.modal-content{
height: 100%;
Expand Down
11 changes: 8 additions & 3 deletions funnel/static/js/schedules.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ $(function() {
month: 'ddd', // Mon
week: 'ddd d', // Mon 31
day: 'dddd d' // Monday 31
},
eventRender: function(event, element) {
if (event.speaker) {
element.find('.fc-event-title').append("<br/> by <b>" + event.speaker + "</b>");
}
}
},
init: function(scheduled) {
Expand All @@ -251,7 +256,7 @@ $(function() {
if(settings.editable) config.eventResize = config.eventDrop = events.onChange;
}
},
init_obj: {id: null, start: null, end: null, title: null, is_break: null},
init_obj: {id: null, start: null, end: null, title: null, is_break: null, speaker: null},
add: function(event) {
this.container.fullCalendar('renderEvent', event, true);
events.add_obj_data(event);
Expand All @@ -276,7 +281,6 @@ $(function() {
init_buttons();
init_autosave();
events.height(this.container.find('.fc-content').height());
$('#rooms-list').height(this.container.find('.fc-content').height());
var rooms_list = $('#rooms-list').find('.room .title');
rooms_list.each(function() {
var bgcol = $(this).attr('data-bgcolor')
Expand Down Expand Up @@ -442,7 +446,7 @@ $(function() {
current: null,
autosave: true,
init_open: null,
init_obj: {id: null, start: null, end: null, title: null, proposal_id: null},
init_obj: {id: null, start: null, end: null, title: null, proposal_id: null, speaker: null},
add_obj_data: function(event) {
if(typeof event != 'undefined') this.current = event;
if(this.current) {
Expand Down Expand Up @@ -580,6 +584,7 @@ $(function() {
end: new Date(scheduled[i].end),
modal_url: scheduled[i].modal_url,
title: scheduled[i].title,
speaker: scheduled[i].speaker,
proposal_id: scheduled[i].proposal_id,
saved: true,
unscheduled: null,
Expand Down
4 changes: 2 additions & 2 deletions funnel/templates/schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

{% block content %}
<div class="row">
<div class="col-xs-12 col-sm-9 col-md-9 col-lg-9">
<div class="col-xs-12">
<a href="{{ space.url_for('subscribe-schedule') }}" class="pull-right btn btn-xs btn-primary" data-toggle="modal" data-target="#popup_subscribe">{% trans %}Subscribe{% endtrans %}</a>
<div id="popup_subscribe" class="modal fade viewer"></div>
<div id="calendar"></div>
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
<div class="col-xs-12 col-sm-6">
<div class="fc-header-title"><h2>{% trans %}Venues{% endtrans %}</h2></div>
<div id="rooms-list">
{%- for venue in space.venues %}
Expand Down
1 change: 1 addition & 0 deletions funnel/views/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def session_data(sessions, timezone=None, with_modal_url=False, with_delete_url=
"title": session.title,
"start": session.start.isoformat() + 'Z',
"end": session.end.isoformat() + 'Z',
"speaker": session.speaker if session.speaker else None,
"room_scoped_name": session.venue_room.scoped_name if session.venue_room else None,
"is_break": session.is_break,
"url_name": session.url_name,
Expand Down

0 comments on commit 98546ad

Please sign in to comment.