CINXE.COM
Make an Appointment - Online Consultations - Library Calendar - The Library
<!DOCTYPE html> <html lang="en"> <head> <!-- iid: 122 --> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="https://static-assets-us.libcal.com/css_651/bootstrap3.min.css" rel="stylesheet"> <link href="https://static-assets-us.libcal.com/css_651/jquery-ui.min.css" rel="stylesheet"> <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> <link href="https://static-assets-us.libcal.com/css_651/LibCal_public.min.css" rel="stylesheet"> <link href="https://static-assets-us.libcal.com/css_651/print.min.css" rel="stylesheet" media="print"> <script src="https://static-assets-us.libcal.com/js_651/jquery.min.js"></script> <script src="https://static-assets-us.libcal.com/js_651/jquery-ui.min.js"></script> <script src="https://static-assets-us.libcal.com/js_651/bootstrap3.min.js"></script> <script src="https://static-assets-us.libcal.com/js_651/LibCal_public.min.js"></script> <script> springSpace.dateFormat = "dddd, MMMM D, YYYY"; springSpace.dateShortFormat = "MM/DD/YYYY"; springSpace.timeFormat = "h:mma"; springSpace.timezone = 'America/Los_Angeles'; springSpace.currency = "USD"; springSpace.currencySymbol = "$"; springSpace.language = 'en'; // en springSpace.locale = 'en-US'; // en-US springSpace.phpTimeFormat = 'g:ia'; springSpace.bootstrapAsset = 'https://static-assets-us.libcal.com/css_651/bootstrap3_16.min.css'; springSpace.publicCssAsset = 'https://static-assets-us.libcal.com/css_651/LibCal_public.min.css'; springSpace.adminCssAsset = 'https://static-assets-us.libcal.com/css_651/LibCal_admin.min.css'; </script> <title> Make an Appointment - Online Consultations - Library Calendar - The Library </title> <style> #s-lc-public-banner { padding: 0; margin: 0; } .s-lc-public-footer { margin: 0; } </style> <style> .ui-datepicker { border: 1px solid #e7e7e7; } .ui-datepicker-calendar { background-color: #f8f8f8; } .ui-datepicker .ui-datepicker-header { background: none !important; background-color: #EBEBEB !important; border-radius: 0px; border: 1px solid #D8D8D8 !important; } .ui-state-default { background: none !important; background-color: #fff !important; } .s-lc-app-timeb-loc, .s-lc-app-timeb-et { display: none; } #s-lc-app-asub { margin: 10px 0px 150px 0px; } #s-lc-app-slist .panel-body { padding: 5px 10px; } #s-lc-app-slist .panel { margin-bottom: 10px; } .panel-heading { cursor: pointer; } @media (min-width: 992px) { .s-lc-app-s3-alignment { margin-right: 75px; } } .s-lc-appointment-success-intro { font-size: 120%!important; margin-bottom: 30px; } </style> <link rel="icon" type="image/x-icon" href="https://library.ucsd.edu/favicon.ico"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300&family=Roboto+Flex:opsz,wght@8..144,100;8..144,400;8..144,500;8..144,700&display=swap" rel="stylesheet"> <link rel="stylesheet" href="https://cdn.ucsd.edu/cms/decorator-5/styles/teko.css"> <script src="https://library.ucsd.edu/_files/site/js/draw-menu.js"></script> <script src="https://library.ucsd.edu/_files/_libapps/shared/campus-theme-v5.js"></script> <link rel="stylesheet" href="https://library.ucsd.edu/_files/_libapps/shared/campus-theme-v5.css"> <link rel="stylesheet" href="https://library.ucsd.edu/_files/_libapps/libcal/look-feel.css"> <script> $(document).ready( () => { const $policy = $('<p>', {html: `Please be sure to review our <a href="https://library.ucsd.edu/visit/study-spaces/reserve-study-room.html" target="_blank">UCSD Library reservation policies</a> before proceeding with your reservation.`}) $('#text-toggle-container').parent().append($policy) }); </script> <style> /* TESTING CODE. IF SUCCESSFUL WILL MOVE OVER TO STYLESHEET IN THE CMS */ div.s-lc-eq-success-section dl.s-lc-spacious-lines dt{ width: fit-content; } div.s-lc-eq-success-section dl.s-lc-spacious-lines dd{ margin-left: 7em; } a.btn-info, div#s-lc-start-new-booking a.btn-primary{ color: #fff; } </style> </head> <body id="app" class="s-lc-public s-lc-public-page-5"> <a id="s-lc-public-skiplink" class="s-lc-skiplink alert-info" href="#s-lc-public-title-area">Skip to Main Content</a> <div id="s-lc-public-cust-header" role="banner"><!-- CAMPUS LIKE HEADER --> <header id="hc-header" class="container"> <section class="layout-title d-none d-sm-block"> <div class="layout-container container"> <div class="w-50"> <a href="https://library.ucsd.edu/" class="title-header title-header-large">The Library</a> </div> <div class="w-50"> <a href="https://www.ucsd.edu/" class="title-logo"> <img alt="UC San Diego" src="https://library.ucsd.edu/_files/_libapps/shared/images/logo-ucsd-header.png"> </a> </div> </div> </section> </header> <!-- /CAMPUS LIKE HEADER --> <!-- DESKTOP TOP-NAV --> <div id="top-nav" role="navigation"> <div class="container"> <!-- TOP-NAV SCRIPT --> <script>draw_ucsd_nav(top_nav);</script> <noscript> <ul> <li><a href="https://library.ucsd.edu/research-and-collections/index.html">Research & Collections</a></li> <li><a href="https://library.ucsd.edu/borrow-and-request/index.html">Borrow & Request</a></li> <li><a href="https://library.ucsd.edu/computing-and-technology/index.html">Computing & Technology</a></li> <li><a href="https://library.ucsd.edu/visit/index.html">Visit</a></li> <li><a href="https://ucsd.libanswers.com/">Get Help</a></li> <li><a href="https://library.ucsd.edu/about/index.html">About</a></li> <li><a href="https://library.ucsd.edu/hours/index.html">Hours</a></li> </ul> </noscript> <!-- /TOP-NAV SCRIPT --> </div> </div> <!-- /DESKTOP TOP-NAV --> <!-- MOBILE TOP-NAV --> <div id="mtn-side-nav" aria-hidden="true"> <script>draw_ucsd_nav_dec5mobile(top_nav);</script> </div> <div id="mtn-overlay" onclick="closeNav()" aria-hidden="true"></div> <div id="mtn-control" aria-hidden="true"> <button onclick="openNav()"><i class="fa fa-bars"></i> MENU</button> <img alt="UC San Diego" class="img-responsive mtn-logo" src="https://library.ucsd.edu/_files/_libapps/shared/images/logo-ucsd-footer.png"> </div> <!-- /MOBILE TOP-NAV --></div> <div class="container"> <div id="s-lc-public-bc" class="row"> <div class="col-md-12"> <nav aria-label="Breadcrumb"> <ol class="breadcrumb"> <li><a href="https://library.ucsd.edu">The Library</a></li> <li class="s-lc-desktop-only"><a href="https://ucsd.libcal.com">Library Calendar</a></li> <li><a href="/appointments">Appointments</a></li> </ol> </nav> </div> </div> <noscript> <div class="alert alert-danger" id="noscript">Your browser has javascript disabled. Without javascript some functions will not work.</div> </noscript> <div id="s-lc-public-title-area"> <div id="s-lc-public-title" class="row"> <div class="col-md-12"> <h1 id="s-lc-public-pt" class="s-lc-app-booking-header"> Make an Appointment - Online Consultations </h1> <span class="sr-only"> Make an appointment in 3 steps. Step 1: Select a staff member. Step 2: Select an available date. Step 3: Select an available timeslot. </span> </div> </div> <div id="s-lc-public-pd" class="row"> <div class="col-md-12 margin-top-med" tabindex="0"> <p><span style="font-size:14px;"></span></p> <p><span style="font-size:18px;">Have a research question? Librarians are available to meet with you.</span></p> <p><span style="font-size: 14px;">Consultations will be conducted via Zoom by default. To request an in-person appointment with your librarian, if not an option on their appointment form, please reach out to your <a href="https://library.ucsd.edu/about/contact-us/librarians-by-subject.html">Subject Librarian</a>.</span></p> <p><span style="font-size:14px;"></span></p> <p> </p> </div> </div> </div> <main> <div id="s-lc-public-main" class="s-lc-public-main"> <div id="s-lc-public-page-content" class="row"> <div id="col1" class="col-md-12 center"> <div class="row"> <div id="s-lc-app-s1" class="col-md-4" style="display:none;"></div> <div aria-live="polite"> <div id="select-date-sr-message"></div> </div> <div id="s-lc-app-s2" class="col-md-4" style="display:none;"></div> <div id="s-lc-app-s3" class="col-md-4" style="display:none;"></div> </div> <div id="s-lc-app-form-aria-live" aria-live="assertive" aria-atomic="true"> <div id="s-lc-app-s4" style="display:none;"> </div> </div> <div id="s-lc-app-results" style="display:none;"> <div class="row"> <div class="col-md-12"> <div id="alert-register-success-msg" role="region" aria-live="polite" aria-labelledby="s-lc-app-success-intro" > <div id="s-lc-app-success-intro" class="alert alert-success s-lc-appointment-success-intro" role="status" tabindex="0"> <strong>Success!</strong> You are all set. <span id="s-lc-app-success-user-email-container"> A confirmation email with relevant appointment details was sent to <span id="s-lc-app-success-user-email"></span>. Check your spam folder if you don't see the email in your inbox. </span> </div> <p> <strong>Appointment with:</strong> <span id="s-lc-app-success-name"></span> </p> <p> <strong>Date:</strong> <span id="s-lc-app-success-date"></span> </p> <p> <strong>Start Time:</strong> <span id="s-lc-app-success-time"></span> </p> <p class="s-lc-timezone-container"> <strong>Time Zone:</strong> <span id="s-lc-app-success-timezone"></span> </p> <div id="s-lc-appointment-category" style="display:none;"> <p> <strong>Type:</strong> <span id="s-lc-app-success-category"></span> </p> </div> <p> <strong>Location:</strong> <span id="s-lc-app-success-location"></span> </p> <div id="s-lc-appointment-online-meeting" style="display:none;"> <p> <strong>Online Meeting URL:</strong> <span id="s-lc-app-success-online-url"> </span> </p> </div> <p> <strong>Directions:</strong> <span id="s-lc-app-success-directions"></span> </p> </div> <p> <button class="btn btn-default margin-top-xlg" id="s-lc-ms-sobtn" onclick="return startOver();"> Start Over </button> </p> </div> </div> </div> </div> </div> </div> </main> <footer id="s-lc-public-footer" class="row s-lc-public-footer"> <div id="s-lc-public-footer-brand"> <span title="libcal-us-3">Powered by</span> <a href="https://www.springshare.com">Springshare</a>. </div> <div id="s-lc-public-footer-rights"> All rights reserved. </div> <div id="s-lc-footer-support-link"> <a href="mailto:lib-itsd@ucsd.edu">Report a tech support issue.</a> </div> <div id="s-lc-public-footer-admin-links" role="navigation" aria-label="Admin Footer"> <a id="s-lc-sign-in" href="https://ucsd.libapps.com/libapps/login.php?site_id=4199&target=">Login to LibApps</a> </div> <div class="s-lc-public-footer-actions"> <div id="s-lc-language"> <select id="s-lc-language-selector" aria-label="Select Language"> <option value="ca" >català</option> <option value="cy" >Cymraeg</option> <option value="en" selected>English</option> <option value="es" >español</option> <option value="fr" >français</option> <option value="ga" >Irish</option> <option value="ja" >日本語 Nihongo</option> <option value="nl" >Nederlands</option> <option value="sl" >slovenski jezik</option> <option value="vi" >Tiếng Việt</option> <option value="zh" >中文 Zhōngwén</option> </select> </div> </div> </footer> <script async="" src="https://www.googletagmanager.com/gtag/js?id=G-YWRJ9Y5ZE5"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-YWRJ9Y5ZE5'); </script> <script> // SITEIMPROVE (function(){var sz=document.createElement('script');sz.type='text/javascript';sz.async=true;sz.src='https://siteimproveanalytics.com/js/siteanalyze_8343.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(sz,s);})(); </script> </div> <div id="s-lc-public-cust-footer"><!-- CAMPUS LIKE FOOTER --> <footer id="hc-footer"> <section class="container"> <div class="row"> <div class="col-sm-8"> <p> <span>UC San Diego 9500 Gilman Dr. La Jolla, CA 92093 (858) 534-2230</span><br> <span>Copyright © <span class="footer-copyright-year">2020</span> Regents of the University of California. All rights reserved.</span> </p> <ul class="footer-links"> <li><a href="https://accessibility.ucsd.edu/report-a-concern/index.html">Accessibility</a></li> <li><a href="https://ucsd.edu/about/privacy-policy.html">Privacy Policy</a></li> <li><a href="https://ucsd.edu/about/terms-of-use.html">Terms of Use</a></li> <li><a href="https://library.ucsd.edu/ask-us/library-suggestions.html">Give Feedback</a></li> </ul> </div> <div class="col-sm-4"> <a href="https://www.ucsd.edu/" class="cd-footer-logo"> <img alt="UC San Diego" class="img-responsive footer-logo" src="https://library.ucsd.edu/_files/_libapps/shared/images/logo-ucsd-footer.png"> </a> </div> </div> </section> </footer> <!-- /CAMPUS LIKE FOOTER --></div> <script defer src="https://static-assets-us.libcal.com/js_651/selectpicker.min.js"></script> <script defer src="https://static-assets-us.libcal.com/js_651/direct/public/appointments/success.min.js"></script> <script> var dateEnabledOnCalendar = [true, "", "Available"]; var dateDisabledOnCalendar = [false, "", "Not Available"]; var availableDates = []; var springyPage = { fadeInDuration: 200, loadingDisplay: "<p class='text-center'><br/><br/><br/><br/><i class='fa fa-spinner fa-spin fa-2x' aria-hidden='true'></i></p>", publicTimezone: 'America/Los_Angeles', publicTimezoneDisplay: 'Pacific Time - US & Canada', lang: { timezone: "Time\u0020Zone", changeTimezone: "change", continueButtonText: "Continue", mapLinkLabel: 'Map', mapLinkTooltip: 'Open\u0020map\u0020for\u0020\u0025name\u0025', datepickerPrevMonth: "Previous Month", datepickerNextMonth: "Next Month", datepickerSelectMonth: "Select a Month", showMonth: "Step 2. Showing calendar for month", }, }; function categoryGetVisibleId(element) { var value = element.data("value"); if (value !== undefined) { return value; } return parseInt(element.val(), 10); } function categoryGetVisibleName(element) { var value = element.data("value"); if (value !== undefined) { return element.text(); } return element.find("option:selected").text(); } function getSelectedCategoryId() { return categoryGetVisibleId(jQuery("#cat_" + selectedGroupId)); } function getSelectedCategoryName() { return categoryGetVisibleName(jQuery("#cat_" + selectedGroupId)); } function datePickerEvaluateDate(date) { var dateString = moment(date).format(springSpace.phpDateFormat); if (jQuery.inArray(dateString, availableDates) != -1) { return dateEnabledOnCalendar; } else { return dateDisabledOnCalendar; } } function handleKeypressEnterAsClick(event) { if (event.which == 13) { jQuery(this).trigger('click'); jQuery(event.data.thisButtonClass).focus(); } } function onPanelHeadingKeypress(event) { // treat enter as a click if (event.which == 13) { jQuery(this).trigger("click"); } } // support next/prev month buttons via keyboard function setupDatepickerAccessibility() { jQuery('.ui-datepicker-prev') .attr('tabindex', 0) .attr('aria-label', springyPage.lang.datepickerPrevMonth) .attr('href', '#') .on('keypress', {thisButtonClass: '.ui-datepicker-prev'}, handleKeypressEnterAsClick) .on('click', setupDatepickerAccessibility); jQuery('.ui-datepicker-next') .attr('tabindex', 0) .attr('aria-label', springyPage.lang.datepickerNextMonth) .attr('href', '#') .on('keypress', {thisButtonClass: '.ui-datepicker-next'}, handleKeypressEnterAsClick) .on('click', setupDatepickerAccessibility); jQuery('.ui-datepicker-month') // ensure that the month dropdown box is accessible .prop('title', springyPage.lang.datepickerSelectMonth) .on('change', setupDatepickerAccessibilityAndFocusMonth); return false; } function setupDatepickerAccessibilityAndFocusMonth() { setupDatepickerAccessibility(); jQuery('.ui-datepicker-month').focus(); } function formatTimeslotHtml(timeslot, date) { var start = moment(timeslot.startDisplay); var end = moment(timeslot.endDisplay); var html = '<button class="btn btn-default btn-sm s-lc-app-timeslot s-lc-app-timeb" aria-pressed="false" data-uid="' + timeslot.userId + '" data-st="' + timeslot.start + '" data-date="' + date + '" data-crc="' + timeslot.crc + '">'; html += start.format(springSpace.timeFormat); html += '<span class="s-lc-app-timeb-et"> - <span class="sr-only s-lc-app-timeb-et">until </span>'; html += end.format(springSpace.timeFormat); html += '</span>'; html += '<span class="s-lc-app-timeb-date sr-only">' + end.format(springSpace.dateFormat) + '</span>'; if (typeof timeslot.directions !== 'undefined') { html += '<span class="s-lc-app-timeb-loc">' + timeslot.directions + '</span>'; } html += '</button><span class="sr-only">, </span>'; return html; } function createTimeslotContinueButton() { return '<div class="text-center"><button type="button" id="s-lc-app-continue" class="btn btn-primary margin-top-med s-lc-app-s3-alignment" disabled="disabled">' + springyPage.lang.continueButtonText + '</button></div>'; } function hideAll() { jQuery("#s-lc-app-s1, #s-lc-app-s2, #s-lc-app-s2-content, #s-lc-app-s3, #s-lc-app-s4, #s-lc-app-results").hide(); } function startOver() { window.location.reload(false); return false; } function onBookingCreateSuccess(data) { hideAll(); populateBookingSuccessValues(data); jQuery("#s-lc-app-results").fadeIn(springyPage.fadeInDuration); } function showStaffMemberInfo(id) { jQuery("#s-lc-staff-member-info-" + id).modal("show"); return false; } function groupPanelsSetupArrows() { jQuery('.collapse').on('show.bs.collapse', function () { jQuery(this).siblings().find('.s-lc-public-panel-indicator').addClass('fa-chevron-down').removeClass('fa-chevron-right'); }); jQuery('.collapse').on('hide.bs.collapse', function () { jQuery(this).siblings().find('.s-lc-public-panel-indicator').addClass('fa-chevron-right').removeClass('fa-chevron-down'); }); } </script> <script> var dateTimeRequestInProgress = false; function getStaffList() { hideAll(); jQuery("#s-lc-app-s1").html(springyPage.loadingDisplay).fadeIn(springyPage.fadeInDuration); jQuery.ajax({ type: "get", url: "/widget/appointments/staff", data: { iid: 122, lid: 5181, uid: 0, gid: 0, cid: 0, }, dataType: "json", success: function (data) { var html = data.html ? data.html : '<div class="alert alert-danger" tabindex="0">Sorry,\u0020there\u0020are\u0020no\u0020times\u0020available.</div>'; jQuery("#s-lc-app-s1").html(html).fadeIn(springyPage.fadeInDuration); showSpecificGroup(); var staffRadioButtonElements = jQuery('.s-lc-app-sl'); staffRadioButtonElements.on('click', onStaffMemberClicked); // Move focus on datepicker when enter or space is pressed on staff member radio button springyCommon.bindAccessibleKeyPress(staffRadioButtonElements, moveFocusOnDatepicker); catGroupListen(); groupPanelsSetupArrows(); accessibleIcons(); jQuery(".panel-heading").on("click", onPanelHeadingClick).on("keypress", onPanelHeadingKeypress); catListen(); if (!data.fetchDates) { return; } getDatesAndTimes(); }, }); return false; } function moveFocusOnDatepicker() { jQuery('#s-lc-app-dp').find('.ui-state-default.ui-state-active').trigger('focus'); } function onPanelHeadingClick() { // this function makes a group active var section = jQuery(this).attr("aria-controls"); // select the first user (or no preference) in this group by default var firstUser = jQuery("#" + section).find("input[type=radio]").first(); firstUser.prop("checked", true); var cid = categoryGetVisibleId(jQuery("#" + section + " .groupcat_filtering")); if (cid > 0) { jQuery("#cid").val(cid); } getDatesAndTimes(); return true; } function showSpecificGroup() { var groupId = 0; if (groupId < 1) { return true; } jQuery(".group_panel").hide(); jQuery("#collapse" + groupId).addClass("in"); jQuery(".group_" + groupId + " input[name=staff]").first().trigger("click"); jQuery(".group_" + groupId).show(); jQuery(".groupnt_" + groupId).show(); if (jQuery(".groupnt_" + groupId).is(":visible")) { jQuery("#s-lc-app-s1date, #s-lc-app-s1time").remove(); } return true; } function onStaffMemberClicked(event) { // this prevents people clicking a staff member and then clicking a different one // quickly before the datetime request completes if (dateTimeRequestInProgress) { event.preventDefault(); return false; } dateTimeRequestInProgress = true; getDatesAndTimes(); return true; } function getSelectedUserElement() { return jQuery("input[name=staff]:checked", "#s-lc-app-slist"); } function getDatesAndTimes() { jQuery("#s-lc-app-s2, #s-lc-app-s3").hide().html(springyPage.loadingDisplay).fadeIn(springyPage.fadeInDuration); var selectedUser = getSelectedUserElement(); var uid = selectedUser.data("uid"); var gid = selectedUser.data("gid"); var cid = jQuery("#cid").val(); jQuery.ajax({ type: "get", url: "/widget/appointments/datetime", data: { iid: 122, lid: 5181, uid: uid, gid: gid, cid: cid, timezone: springyPage.publicTimezone, logging: window.location.search.includes('springy'), }, dataType: "json", success: function (data) { availableDates = data.dates; jQuery("#s-lc-app-s2").html('<h2 class="s-lc-app-s1h3" tabindex=0 aria-label="Step 2. Select\u0026\u0023x20\u003BDate\u0026\u0023x3A\u003B">2. Select\u0020Date\u003A</h2><div id="s-lc-app-dp"></div>').fadeIn(springyPage.fadeInDuration); if (data.times) { var timeslots = data.times; var date = data.date; var html = '<h2 class="s-lc-app-s1h3" aria-label="Step 3: Select\u0026\u0023x20\u003BTime\u0026\u0023x3A\u003B">3. Select\u0020Time\u003A</h2>'; html += '<h3 id="s-lc-app-timeh">' + moment(date).format(springSpace.dateFormat) + '</h3>'; html += getTimezoneDisplay(); for (var i=0; i < timeslots.length; i++) { html += formatTimeslotHtml(timeslots[i], date); } html += createTimeslotContinueButton(); jQuery("#s-lc-app-s3").hide().html(html).fadeIn(springyPage.fadeInDuration); jQuery(".s-lc-app-timeb").on("click", onTimeslotClicked); jQuery('#s-lc-app-continue').on('click', progressToBookingForm); bindTimezoneModal(); } else { jQuery("#s-lc-app-s3").hide(); } var viewDate = (data.dates && data.dates.length > 0) ? data.dates[0] : ""; setupDatepicker(viewDate); dateTimeRequestInProgress = false; }, }); return false; } function getTimezoneDisplay() { return '<div class="s-lc-timezone-container s-lc-app-change-tz-cont pad-top-med pad-bottom-med">' + springyPage.lang.timezone + ': ' + springyPage.publicTimezoneDisplay + ' (<a href="#" class="s-lc-app-change-tz-modal">' + springyPage.lang.changeTimezone + '</a>)' + '</div>'; } function bindTimezoneModal() { jQuery('.s-lc-app-change-tz-modal').off('click').on('click', springyPublic.showTimezoneModal); } function setupDatepicker(dateDefault) { jQuery("#s-lc-app-dp").datepicker({ dateFormat: "yy-mm-dd", changeMonth: true, defaultDate: dateDefault, onSelect: function (date) { datePickerSelectDate() }, beforeShowDay: datePickerEvaluateDate, onChangeMonthYear: calChangeMonthYear }); setupDatepickerAccessibility(); } function calChangeMonthYear(year, month, inst) { jQuery("#select-date-sr-message").html("<h2 class=\"sr-only\">" + springyPage.lang.showMonth + " " + month + " " + year + "</h2>"); } function datePickerSelectDate() { var date = jQuery("#s-lc-app-dp").val(); var selectedUser = getSelectedUserElement(); var uid = selectedUser.data("uid"); var gid = selectedUser.data("gid"); var cid = jQuery("#cid").val(); jQuery("#s-lc-app-s3").html(springyPage.loadingDisplay).fadeIn(springyPage.fadeInDuration); jQuery.ajax({ type: "get", url: "/widget/appointments/times", data: { iid: 122, lid: 5181, uid: uid, gid: gid, cid: cid, date: date, timezone: springyPage.publicTimezone, logging: window.location.search.includes('springy'), }, dataType: "json", success: function (data) { var html = '<h2 class="s-lc-app-s1h3" aria-label="Step 3. Select\u0026\u0023x20\u003BTime\u0026\u0023x3A\u003B">3. Select\u0020Time\u003A</h2>'; var timeslots = data.times; if (!timeslots || (timeslots.length === 0)) { html += '<div class="alert alert-danger">Sorry,\u0020there\u0020are\u0020no\u0020times\u0020available.</div>'; } else { html += '<h3 id="s-lc-app-timeh">' + moment(date).format(springSpace.dateFormat) + '</h3>'; html += getTimezoneDisplay(); for (var i=0; i < timeslots.length; i++) { html += formatTimeslotHtml(timeslots[i], date); } html += createTimeslotContinueButton(); } jQuery("#s-lc-app-s3").hide().html(html).fadeIn(springyPage.fadeInDuration).focus(); var timeSlotElements = jQuery('.s-lc-app-timeb'); timeSlotElements.on('click', onTimeslotClicked); timeSlotElements.first().trigger('focus'); jQuery('#s-lc-app-continue').on('click', progressToBookingForm); bindTimezoneModal(); }, }); return false; } function onTimeslotClicked() { jQuery('#s-lc-app-continue').prop('disabled', false).focus(); jQuery('.s-lc-app-timeslot').removeClass('active').attr('aria-pressed', false); jQuery(this).addClass('active').attr('aria-pressed', true); return false; } function redirectToLibAuthLogin(clickedSlot, userId, groupId, categoryId) { window.location = '/appointments-auth/prepare?' + jQuery.param({ iid: 122, lid: 5181, uid: userId, gid: groupId, cid: categoryId, startTime: clickedSlot.data('st'), checksum: clickedSlot.data('crc'), method: 21, }); return false; } function isUserLibAuthEnabled(selectedStaffElement, userId) { // if the selected staff member is an actual user // then we can use the libauth attribute from that element var selectedStaffId = selectedStaffElement.data('uid'); if (selectedStaffId === userId) { return selectedStaffElement.data('libauth'); } // otherwise it means that the selected staff option is either 'no preference' or a group nickname // try to get the selected users libauth setting by looking up their id var userElement = jQuery('input[name=staff][data-uid=' + userId + ']', '#s-lc-app-slist'); if (userElement.length > 0) { return userElement.data('libauth'); } // if we couldn't look them up it means the group is using group nicknames // in this case we return false here and the booking form step // will determine the libauth settings of the user return false; } function progressToBookingForm() { var clickedSlot = jQuery('.s-lc-app-timeslot.active'); var userId = clickedSlot.data("uid"); var selectedUser = getSelectedUserElement(); var groupId = selectedUser.data("gid"); var isLibAuth = isUserLibAuthEnabled(selectedUser, userId); var categoryId = jQuery("#cid").val(); if (isLibAuth) { return redirectToLibAuthLogin(clickedSlot, userId, groupId, categoryId); } hideAll(); /* Hide page title on mobile view on the final step */ jQuery('#s-lc-public-title').addClass('s-lc-desktop-only'); jQuery("#s-lc-app-s4").html(springyPage.loadingDisplay).fadeIn(springyPage.fadeInDuration); jQuery.ajax({ type: "get", url: "/widget/appointments/form", data: { iid: 122, lid: 5181, uid: userId, gid: groupId, cid: categoryId, startTime: clickedSlot.data('st'), checksum: clickedSlot.data('crc'), timezone: springyPage.publicTimezone, nocache: true, method: 21, }, dataType: "html", success: function (html) { jQuery("#s-lc-app-s4").html(html).fadeIn(springyPage.fadeInDuration); accessibleIcons(); jQuery('#s-lc-public-pd').hide(); jQuery('#s-lc-app-back-to-step1').on('click', backToStep1); }, }); return false; } function catListen() { jQuery("#cid").on("change", getDatesAndTimes); } function catGroupListen() { var cid = categoryGetVisibleId(jQuery("#s-lc-app-slist").find(".groupcat_filtering").filter(":visible").first()); if (cid > 0) { jQuery("#cid").val(cid); } jQuery(".groupcat_filtering").change(function () { var cid = parseInt(jQuery(this).val(), 10); jQuery("#cid").val(cid); getDatesAndTimes(); }); } function backToStep1() { hideAll(); /* Unhide page title on mobile view */ jQuery('#s-lc-public-title').removeClass('s-lc-desktop-only'); jQuery("#s-lc-app-s1").fadeIn(springyPage.fadeInDuration); jQuery('#s-lc-public-pd').show(); jQuery('#s-lc-app-s2').show(); var date = jQuery(this).data('date'); jQuery('#s-lc-app-dp').val(date); datePickerSelectDate(date); return false; } jQuery(function() { jQuery('#s-lc-app-location').selectpicker().on('change', springyPublic.goToSelectedUrl); getStaffList(); }); </script> </body> </html>