function Schedule(options) { var schedule = {}; schedule.init = function(options) { // TODO: make these configurable, passed in as options // when you create a Schedule() instance on the page schedule.sourceJSON = 'json/sessions2018.json'; schedule.spacesJSON = 'json/spaces2018.json'; schedule.pathwaysJSON = 'json/pathways2018.json'; schedule.$container = $('#schedule'); schedule.$toggles = $('
No matching results found.
'); } else { $('#no-results').remove(); } return false; }).keyup(function() { $(this).change(); }); } // showFavorites() handles display when someone chooses the "Favorites" tab schedule.showFavorites = function() { // provide some user instructions at top of page schedule.$container.empty().append('Favorite sessions to store a list on this device
').append(schedule.sessionListTemplate); // use savedSessionList IDs to render favorited sessions to page schedule.addSessionsToSchedule(schedule.savedSessionList); schedule.clearOpenBlocks(); } // uses savedSessionIDs list to compile data for favorited sessions schedule.updateSavedSessionList = function() { schedule.savedSessionList = _.filter(schedule.sessionList, function(v, k) { // by default include "everyone" sessions on favorites list // just to make temporal wayfinding easier return (v.space == 'Everyone') || _.contains(schedule.savedSessionIDs, v.id); }); } // display the list of Spaces and their descriptions schedule.displaySpacesList = function() { schedule.clearHighlightedPage(); schedule.$pageLinks.find('#spaces-page-link').addClass('active'); schedule.$container.html(""); schedule.addCaptionOverline("