Event Calendar - LibCal - Milwaukee Area Technical College
Calendar Show All Milwaukee Campus Tutoring North Campus Commons Study Room Reservations South Campus Library South Campus Library & Makerspace Events (Oak Creek)
/g, ">"); jQuery.ajax({ url: "/process_search.php?site_id=5959&cals=" + cals + "⊥age=" + perPage + "&page=" + activePage + "&sType=" + sType + "&q=" + encodeURIComponent(q) + "&audience=" + audience + "&cats=" + cats + "&camps=" + camp + "&callback=?", dataType: "jsonp", success: function(data) { endBusyWait(); var output = "
').html('>'); pagelinks.push($li); } $pager.append(pagelinks); } jQuery("#pag").append($pager); } jQuery("#pag li a").click(function () { activePage = jQuery(this).data("page"); return runFilters(); }); } function decorateEventDataWithCategoryDisplayInfo(eventData) { var audienceCount = eventData.audiences.length; var categoryCount = eventData.categories_arr.length; var audiencesToShowInFull = 0; var categoriesToShowInFull = 1; if ((audienceCount > 0) && categoryCount > 0) { audiencesToShowInFull = 1; categoriesToShowInFull = 1; } else if (audienceCount > 0) { audiencesToShowInFull = Math.min(2, audienceCount); } else { categoriesToShowInFull = Math.min(2, categoryCount); } var toShowInFull = []; var toShowAsTooltip = []; for (var i=0; i < audienceCount; i++) { var audienceData = eventData.audiences[i]; if (i < audiencesToShowInFull) { toShowInFull.push({ isAudience: true, id: audienceData.id, name: audienceData.name, color: audienceData.color, }); } else { toShowAsTooltip.push(audienceData.name); } } for (var i=0; i < categoryCount; i++) { var categoryData = eventData.categories_arr[i]; if (i < categoriesToShowInFull) { toShowInFull.push({ isCategory: true, id: categoryData.cat_id, name: categoryData.name, color: categoryData.color, }); } else { toShowAsTooltip.push(categoryData.name); } } eventData.categoriesToShowInFull = toShowInFull; eventData.categoriesTooltip = toShowAsTooltip.join(", "); } function getCampusAndLocationData(eventData) { var maxLocationsToShow = 2; var campusString = eventData.campus; var locationString = eventData.location; if (locationString.length == 0) { return campusString; } var locations = []; if (campusString.length > 0) { locations.push(campusString); } var locationArray = locationString.split(","); if ((locationArray.length + locations.length) > maxLocationsToShow) { return "Multiple\u0020Locations"; } for (var i=0; i < locationArray.length; i++) { var location = locationArray[i].trim(); locations.push(location); } return locations.join(", "); } function setupAudienceLabel() { var audienceHtml = ""; jQuery("#audience-dd :selected").each(function (i, selected) { var value = jQuery(selected).val(); audienceHtml += ''; audienceHtml += jQuery(selected).text(); audienceHtml += ' '; }); if (audienceHtml != "") { audienceHtml = 'Audience: ' + audienceHtml; } jQuery("#s-lc-c-e-audience").html(audienceHtml); } function formatLabels() { var catl = jQuery("#s-lc-c-e-cat"); var caml = jQuery("#s-lc-c-e-cam"); try { setupAudienceLabel(); var cats_l = ""; jQuery("#cat-dd :selected").each(function (i, selected) { var v = jQuery(selected).val(); cats_l += " " + jQuery(selected).text() + " "; }); if (cats_l != "") { cats_l = "Category: " + cats_l; } catl.html(cats_l); var cams_l = ""; jQuery("#cam-dd :selected").each(function (i, selected) { var v = jQuery(selected).val(); cams_l += " " + jQuery(selected).text() + " "; }); if (cams_l != "") { cams_l = "Campus: " + cams_l; } caml.html(cams_l); } catch (err) { } } function removeFilter(id, value) { var element = jQuery(id); var list = element.val(); var index = list.indexOf(value); if (index > -1) { list.splice(index, 1); } element.val(list); element.selectpicker("refresh"); runFilters(); return false; } function removeAudience(value) { return removeFilter("#audience-dd", value); } function removeCat(value) { return removeFilter("#cat-dd", value); } function removeCam(value) { return removeFilter("#cam-dd", value); } function getSortValue() { return jQuery("input:radio[name=sort]:checked").val(); } function determineQueryString() { var categoryIds = getSelectedCategoryIds(); var campusIds = jQuery("#cam-dd").val(); var audienceIds = jQuery("#audience-dd").val(); var calendarId = jQuery("#cal-dd").find(":selected").data("cal_id"); var calendarIds = jQuery("#cal-dd").val(); var sort = getSortValue(); var qs = ""; if (activeSearch) { var q = encodeURIComponent(jQuery("#s-lc-c-search").val()); var caqs = ""; if (calendarId != null) { caqs = "&cid=" + calendarId; } qs = "?t=" + activeView + "&q=" + q + caqs + "&sort=" + sort; } else { qs = "?cid=" + calendarId + "&t=" + activeView + "&d=" + getDateToPassToPhp(); } if (calendarIds.length) { qs = qs + "&cal=" + calendarIds; } if ((audienceIds != undefined) && (audienceIds.length)) { qs = qs + "&audience=" + audienceIds; } if (categoryIds.length) { qs = qs + "&ct=" + categoryIds; } if ((campusIds != undefined) && (campusIds.length)) { qs = qs + "&cm=" + campusIds; } return qs; } function listenForFilterChanges() { jQuery("#audience-dd, #cat-dd, #cam-dd").on("changed.bs.select", runFiltersDueToOptionChange); jQuery("#cal-dd").on("changed.bs.select", runFiltersDueToCalendarChange); } function stopListeningForFilterChanges() { jQuery("#audience-dd, #cat-dd, #cam-dd, #cal-dd").off("changed.bs.select"); } function clearFilters() { stopListeningForFilterChanges(); jQuery("#cal-dd").selectpicker("deselectAll").val(1920).selectpicker("refresh"); jQuery("#cam-dd, #audience-dd").selectpicker("deselectAll").selectpicker("refresh"); jQuery("#cat-dd").selectpicker("deselectAll").selectpicker("refresh"); activeSearch = false; jQuery("#s-lc-c-search").val(""); jQuery("#sort1").prop("checked", true); activeDate = moment("2019\u002D01\u002D17", springSpace.phpDateFormat); haveChosenSpecificDate = false; jQuery("#s-lc-filter-date").val(""); createDatePicker(); listenForFilterChanges(); jQuery(".s-lc-nav-tab").removeClass("active"); activePage = 1; return runFilters(); } jQuery(function () { jQuery("#cal-dd").selectpicker({ countSelectedText: "{0} selected", header: "Filter by Calendar:", width: "100\u0025", style: "btn-default btn-sm" }); jQuery("#audience-dd").selectpicker({ countSelectedText: "{0} selected", header: "Filter by Audience:", width: "100\u0025", style: "btn-default btn-sm" }); jQuery("#cat-dd").selectpicker({ countSelectedText: "{0} selected", header: "Filter by Category:", width: "100\u0025", style: "btn-default btn-sm" }); jQuery("#cam-dd").selectpicker({ countSelectedText: "{0} selected", header: "Filter by Campus:", width: "100\u0025", style: "btn-default btn-sm" }); jQuery("input:radio[name=sort]").change(function () { if (activeSearch) { runSearch(); } return false; }); jQuery(".s-lc-nav-list").on("click", function (e) { return setActiveViewMode("d"); }); jQuery(".s-lc-nav-monthly").on("click", function (e) { return setActiveViewMode("m"); }); jQuery(".s-lc-nav-card").on("click", function (e) { return setActiveViewMode("g"); }); jQuery("#s-lc-c-sbtn").click(function () { setActiveViewModeToSearch(); return runFilters(); }); jQuery("#s-lc-c-search").keyup(function (e) { if (e.keyCode == 13) { setActiveViewModeToSearch(); return runFilters(); } return true; }); jQuery(".s-lc-filters-clear").click(clearFilters); jQuery("#cal-form").on("submit", function (e) { e.preventDefault(); }); updateCategoryFilters( [1920,], ["Enrichment\u0020Event",] ); var cals = jQuery("#cal-dd").val(); if (cals == null) { } else { jQuery("#s-lc-c-catf .bootstrap-select").prop("title", ""); } listenForFilterChanges(); accessibleIcons(); activeView = "g"; activeSearch = false; createDatePicker(); runFilters(); });
Event Calendar - LibCal - Milwaukee Area Technical College
Calendar Show All Milwaukee Campus Tutoring North Campus Commons Study Room Reservations South Campus Library South Campus Library & Makerspace Events (Oak Creek)
/g, ">"); jQuery.ajax({ url: "/process_search.php?site_id=5959&cals=" + cals + "⊥age=" + perPage + "&page=" + activePage + "&sType=" + sType + "&q=" + encodeURIComponent(q) + "&audience=" + audience + "&cats=" + cats + "&camps=" + camp + "&callback=?", dataType: "jsonp", success: function(data) { endBusyWait(); var output = "
').html('>'); pagelinks.push($li); } $pager.append(pagelinks); } jQuery("#pag").append($pager); } jQuery("#pag li a").click(function () { activePage = jQuery(this).data("page"); return runFilters(); }); } function decorateEventDataWithCategoryDisplayInfo(eventData) { var audienceCount = eventData.audiences.length; var categoryCount = eventData.categories_arr.length; var audiencesToShowInFull = 0; var categoriesToShowInFull = 1; if ((audienceCount > 0) && categoryCount > 0) { audiencesToShowInFull = 1; categoriesToShowInFull = 1; } else if (audienceCount > 0) { audiencesToShowInFull = Math.min(2, audienceCount); } else { categoriesToShowInFull = Math.min(2, categoryCount); } var toShowInFull = []; var toShowAsTooltip = []; for (var i=0; i < audienceCount; i++) { var audienceData = eventData.audiences[i]; if (i < audiencesToShowInFull) { toShowInFull.push({ isAudience: true, id: audienceData.id, name: audienceData.name, color: audienceData.color, }); } else { toShowAsTooltip.push(audienceData.name); } } for (var i=0; i < categoryCount; i++) { var categoryData = eventData.categories_arr[i]; if (i < categoriesToShowInFull) { toShowInFull.push({ isCategory: true, id: categoryData.cat_id, name: categoryData.name, color: categoryData.color, }); } else { toShowAsTooltip.push(categoryData.name); } } eventData.categoriesToShowInFull = toShowInFull; eventData.categoriesTooltip = toShowAsTooltip.join(", "); } function getCampusAndLocationData(eventData) { var maxLocationsToShow = 2; var campusString = eventData.campus; var locationString = eventData.location; if (locationString.length == 0) { return campusString; } var locations = []; if (campusString.length > 0) { locations.push(campusString); } var locationArray = locationString.split(","); if ((locationArray.length + locations.length) > maxLocationsToShow) { return "Multiple\u0020Locations"; } for (var i=0; i < locationArray.length; i++) { var location = locationArray[i].trim(); locations.push(location); } return locations.join(", "); } function setupAudienceLabel() { var audienceHtml = ""; jQuery("#audience-dd :selected").each(function (i, selected) { var value = jQuery(selected).val(); audienceHtml += ''; audienceHtml += jQuery(selected).text(); audienceHtml += ' '; }); if (audienceHtml != "") { audienceHtml = 'Audience: ' + audienceHtml; } jQuery("#s-lc-c-e-audience").html(audienceHtml); } function formatLabels() { var catl = jQuery("#s-lc-c-e-cat"); var caml = jQuery("#s-lc-c-e-cam"); try { setupAudienceLabel(); var cats_l = ""; jQuery("#cat-dd :selected").each(function (i, selected) { var v = jQuery(selected).val(); cats_l += " " + jQuery(selected).text() + " "; }); if (cats_l != "") { cats_l = "Category: " + cats_l; } catl.html(cats_l); var cams_l = ""; jQuery("#cam-dd :selected").each(function (i, selected) { var v = jQuery(selected).val(); cams_l += " " + jQuery(selected).text() + " "; }); if (cams_l != "") { cams_l = "Campus: " + cams_l; } caml.html(cams_l); } catch (err) { } } function removeFilter(id, value) { var element = jQuery(id); var list = element.val(); var index = list.indexOf(value); if (index > -1) { list.splice(index, 1); } element.val(list); element.selectpicker("refresh"); runFilters(); return false; } function removeAudience(value) { return removeFilter("#audienc
e-dd", value); } function removeCat(value) { return removeFilter("#cat-dd", value); } function removeCam(value) { return removeFilter("#cam-dd", value); } function getSortValue() { return jQuery("input:radio[name=sort]:checked").val(); } function determineQueryString() { var categoryIds = getSelectedCategoryIds(); var campusIds = jQuery("#cam-dd").val(); var audienceIds = jQuery("#audience-dd").val(); var calendarId = jQuery("#cal-dd").find(":selected").data("cal_id"); var calendarIds = jQuery("#cal-dd").val(); var sort = getSortValue(); var qs = ""; if (activeSearch) { var q = encodeURIComponent(jQuery("#s-lc-c-search").val()); var caqs = ""; if (calendarId != null) { caqs = "&cid=" + calendarId; } qs = "?t=" + activeView + "&q=" + q + caqs + "&sort=" + sort; } else { qs = "?cid=" + calendarId + "&t=" + activeView + "&d=" + getDateToPassToPhp(); } if (calendarIds.length) { qs = qs + "&cal=" + calendarIds; } if ((audienceIds != undefined) && (audienceIds.length)) { qs = qs + "&audience=" + audienceIds; } if (categoryIds.length) { qs = qs + "&ct=" + categoryIds; } if ((campusIds != undefined) && (campusIds.length)) { qs = qs + "&cm=" + campusIds; } return qs; } function listenForFilterChanges() { jQuery("#audience-dd, #cat-dd, #cam-dd").on("changed.bs.select", runFiltersDueToOptionChange); jQuery("#cal-dd").on("changed.bs.select", runFiltersDueToCalendarChange); } function stopListeningForFilterChanges() { jQuery("#audience-dd, #cat-dd, #cam-dd, #cal-dd").off("changed.bs.select"); } function clearFilters() { stopListeningForFilterChanges(); jQuery("#cal-dd").selectpicker("deselectAll").val(1920).selectpicker("refresh"); jQuery("#cam-dd, #audience-dd").selectpicker("deselectAll").selectpicker("refresh"); jQuery("#cat-dd").selectpicker("deselectAll").selectpicker("refresh"); activeSearch = false; jQuery("#s-lc-c-search").val(""); jQuery("#sort1").prop("checked", true); activeDate = moment("2019\u002D01\u002D17", springSpace.phpDateFormat); haveChosenSpecificDate = false; jQuery("#s-lc-filter-date").val(""); createDatePicker(); listenForFilterChanges(); jQuery(".s-lc-nav-tab").removeClass("active"); activePage = 1; return runFilters(); } jQuery(function () { jQuery("#cal-dd").selectpicker({ countSelectedText: "{0} selected", header: "Filter by Calendar:", width: "100\u0025", style: "btn-default btn-sm" }); jQuery("#audience-dd").selectpicker({ countSelectedText: "{0} selected", header: "Filter by Audience:", width: "100\u0025", style: "btn-default btn-sm" }); jQuery("#cat-dd").selectpicker({ countSelectedText: "{0} selected", header: "Filter by Category:", width: "100\u0025", style: "btn-default btn-sm" }); jQuery("#cam-dd").selectpicker({ countSelectedText: "{0} selected", header: "Filter by Campus:", width: "100\u0025", style: "btn-default btn-sm" }); jQuery("input:radio[name=sort]").change(function () { if (activeSearch) { runSearch(); } return false; }); jQuery(".s-lc-nav-list").on("click", function (e) { return setActiveViewMode("d"); }); jQuery(".s-lc-nav-monthly").on("click", function (e) { return setActiveViewMode("m"); }); jQuery(".s-lc-nav-card").on("click", function (e) { return setActiveViewMode("g"); }); jQuery("#s-lc-c-sbtn").click(function () { setActiveViewModeToSearch(); return runFilters(); }); jQuery("#s-lc-c-search").keyup(function (e) { if (e.keyCode == 13) { setActiveViewModeToSearch(); return runFilters(); } return true; }); jQuery(".s-lc-filters-clear").click(clearFilters); jQuery("#cal-form").on("submit", function (e) { e.preventDefault(); }); updateCategoryFilters( [1920,], ["Enrichment\u0020Event",] ); var cals = jQuery("#cal-dd").val(); if (cals == null) { } else { jQuery("#s-lc-c-catf .bootstrap-select").prop("title", ""); } listenForFilterChanges(); accessibleIcons(); activeView = "g"; activeSearch = false; createDatePicker(); runFilters(); });