Skip to content

Commit

Permalink
Merge branch 'master' into stop-the-bleeding
Browse files Browse the repository at this point in the history
# Conflicts:
#	dist/booking.js.map
#	dist/booking.min.js
  • Loading branch information
laander committed Jul 7, 2017
2 parents 3f30619 + 3eaaa93 commit 51ead54
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 21 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,15 @@ localization: {
},
```
For full language support, FullCalendar also takes a ["lang" option](http://fullcalendar.io/docs/text/lang/), accompanied by a language file. Make sure to use defer attribute on a script tag loading the language file if you are deferring booking.js, language file should be loaded after booking.js, but before initialization.
For full language support, FullCalendar also takes a ["locale" option](http://fullcalendar.io/docs/text/lang/), accompanied by a language file. Make sure to use defer attribute on a script tag loading the language file if you are deferring booking.js, language file should be loaded after booking.js, but before initialization.
Remember to set `localization.timeDateFormat` to false so it doesn't override the language file's settings.
See `/examples/local-language.htm`
```javascript
fullCalendar: {
lang: 'de'
locale: 'de'
},
localization: {
timeDateFormat: false
Expand Down
20 changes: 14 additions & 6 deletions dist/booking.js
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ return /******/ (function(modules) { // webpackBootstrap
// Get library version
var getVersion = function() {

return ("1.16.0");
return ("1.17.0");

};

Expand Down Expand Up @@ -1031,7 +1031,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @type {Object}
*/
var config = {
app: 'demo',
app: '',
apiBaseUrl: 'https://api.timekit.io/',
apiVersion: 'v2',
convertResponseToCamelcase: false,
Expand Down Expand Up @@ -1085,10 +1085,18 @@ return /******/ (function(modules) { // webpackBootstrap
// add http headers if applicable
args.headers = args.headers || headers || {};

if (!args.headers['Timekit-App']) args.headers['Timekit-App'] = config.app;
if (config.inputTimestampFormat) { args.headers['Timekit-InputTimestampFormat'] = config.inputTimestampFormat; }
if (config.outputTimestampFormat) { args.headers['Timekit-OutputTimestampFormat'] = config.outputTimestampFormat; }
if (config.timezone) { args.headers['Timekit-Timezone'] = config.timezone; }
if (!args.headers['Timekit-App'] && config.app) {
args.headers['Timekit-App'] = config.app;
}
if (config.inputTimestampFormat) {
args.headers['Timekit-InputTimestampFormat'] = config.inputTimestampFormat;
}
if (config.outputTimestampFormat) {
args.headers['Timekit-OutputTimestampFormat'] = config.outputTimestampFormat;
}
if (config.timezone) {
args.headers['Timekit-Timezone'] = config.timezone;
}

// add auth headers if not being overwritten by request/asUser
if (!args.headers['Authorization'] && userEmail && userToken) {
Expand Down
2 changes: 1 addition & 1 deletion dist/booking.js.map

Large diffs are not rendered by default.

17 changes: 8 additions & 9 deletions dist/booking.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/local-language.htm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript" src="../dist/booking.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.4.0/lang/de.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/locale/de.js"></script>
<div id="bookingjs">
<script type="text/javascript">
TimekitBooking().init({
Expand All @@ -22,7 +22,7 @@
avatar: '../misc/avatar-doc.jpg',
app: 'back-to-the-future',
fullCalendar: {
lang: 'de'
locale: 'de'
},
localization: {
timeDateFormat: false
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "timekit-booking",
"version": "1.16.0",
"version": "1.17.0",
"description": "Make a beautiful embeddable booking widget in minutes",
"main": "dist/booking.min.js",
"repository": {
Expand Down

0 comments on commit 51ead54

Please sign in to comment.