mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-11 17:22:23 +03:00
Use the AM/PM postfix as lowercase everywhere for consistency.
This commit is contained in:
parent
6103b6992d
commit
5dd8540577
2 changed files with 18 additions and 18 deletions
|
@ -85,7 +85,7 @@
|
||||||
'html': [
|
'html': [
|
||||||
$('<input/>', {
|
$('<input/>', {
|
||||||
'id': index + '-start',
|
'id': index + '-start',
|
||||||
'class': 'work-start form-control input-sm'
|
'class': 'work-start form-control form-control-sm'
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
'html': [
|
'html': [
|
||||||
$('<input/>', {
|
$('<input/>', {
|
||||||
'id': index + '-end',
|
'id': index + '-end',
|
||||||
'class': 'work-start form-control input-sm'
|
'class': 'work-start form-control form-control-sm'
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -103,8 +103,8 @@
|
||||||
|
|
||||||
if (workingDay) {
|
if (workingDay) {
|
||||||
$('#' + index).prop('checked', true);
|
$('#' + index).prop('checked', true);
|
||||||
$('#' + index + '-start').val(Date.parse(workingDay.start).toString(timeFormat).toUpperCase());
|
$('#' + index + '-start').val(Date.parse(workingDay.start).toString(timeFormat).toLowerCase());
|
||||||
$('#' + index + '-end').val(Date.parse(workingDay.end).toString(timeFormat).toUpperCase());
|
$('#' + index + '-end').val(Date.parse(workingDay.end).toString(timeFormat).toLowerCase());
|
||||||
|
|
||||||
// Sort day's breaks according to the starting hour
|
// Sort day's breaks according to the starting hour
|
||||||
workingDay.breaks.sort(function (break1, break2) {
|
workingDay.breaks.sort(function (break1, break2) {
|
||||||
|
@ -121,11 +121,11 @@
|
||||||
}),
|
}),
|
||||||
$('<td/>', {
|
$('<td/>', {
|
||||||
'class': 'break-start editable',
|
'class': 'break-start editable',
|
||||||
'text': Date.parse(workingDayBreak.start).toString(timeFormat).toUpperCase()
|
'text': Date.parse(workingDayBreak.start).toString(timeFormat).toLowerCase()
|
||||||
}),
|
}),
|
||||||
$('<td/>', {
|
$('<td/>', {
|
||||||
'class': 'break-end editable',
|
'class': 'break-end editable',
|
||||||
'text': Date.parse(workingDayBreak.end).toString(timeFormat).toUpperCase()
|
'text': Date.parse(workingDayBreak.end).toString(timeFormat).toLowerCase()
|
||||||
}),
|
}),
|
||||||
$('<td/>', {
|
$('<td/>', {
|
||||||
'html': [
|
'html': [
|
||||||
|
@ -307,11 +307,11 @@
|
||||||
}),
|
}),
|
||||||
$('<td/>', {
|
$('<td/>', {
|
||||||
'class': 'working-plan-exception--start',
|
'class': 'working-plan-exception--start',
|
||||||
'text': Date.parse(workingPlanException.start).toString(timeFormat)
|
'text': Date.parse(workingPlanException.start).toString(timeFormat).toLowerCase()
|
||||||
}),
|
}),
|
||||||
$('<td/>', {
|
$('<td/>', {
|
||||||
'class': 'working-plan-exception--end',
|
'class': 'working-plan-exception--end',
|
||||||
'text': Date.parse(workingPlanException.end).toString(timeFormat)
|
'text': Date.parse(workingPlanException.end).toString(timeFormat).toLowerCase()
|
||||||
}),
|
}),
|
||||||
$('<td/>', {
|
$('<td/>', {
|
||||||
'html': [
|
'html': [
|
||||||
|
@ -379,11 +379,11 @@
|
||||||
}),
|
}),
|
||||||
$('<td/>', {
|
$('<td/>', {
|
||||||
'class': 'break-start editable',
|
'class': 'break-start editable',
|
||||||
'text': Date.parse('12:00:00').toString(timeFormat)
|
'text': Date.parse('12:00:00').toString(timeFormat).toLowerCase()
|
||||||
}),
|
}),
|
||||||
$('<td/>', {
|
$('<td/>', {
|
||||||
'class': 'break-end editable',
|
'class': 'break-end editable',
|
||||||
'text': Date.parse('14:00:00').toString(timeFormat)
|
'text': Date.parse('14:00:00').toString(timeFormat).toLowerCase()
|
||||||
}),
|
}),
|
||||||
$('<td/>', {
|
$('<td/>', {
|
||||||
'html': [
|
'html': [
|
||||||
|
@ -457,7 +457,7 @@
|
||||||
// Make all cells in current row editable.
|
// Make all cells in current row editable.
|
||||||
$(this).parent().parent().children().trigger('edit');
|
$(this).parent().parent().children().trigger('edit');
|
||||||
$(this).parent().parent().find('.break-start input, .break-end input').timepicker({
|
$(this).parent().parent().find('.break-start input, .break-end input').timepicker({
|
||||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm TT' : 'HH:mm',
|
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm',
|
||||||
currentText: EALang.now,
|
currentText: EALang.now,
|
||||||
closeText: EALang.close,
|
closeText: EALang.close,
|
||||||
timeOnlyTitle: EALang.select_time,
|
timeOnlyTitle: EALang.select_time,
|
||||||
|
@ -471,7 +471,7 @@
|
||||||
var $tr = $(this).closest('tr');
|
var $tr = $(this).closest('tr');
|
||||||
$tr.find('.edit-break, .delete-break').addClass('d-none');
|
$tr.find('.edit-break, .delete-break').addClass('d-none');
|
||||||
$tr.find('.save-break, .cancel-break').removeClass('d-none');
|
$tr.find('.save-break, .cancel-break').removeClass('d-none');
|
||||||
$tr.find('select,input:text').addClass('form-control input-sm')
|
$tr.find('select,input:text').addClass('form-control form-control-sm')
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -497,7 +497,7 @@
|
||||||
$modifiedRow.find('.cancel-editable').trigger('click');
|
$modifiedRow.find('.cancel-editable').trigger('click');
|
||||||
this.enableCancel = false;
|
this.enableCancel = false;
|
||||||
|
|
||||||
$(element).closest('table').find('.edit-break, .delete-break').removeClass('d-none');
|
$modifiedRow.find('.edit-break, .delete-break').removeClass('d-none');
|
||||||
$modifiedRow.find('.save-break, .cancel-break').addClass('d-none');
|
$modifiedRow.find('.save-break, .cancel-break').addClass('d-none');
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
|
@ -516,7 +516,7 @@
|
||||||
var end = Date.parse($modifiedRow.find('.break-end input').val());
|
var end = Date.parse($modifiedRow.find('.break-end input').val());
|
||||||
|
|
||||||
if (start > end) {
|
if (start > end) {
|
||||||
$modifiedRow.find('.break-end input').val(start.addHours(1).toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm'));
|
$modifiedRow.find('.break-end input').val(start.addHours(1).toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm').toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.enableSubmit = true;
|
this.enableSubmit = true;
|
||||||
|
@ -658,7 +658,7 @@
|
||||||
if (disabled === false) {
|
if (disabled === false) {
|
||||||
// Set timepickers where needed.
|
// Set timepickers where needed.
|
||||||
$('.working-plan input:text').timepicker({
|
$('.working-plan input:text').timepicker({
|
||||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm TT' : 'HH:mm',
|
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm',
|
||||||
currentText: EALang.now,
|
currentText: EALang.now,
|
||||||
closeText: EALang.close,
|
closeText: EALang.close,
|
||||||
timeOnlyTitle: EALang.select_time,
|
timeOnlyTitle: EALang.select_time,
|
||||||
|
@ -672,7 +672,7 @@
|
||||||
end = Date.parse($(this).parent().parent().find('.work-end').val());
|
end = Date.parse($(this).parent().parent().find('.work-end').val());
|
||||||
|
|
||||||
if (start > end) {
|
if (start > end) {
|
||||||
$(this).parent().parent().find('.work-end').val(start.addHours(1).toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm'));
|
$(this).parent().parent().find('.work-end').val(start.addHours(1).toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm').toLowerCase());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -119,7 +119,7 @@ class Email {
|
||||||
$time_format = 'H:i';
|
$time_format = 'H:i';
|
||||||
break;
|
break;
|
||||||
case 'regular':
|
case 'regular':
|
||||||
$time_format = 'g:i A';
|
$time_format = 'g:i a';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Exception('Invalid time_format value: ' . $settings['time_format']);
|
throw new Exception('Invalid time_format value: ' . $settings['time_format']);
|
||||||
|
@ -223,7 +223,7 @@ class Email {
|
||||||
$time_format = 'H:i';
|
$time_format = 'H:i';
|
||||||
break;
|
break;
|
||||||
case 'regular':
|
case 'regular':
|
||||||
$time_format = 'g:i A';
|
$time_format = 'g:i a';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Exception('Invalid time_format value: ' . $settings['time_format']);
|
throw new Exception('Invalid time_format value: ' . $settings['time_format']);
|
||||||
|
|
Loading…
Reference in a new issue