forked from mirrors/easyappointments
Performance optimization in backend calendar page, after the user clicks the insert appointment button. (#500)
This commit is contained in:
parent
58ab2b0c8e
commit
caa45a65f1
2 changed files with 11 additions and 10 deletions
|
@ -12,7 +12,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
|
||||
- #480: Make the app GDPR - new EU privacy regulations compliant.
|
||||
- #489: REST API response headers must use the Content-Type application/json value.
|
||||
|
||||
- #500: Performance optimization in backend calendar page, after the user clicks the insert appointment button.
|
||||
|
||||
## [1.3.1]
|
||||
|
||||
### Added
|
||||
|
|
|
@ -127,16 +127,16 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
|
|||
|
||||
// Set the selected filter item and find the next appointment time as the default modal values.
|
||||
if ($('#select-filter-item option:selected').attr('type') == 'provider') {
|
||||
var $providerOption = $dialog.find('#select-provider option[value="'
|
||||
+ $('#select-filter-item').val() + '"]');
|
||||
if ($providerOption.length === 0) { // Change the services until you find the correct.
|
||||
$.each($dialog.find('#select-service option'), function () {
|
||||
$(this).prop('selected', true).parent().change();
|
||||
if ($providerOption.length > 0)
|
||||
return false;
|
||||
});
|
||||
var providerId = $('#select-filter-item').val();
|
||||
|
||||
var providers = GlobalVariables.availableProviders.filter(function (provider) {
|
||||
return provider.id == providerId;
|
||||
});
|
||||
|
||||
if (providers.length) {
|
||||
$dialog.find('#select-service').val(providers[0].services[0]).trigger('change');
|
||||
$dialog.find('#select-provider').val(providerId);
|
||||
}
|
||||
$providerOption.prop('selected', true);
|
||||
} else {
|
||||
$dialog.find('#select-service option[value="'
|
||||
+ $('#select-filter-item').val() + '"]').prop('selected', true);
|
||||
|
|
Loading…
Reference in a new issue