aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorEric Bidelman2013-04-15 16:31:09 -0700
committerEric Bidelman2013-04-15 16:31:09 -0700
commitfa1c41da5a639fd54c064a5a34fdef9cbb794cd8 (patch)
tree4fd947cc60b80a7d66989a453e2f7f6a3ba53c5d /js
parent328eed4d0b86de924339ce865baa7c5d508031fd (diff)
downloadio-slides-remote-fa1c41da5a639fd54c064a5a34fdef9cbb794cd8.tar.gz
Adding eventInfo config support
Diffstat (limited to 'js')
-rw-r--r--js/slide-deck.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/js/slide-deck.js b/js/slide-deck.js
index 6fc99eb..caebaf3 100644
--- a/js/slide-deck.js
+++ b/js/slide-deck.js
@@ -316,8 +316,8 @@ SlideDeck.prototype.loadConfig_ = function(config) {
316 316
317 if (settings.title) { 317 if (settings.title) {
318 document.title = settings.title.replace(/<br\/?>/, ' '); 318 document.title = settings.title.replace(/<br\/?>/, ' ');
319 if (settings.eventTitle) { 319 if (settings.eventInfo && settings.eventInfo.title) {
320 document.title += ' - ' + settings.eventTitle; 320 document.title += ' - ' + settings.eventInfo.title;
321 } 321 }
322 document.querySelector('[data-config-title]').innerHTML = settings.title; 322 document.querySelector('[data-config-title]').innerHTML = settings.title;
323 } 323 }
@@ -334,7 +334,11 @@ SlideDeck.prototype.loadConfig_ = function(config) {
334 if (presenters.length == 1) { 334 if (presenters.length == 1) {
335 var p = presenters[0]; 335 var p = presenters[0];
336 336
337 html = [p.name, p.company].join('<br>'); 337 var presenterTitle = [p.name];
338 if (p.company) {
339 presenterTitle.push(p.company);
340 }
341 html = presenterTitle.join(' - ') + '<br>';
338 342
339 var gplus = p.gplus ? '<span>g+</span><a href="' + p.gplus + 343 var gplus = p.gplus ? '<span>g+</span><a href="' + p.gplus +
340 '">' + p.gplus.replace(/https?:\/\//, '') + '</a>' : ''; 344 '">' + p.gplus.replace(/https?:\/\//, '') + '</a>' : '';
@@ -367,9 +371,10 @@ SlideDeck.prototype.loadConfig_ = function(config) {
367 var dataConfigPresenter = document.querySelector('[data-config-presenter]'); 371 var dataConfigPresenter = document.querySelector('[data-config-presenter]');
368 if (dataConfigPresenter) { 372 if (dataConfigPresenter) {
369 dataConfigPresenter.innerHTML = html; 373 dataConfigPresenter.innerHTML = html;
370 if (settings.eventTitle) { 374 if (settings.eventInfo) {
371 dataConfigPresenter.innerHTML = dataConfigPresenter.innerHTML + '<br>' + 375 var date = settings.eventInfo.date;
372 settings.eventTitle; 376 var dateInfo = date ? ' - <time>' + date + '</time>' : '';
377 dataConfigPresenter.innerHTML += settings.eventInfo.title + dateInfo;
373 } 378 }
374 } 379 }
375 } 380 }