diff --git a/src/assets/js/backend_calendar.js b/src/assets/js/backend_calendar.js index b411898a..77637477 100644 --- a/src/assets/js/backend_calendar.js +++ b/src/assets/js/backend_calendar.js @@ -842,8 +842,6 @@ var BackendCalendar = { // Display modal form. $dialog.find('.modal-header h3').text(EALang['new_appointment_title']); $dialog.modal('show'); - - }); /** @@ -926,51 +924,48 @@ var BackendCalendar = { * Event: Filter Existing Customers "Change" */ $('#filter-existing-customers').keyup(function() { - var key = $(this).val().toLowerCase(); - var $list = $('#existing-customers-list'); + var key = $(this).val().toLowerCase(), + $list = $('#existing-customers-list'), + postUrl = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_filter_customers', + postData = { + 'csrfToken': GlobalVariables.csrfToken, + 'key': key + }; - var postUrl = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_filter_customers'; - var postData = { - 'csrfToken': GlobalVariables.csrfToken, - 'key': key - }; - - // Try to get the updated customer list + // Try to get the updated customer list. $.ajax({ - 'type': 'POST', - 'url': postUrl, - 'data': postData, - 'dataType': 'json', - 'timeout': 1000, - 'global': false, - 'success': function(response) { + type: 'POST', + url: postUrl, + data: postData, + dataType: 'json', + timeout: 1000, + global: false, + success: function(response) { ///////////////////////////////////////////////////////////// - console.log('Filter Customers Appointment Response:', response); + // console.log('Filter Customers Appointment Response:', response); ///////////////////////////////////////////////////////////// $list.empty(); $.each(response, function(index, c) { $list.append('