Skip to content

Commit 0a65f3f

Browse files
authored
Merge pull request #144 from timekit-io/show-error-and-warnings
Show error and warnings
2 parents 7061697 + 5c50593 commit 0a65f3f

27 files changed

+621
-257
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,8 @@ callbacks: {
369369
renderCompleted: function() {},
370370
showBookingPage: function(event) {},
371371
closeBookingPage: function() {},
372-
submitBookingForm: function(values) {}
372+
submitBookingForm: function(values) {},
373+
errorTriggered: function(message) {}
373374
}
374375
```
375376

dist/booking.js

Lines changed: 211 additions & 103 deletions
Large diffs are not rendered by default.

dist/booking.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/booking.min.js

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/autoload.htm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
calendar: '22f86f0c-ee80-470c-95e8-dadd9d05edd2',
2121
avatar: '../misc/avatar-mcfly.png',
2222
autoload: true,
23-
timekitConfig: {
24-
app: 'back-to-the-future'
25-
}
23+
app: 'back-to-the-future'
2624
};
2725
</script>
2826
</div>

examples/booking-engine.htm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
apiToken: 'XT1JO879JF1qUXXzmETD5ucgxaDwsFsd',
2121
calendar: '22f86f0c-ee80-470c-95e8-dadd9d05edd2',
2222
avatar: '../misc/avatar-doc.jpg',
23-
timekitConfig: {
24-
app: 'back-to-the-future'
25-
},
23+
app: 'back-to-the-future',
2624
bookingGraph: 'confirm_decline',
2725
bookingFields: {
2826
'phone': {

examples/callbacks.htm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
apiToken: 'XT1JO879JF1qUXXzmETD5ucgxaDwsFsd',
2020
calendar: '22f86f0c-ee80-470c-95e8-dadd9d05edd2',
2121
avatar: '../misc/avatar-doc.jpg',
22-
timekitConfig: {
23-
app: 'back-to-the-future'
24-
},
22+
app: 'back-to-the-future',
2523
callbacks: {
2624
findTimeStarted: function(args) { console.log('findTimeStarted', args); },
2725
findTimeSuccessful: function(response) { console.log('findTimeSuccessful', response); },

examples/fields.htm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
apiToken: 'XT1JO879JF1qUXXzmETD5ucgxaDwsFsd',
2020
calendar: '22f86f0c-ee80-470c-95e8-dadd9d05edd2',
2121
avatar: '../misc/avatar-doc.jpg',
22-
timekitConfig: {
23-
app: 'back-to-the-future'
24-
},
22+
app: 'back-to-the-future',
2523
bookingFields: {
2624
name: {
2725
placeholder: 'Your name please'

examples/group-bookings.htm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
calendar: '31078529-08db-4778-a21e-2bc8ddff806e',
2121
avatar: '../misc/avatar-doc.jpg',
2222
bookingGraph: 'group_customer',
23-
timekitConfig: {
24-
app: 'back-to-the-future'
25-
}
23+
app: 'back-to-the-future'
2624
});
2725
</script>
2826
</div>

examples/list-view.htm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
calendar: '22f86f0c-ee80-470c-95e8-dadd9d05edd2',
2121
avatar: '../misc/avatar-doc.jpg',
2222
availabilityView: 'listing',
23-
timekitConfig: {
24-
app: 'back-to-the-future'
25-
},
23+
app: 'back-to-the-future',
2624
timekitFindTime: {
2725
future: '2 days'
2826
}

examples/local-language.htm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
apiToken: 'XT1JO879JF1qUXXzmETD5ucgxaDwsFsd',
2121
calendar: '22f86f0c-ee80-470c-95e8-dadd9d05edd2',
2222
avatar: '../misc/avatar-doc.jpg',
23-
timekitConfig: {
24-
app: 'back-to-the-future'
25-
},
23+
app: 'back-to-the-future',
2624
fullCalendar: {
2725
lang: 'de'
2826
},

examples/local-preset.htm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
apiToken: 'XT1JO879JF1qUXXzmETD5ucgxaDwsFsd',
2020
calendar: '22f86f0c-ee80-470c-95e8-dadd9d05edd2',
2121
avatar: '../misc/avatar-doc.jpg',
22-
timekitConfig: {
23-
app: 'back-to-the-future'
24-
},
22+
app: 'back-to-the-future',
2523
localization: {
2624
timeDateFormat: '24h-dmy-mon'
2725
}

examples/local-strings.htm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
apiToken: 'XT1JO879JF1qUXXzmETD5ucgxaDwsFsd',
2020
calendar: '22f86f0c-ee80-470c-95e8-dadd9d05edd2',
2121
avatar: '../misc/avatar-doc.jpg',
22-
timekitConfig: {
23-
app: 'back-to-the-future'
24-
},
22+
app: 'back-to-the-future',
2523
localization: {
2624
strings: {
2725
submitText: 'Do it!',

examples/multiple.htm

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
apiToken: 'XT1JO879JF1qUXXzmETD5ucgxaDwsFsd',
2424
calendar: '22f86f0c-ee80-470c-95e8-dadd9d05edd2',
2525
avatar: '../misc/avatar-mcfly.png',
26-
timekitConfig: {
27-
app: 'back-to-the-future',
28-
}
26+
app: 'back-to-the-future'
2927
});
3028
</script>
3129
</div>
@@ -40,9 +38,7 @@
4038
apiToken: 'XT1JO879JF1qUXXzmETD5ucgxaDwsFsd',
4139
calendar: '22f86f0c-ee80-470c-95e8-dadd9d05edd2',
4240
avatar: '../misc/avatar-doc.jpg',
43-
timekitConfig: {
44-
app: 'back-to-the-future'
45-
}
41+
app: 'back-to-the-future',
4642
});
4743
</script>
4844
</div>
@@ -57,9 +53,7 @@
5753
apiToken: 'XT1JO879JF1qUXXzmETD5ucgxaDwsFsd',
5854
calendar: '22f86f0c-ee80-470c-95e8-dadd9d05edd2',
5955
avatar: '../misc/avatar-biff.jpg',
60-
timekitConfig: {
61-
app: 'back-to-the-future'
62-
}
56+
app: 'back-to-the-future'
6357
});
6458
</script>
6559
</div>

examples/remoteconfig.htm

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,9 @@
1515
<script type="text/javascript">
1616
window.timekitBookingConfig = {
1717
widgetSlug: 'cw6cbm48',
18-
timekitConfig: {
19-
app: 'back-to-the-future',
20-
apiBaseUrl: 'http://api-localhost.timekit.io/'
21-
}
18+
app: 'back-to-the-future'
2219
};
2320
</script>
2421

25-
<!--
26-
<div id="bookingjs"></div>
27-
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js" defer></script>
28-
<script src="//cdn.timekit.io/booking-js/v1/booking.min.js" defer></script>
29-
<script>window.timekitBookingConfig = { widgetId: 'c09c13f2-1299-44ea-952a-3ce0232c4c5b' }</script>
30-
-->
31-
3222
</body>
3323
</html>

examples/selectable-length.htm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<script type="text/javascript" src="../dist/booking.js"></script>
5151
<div class="buttons">
5252
<a href="#" class="button" data-duration="1 hour">
53-
<span class="button__title">Haircut and dying</span>
53+
<span class="button__title">Haircut and dyeing</span>
5454
<span class="button__duration">1 hour</span>
5555
</a>
5656
<a href="#" class="button" data-duration="2 hours">
@@ -79,9 +79,7 @@
7979
apiToken: 'XT1JO879JF1qUXXzmETD5ucgxaDwsFsd',
8080
calendar: '22f86f0c-ee80-470c-95e8-dadd9d05edd2',
8181
avatar: '../misc/avatar-doc.jpg',
82-
timekitConfig: {
83-
app: 'back-to-the-future'
84-
},
82+
app: 'back-to-the-future',
8583
timekitFindTime: {
8684
length: duration
8785
}

examples/single.htm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
apiToken: 'XT1JO879JF1qUXXzmETD5ucgxaDwsFsd',
2020
calendar: '22f86f0c-ee80-470c-95e8-dadd9d05edd2',
2121
avatar: '../misc/avatar-doc.jpg',
22-
timekitConfig: {
23-
app: 'back-to-the-future'
24-
}
22+
app: 'back-to-the-future'
2523
});
2624
</script>
2725
</div>

examples/team-availability.htm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
apiToken: 'XT1JO879JF1qUXXzmETD5ucgxaDwsFsd',
2020
calendar: '22f86f0c-ee80-470c-95e8-dadd9d05edd2',
2121
avatar: '../misc/avatar-doc.jpg',
22-
timekitConfig: {
23-
app: 'back-to-the-future'
24-
},
22+
app: 'back-to-the-future',
2523
timekitFindTimeTeam: {
2624
users: [
2725
{

src/assets/error-warning-icon.svg

Lines changed: 14 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)