Skip to content

Commit

Permalink
Fix thamara#209: Click on punch button adds multiple entries (thamara…
Browse files Browse the repository at this point in the history
  • Loading branch information
tupaschoal committed May 6, 2020
1 parent 77f6864 commit abe2c15
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,27 +204,27 @@ class Calendar {
}

this.updateLeaveBy();
$('input[type=\'time\']').on('input propertychange', function() {
$('input[type=\'time\']').off('input propertychange').on('input propertychange', function() {
updateTimeDayCallback(this.id, this.value);
});

$('#punch-button').on('click', function() {
$('#punch-button').off('click').on('click', function() {
punchDate();
});

$('#next-month').on('click', function() {
$('#next-month').off('click').on('click', function() {
nextMonth();
});

$('#prev-month').on('click', function() {
$('#prev-month').off('click').on('click', function() {
prevMonth();
});

$('#current-month').on('click', function() {
$('#current-month').off('click').on('click', function() {
goToCurrentDate();
});

$('.waiver-trigger').on('click', function() {
$('.waiver-trigger').off('click').on('click', function() {
const dayId = $(this).closest('tr').attr('id').substr(3);
const waiverDay = formatDayId(dayId);
sendWaiverDay(waiverDay);
Expand Down

0 comments on commit abe2c15

Please sign in to comment.