timum-booking-event-hooks-call-backs

by timum

HTML

<div id="bookingjs"></div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@timum/timum-booking@^2.10.1/dist/main.booking.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/locale/de.js"></script>
<script type="text/javascript">
  Timum().init({
    resourceId: "booking-widget-demo-resource@3da92d50-78e6-11ea-aba9-06ecf2a1ba22@timum",
    callbacks: {
       timumFetchBookablesStarted: function (args) {
         console.log("timumFetchBookablesStarted", args);
       },
      timumFetchBookablesSuccessful: function (response) {
        console.log("timumFetchBookablesSuccessful", response);
      },
      timumFetchBookablesFailed: function (response) {
        console.log("timumFetchBookablesFailed", response);
      },
      createBookingStarted: function (args) {
        console.log("createBookingStarted", args);
      },
      createBookingSuccessful: function (response) {
        console.log("createBookingSuccessful", response);
      },
      createBookingFailed: function (response) {
        console.log("createBookingFailed", response);
      },
      fullCalendarInitialized: function () {
        console.log("fullCalendarInitialized");
      },
      renderCompleted: function () {
        console.log("renderCompleted");
      },
      openedBookingPage: function (slot) {
        console.log("openedBookingPage", slot);
      },
      closeBookingPage: function () {
        console.log("closeBookingPage");
      },
      submitBookingForm: function (values) {
        console.log("submitBookingForm", values);
      },
      timumFetchProductsStarted: function (){
        console.log("timumFetchProductsStarted");
      },
      timumFetchProductsSuccessfull: function () {
        console.log("timumFetchProductsSuccessfull");
  ...

CSS

body {
        background-color: #e6e6e6;
        max-width: 700px;
        margin: 0 auto;
      }


      /*  This is just a selection of classes that you may want to override to customise the appeareance of the calendar.

                The "design" chosen below serves to showcase the flexibility of the interface. 

                To use the timum standard color scheme delete the css below this text.   
            */

      /* chnage this varaiable to change the font in all of all elements */
      :root {
        --font: 'Open Sans', Helvetica, Tahoma, Arial, sans-serif;
      }


      /* override the standard appeareance of events/appointments/timeslots/availabilities (whatever you may call it) */

      .fc-time-grid-event {
        background-color: #FFF !important;
        color: #333 !important;
        /* text color */
        border-left-color: #939393 !important;
        border-left-style: solid !important;
        border-left-width: 2px !important;
      }

      .bookingjs {
        font-family: var(--font) !important;
        background-color: #fff !important;
        border-top-color: #fff !important;
      }

      /* change appeareance of the booking dialog */
      .bookingjs-bookpage {
        background-color: whitesmoke !important;
        font-family: var(--font) !important;
        color: gray !important;
        /* text color */
      }

      /* override appeareance of the booking button (shown in booking dialog) */
      .bookingjs-form-button {
        background-color: #2e5bec !important;
        font-family: var(--font);
      }

      /* override appeareance of input fields (shown in booking dialog) */
      input {
        font-family: var(--font) !important;
        /* font of hint */
        color: #333 !important;
        /* text color when typing*/
      }

      /* text color and opacity of hint */
      ::placeholder {
        color: grey;
        opacity: 1;
...