mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-21 07:22:21 +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': [
|
||||
$('<input/>', {
|
||||
'id': index + '-start',
|
||||
'class': 'work-start form-control input-sm'
|
||||
'class': 'work-start form-control form-control-sm'
|
||||
})
|
||||
]
|
||||
}),
|
||||
|
@ -93,7 +93,7 @@
|
|||
'html': [
|
||||
$('<input/>', {
|
||||
'id': index + '-end',
|
||||
'class': 'work-start form-control input-sm'
|
||||
'class': 'work-start form-control form-control-sm'
|
||||
})
|
||||
]
|
||||
})
|
||||
|
@ -103,8 +103,8 @@
|
|||
|
||||
if (workingDay) {
|
||||
$('#' + index).prop('checked', true);
|
||||
$('#' + index + '-start').val(Date.parse(workingDay.start).toString(timeFormat).toUpperCase());
|
||||
$('#' + index + '-end').val(Date.parse(workingDay.end).toString(timeFormat).toUpperCase());
|
||||
$('#' + index + '-start').val(Date.parse(workingDay.start).toString(timeFormat).toLowerCase());
|
||||
$('#' + index + '-end').val(Date.parse(workingDay.end).toString(timeFormat).toLowerCase());
|
||||
|
||||
// Sort day's breaks according to the starting hour
|
||||
workingDay.breaks.sort(function (break1, break2) {
|
||||
|
@ -121,11 +121,11 @@
|
|||
}),
|
||||
$('<td/>', {
|
||||
'class': 'break-start editable',
|
||||
'text': Date.parse(workingDayBreak.start).toString(timeFormat).toUpperCase()
|
||||
'text': Date.parse(workingDayBreak.start).toString(timeFormat).toLowerCase()
|
||||
}),
|
||||
$('<td/>', {
|
||||
'class': 'break-end editable',
|
||||
'text': Date.parse(workingDayBreak.end).toString(timeFormat).toUpperCase()
|
||||
'text': Date.parse(workingDayBreak.end).toString(timeFormat).toLowerCase()
|
||||
}),
|
||||
$('<td/>', {
|
||||
'html': [
|
||||
|
@ -307,11 +307,11 @@
|
|||
}),
|
||||
$('<td/>', {
|
||||
'class': 'working-plan-exception--start',
|
||||
'text': Date.parse(workingPlanException.start).toString(timeFormat)
|
||||
'text': Date.parse(workingPlanException.start).toString(timeFormat).toLowerCase()
|
||||
}),
|
||||
$('<td/>', {
|
||||
'class': 'working-plan-exception--end',
|
||||
'text': Date.parse(workingPlanException.end).toString(timeFormat)
|
||||
'text': Date.parse(workingPlanException.end).toString(timeFormat).toLowerCase()
|
||||
}),
|
||||
$('<td/>', {
|
||||
'html': [
|
||||
|
@ -379,11 +379,11 @@
|
|||
}),
|
||||
$('<td/>', {
|
||||
'class': 'break-start editable',
|
||||
'text': Date.parse('12:00:00').toString(timeFormat)
|
||||
'text': Date.parse('12:00:00').toString(timeFormat).toLowerCase()
|
||||
}),
|
||||
$('<td/>', {
|
||||
'class': 'break-end editable',
|
||||
'text': Date.parse('14:00:00').toString(timeFormat)
|
||||
'text': Date.parse('14:00:00').toString(timeFormat).toLowerCase()
|
||||
}),
|
||||
$('<td/>', {
|
||||
'html': [
|
||||
|
@ -457,7 +457,7 @@
|
|||
// Make all cells in current row editable.
|
||||
$(this).parent().parent().children().trigger('edit');
|
||||
$(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,
|
||||
closeText: EALang.close,
|
||||
timeOnlyTitle: EALang.select_time,
|
||||
|
@ -471,7 +471,7 @@
|
|||
var $tr = $(this).closest('tr');
|
||||
$tr.find('.edit-break, .delete-break').addClass('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');
|
||||
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');
|
||||
}.bind(this));
|
||||
|
||||
|
@ -516,7 +516,7 @@
|
|||
var end = Date.parse($modifiedRow.find('.break-end input').val());
|
||||
|
||||
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;
|
||||
|
@ -658,7 +658,7 @@
|
|||
if (disabled === false) {
|
||||
// Set timepickers where needed.
|
||||
$('.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,
|
||||
closeText: EALang.close,
|
||||
timeOnlyTitle: EALang.select_time,
|
||||
|
@ -672,7 +672,7 @@
|
|||
end = Date.parse($(this).parent().parent().find('.work-end').val());
|
||||
|
||||
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';
|
||||
break;
|
||||
case 'regular':
|
||||
$time_format = 'g:i A';
|
||||
$time_format = 'g:i a';
|
||||
break;
|
||||
default:
|
||||
throw new Exception('Invalid time_format value: ' . $settings['time_format']);
|
||||
|
@ -223,7 +223,7 @@ class Email {
|
|||
$time_format = 'H:i';
|
||||
break;
|
||||
case 'regular':
|
||||
$time_format = 'g:i A';
|
||||
$time_format = 'g:i a';
|
||||
break;
|
||||
default:
|
||||
throw new Exception('Invalid time_format value: ' . $settings['time_format']);
|
||||
|
|
Loading…
Reference in a new issue