Booking-js嵌入式預(yù)定系統(tǒng)
Booking-js 是一個簡單漂亮的嵌入式預(yù)定系統(tǒng)。它用 FullCalendar 來自定義主題。
示例代碼:
{ // Required
email: '',
// Your Timekit user's email (used for auth)
apiToken: '',
// Your Timekit user's apiToken (as generated through the wizard)
calendar: '',
// Your Timekit calendar ID that bookings should end up in
// Optional
targetEl: '#bookingjs',
// Which element should we the library load into
name: '',
// Display name to show in the header and timezone helper
avatar: '',
// Provide an image URL for a circular image avatar
autoload: true,
// Auto initialization if config object is found on window var
includeStyles: true,
// Inject fullCalendar and library styles in <head>
showCredits: true,
// Display a "Powered by Timekit" attribution footer (thanks!)
// Internationalization
localization: {
showTimezoneHelper: true,
// Should the timezone difference helper (bottom) be shown?
timeDateFormat: '12h-mdy-sun'
// For EU-style formatting, use '24h-dmy-mon' (see below)
}
// Timekit JS SDK (see below)
timekitConfig: { ... },
// Timekit FindTime endpoint (see below)
timekitFindTime: { ... },
// Timekit CreateEvent endpoint (see below)
timekitCreateEvent: { ... },
// FullCalendar options (see below)
fullCalendar: { ... },
// Register callbacks on events
callbacks: {
findTimeStarted:
function(args) {},
findTimeSuccessful:
function(response) {},
findTimeFailed:
function(response) {},
createEventStarted:
function(args) {},
createEventSuccessful:
function(response) {},
createEventFailed:
function(response) {},
getUserTimezoneStarted:
function(args) {},
getUserTimezoneSuccesful: function(response) {},
getUserTimezoneFailed: function(response) {},
fullCalendarInitialized: function() {},
renderCompleted: function() {},
showBookingPage: function(event) {},
closeBookingPage: function() {},
submitBookingForm: function(values) {}
}
}
評論
圖片
表情
