mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-08 17:12:25 +03:00
Replace custom event handler methods with the use of "on".
This commit is contained in:
parent
6c8fea4ad8
commit
a1c10fc2d3
14 changed files with 52 additions and 52 deletions
|
@ -40,7 +40,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
|
||||||
*
|
*
|
||||||
* Closes the dialog without saving any changes to the database.
|
* Closes the dialog without saving any changes to the database.
|
||||||
*/
|
*/
|
||||||
$('#manage-appointment #cancel-appointment').click(function () {
|
$('#manage-appointment #cancel-appointment').on('click', function () {
|
||||||
$('#manage-appointment').modal('hide');
|
$('#manage-appointment').modal('hide');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
|
||||||
*
|
*
|
||||||
* Stores the appointment changes or inserts a new appointment depending the dialog mode.
|
* Stores the appointment changes or inserts a new appointment depending the dialog mode.
|
||||||
*/
|
*/
|
||||||
$('#manage-appointment #save-appointment').click(function () {
|
$('#manage-appointment #save-appointment').on('click', function () {
|
||||||
// Before doing anything the appointment data need to be validated.
|
// Before doing anything the appointment data need to be validated.
|
||||||
if (!validateAppointmentForm()) {
|
if (!validateAppointmentForm()) {
|
||||||
return;
|
return;
|
||||||
|
@ -124,7 +124,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
|
||||||
* When the user presses this button, the manage appointment dialog opens and lets the user to
|
* When the user presses this button, the manage appointment dialog opens and lets the user to
|
||||||
* create a new appointment.
|
* create a new appointment.
|
||||||
*/
|
*/
|
||||||
$('#insert-appointment').click(function () {
|
$('#insert-appointment').on('click', function () {
|
||||||
$('.popover').remove();
|
$('.popover').remove();
|
||||||
|
|
||||||
BackendCalendarAppointmentsModal.resetAppointmentDialog();
|
BackendCalendarAppointmentsModal.resetAppointmentDialog();
|
||||||
|
@ -178,7 +178,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
|
||||||
/**
|
/**
|
||||||
* Event: Pick Existing Customer Button "Click"
|
* Event: Pick Existing Customer Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#select-customer').click(function () {
|
$('#select-customer').on('click', function () {
|
||||||
var $list = $('#existing-customers-list');
|
var $list = $('#existing-customers-list');
|
||||||
|
|
||||||
if (!$list.is(':visible')) {
|
if (!$list.is(':visible')) {
|
||||||
|
@ -229,7 +229,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
|
||||||
/**
|
/**
|
||||||
* Event: Filter Existing Customers "Change"
|
* Event: Filter Existing Customers "Change"
|
||||||
*/
|
*/
|
||||||
$('#filter-existing-customers').keyup(function () {
|
$('#filter-existing-customers').on('keyup', function () {
|
||||||
var key = $(this).val().toLowerCase();
|
var key = $(this).val().toLowerCase();
|
||||||
var $list = $('#existing-customers-list');
|
var $list = $('#existing-customers-list');
|
||||||
|
|
||||||
|
@ -292,7 +292,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
|
||||||
* When the user clicks on a service, its available providers should become visible. Also we need to
|
* When the user clicks on a service, its available providers should become visible. Also we need to
|
||||||
* update the start and end time of the appointment.
|
* update the start and end time of the appointment.
|
||||||
*/
|
*/
|
||||||
$('#select-service').change(function () {
|
$('#select-service').on('change', function () {
|
||||||
var serviceId = $('#select-service').val();
|
var serviceId = $('#select-service').val();
|
||||||
|
|
||||||
$('#select-provider').empty();
|
$('#select-provider').empty();
|
||||||
|
@ -329,14 +329,14 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
|
||||||
/**
|
/**
|
||||||
* Event: Provider "Change"
|
* Event: Provider "Change"
|
||||||
*/
|
*/
|
||||||
$('#select-provider').change(function () {
|
$('#select-provider').on('change', function () {
|
||||||
updateTimezone();
|
updateTimezone();
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event: Enter New Customer Button "Click"
|
* Event: Enter New Customer Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#new-customer').click(function () {
|
$('#new-customer').on('click', function () {
|
||||||
$('#manage-appointment').find('#customer-id, #first-name, #last-name, #email, '
|
$('#manage-appointment').find('#customer-id, #first-name, #last-name, #email, '
|
||||||
+ '#phone-number, #address, #city, #zip-code, #customer-notes').val('');
|
+ '#phone-number, #address, #city, #zip-code, #customer-notes').val('');
|
||||||
});
|
});
|
||||||
|
|
|
@ -39,7 +39,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
||||||
*
|
*
|
||||||
* When the user clicks the reload button an the calendar items need to be refreshed.
|
* When the user clicks the reload button an the calendar items need to be refreshed.
|
||||||
*/
|
*/
|
||||||
$('#reload-appointments').click(function () {
|
$('#reload-appointments').on('click', function () {
|
||||||
refreshCalendarAppointments(
|
refreshCalendarAppointments(
|
||||||
$('#calendar'),
|
$('#calendar'),
|
||||||
$('#select-filter-item').val(),
|
$('#select-filter-item').val(),
|
||||||
|
@ -221,7 +221,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
||||||
*
|
*
|
||||||
* Load the appointments that correspond to the select filter item and display them on the calendar.
|
* Load the appointments that correspond to the select filter item and display them on the calendar.
|
||||||
*/
|
*/
|
||||||
$('#select-filter-item').change(function () {
|
$('#select-filter-item').on('change', function () {
|
||||||
// If current value is service, then the sync buttons must be disabled.
|
// If current value is service, then the sync buttons must be disabled.
|
||||||
if ($('#select-filter-item option:selected').attr('type') === FILTER_TYPE_SERVICE) {
|
if ($('#select-filter-item option:selected').attr('type') === FILTER_TYPE_SERVICE) {
|
||||||
$('#google-sync, #enable-sync, #insert-appointment, #insert-dropdown').prop('disabled', true);
|
$('#google-sync, #enable-sync, #insert-appointment, #insert-dropdown').prop('disabled', true);
|
||||||
|
|
|
@ -28,7 +28,7 @@ window.BackendCalendarExtraPeriodsModal = window.BackendCalendarExtraPeriodsModa
|
||||||
*
|
*
|
||||||
* Stores the extra period changes or inserts a new record.
|
* Stores the extra period changes or inserts a new record.
|
||||||
*/
|
*/
|
||||||
$('#manage-extra #save-extra').click(function () {
|
$('#manage-extra #save-extra').on('click', function () {
|
||||||
var $dialog = $('#manage-extra');
|
var $dialog = $('#manage-extra');
|
||||||
$dialog.find('.has-error').removeClass('has-error');
|
$dialog.find('.has-error').removeClass('has-error');
|
||||||
var start = $dialog.find('#extra-start').datetimepicker('getDate');
|
var start = $dialog.find('#extra-start').datetimepicker('getDate');
|
||||||
|
@ -99,7 +99,7 @@ window.BackendCalendarExtraPeriodsModal = window.BackendCalendarExtraPeriodsModa
|
||||||
*
|
*
|
||||||
* Closes the dialog without saveing any changes to the database.
|
* Closes the dialog without saveing any changes to the database.
|
||||||
*/
|
*/
|
||||||
$('#manage-extra #cancel-extra').click(function () {
|
$('#manage-extra #cancel-extra').on('click', function () {
|
||||||
$('#manage-extra').modal('hide');
|
$('#manage-extra').modal('hide');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ window.BackendCalendarExtraPeriodsModal = window.BackendCalendarExtraPeriodsModa
|
||||||
* When the user clicks this button a popup dialog appears and the use can set a time period where
|
* When the user clicks this button a popup dialog appears and the use can set a time period where
|
||||||
* he cannot accept any appointments.
|
* he cannot accept any appointments.
|
||||||
*/
|
*/
|
||||||
$('#insert-extra-period').click(function () {
|
$('#insert-extra-period').on('click', function () {
|
||||||
BackendCalendarExtraPeriodsModal.resetExtraDialog();
|
BackendCalendarExtraPeriodsModal.resetExtraDialog();
|
||||||
var $dialog = $('#manage-extra');
|
var $dialog = $('#manage-extra');
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ window.BackendCalendarGoogleSync = window.BackendCalendarGoogleSync || {};
|
||||||
* When the user clicks on the "Enable Sync" button, a popup should appear
|
* When the user clicks on the "Enable Sync" button, a popup should appear
|
||||||
* that is going to follow the web server authorization flow of OAuth.
|
* that is going to follow the web server authorization flow of OAuth.
|
||||||
*/
|
*/
|
||||||
$('#enable-sync').click(function () {
|
$('#enable-sync').on('click', function () {
|
||||||
if ($('#enable-sync').hasClass('enabled') === false) {
|
if ($('#enable-sync').hasClass('enabled') === false) {
|
||||||
// Enable synchronization for selected provider.
|
// Enable synchronization for selected provider.
|
||||||
var authUrl = GlobalVariables.baseUrl + '/index.php/google/oauth/'
|
var authUrl = GlobalVariables.baseUrl + '/index.php/google/oauth/'
|
||||||
|
@ -112,7 +112,7 @@ window.BackendCalendarGoogleSync = window.BackendCalendarGoogleSync || {};
|
||||||
/**
|
/**
|
||||||
* Event: Select Google Calendar "Click"
|
* Event: Select Google Calendar "Click"
|
||||||
*/
|
*/
|
||||||
$('#select-calendar').click(function () {
|
$('#select-calendar').on('click', function () {
|
||||||
var url = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_select_google_calendar';
|
var url = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_select_google_calendar';
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
|
@ -131,7 +131,7 @@ window.BackendCalendarGoogleSync = window.BackendCalendarGoogleSync || {};
|
||||||
/**
|
/**
|
||||||
* Event: Close Google Calendar "Click"
|
* Event: Close Google Calendar "Click"
|
||||||
*/
|
*/
|
||||||
$('#close-calendar').click(function () {
|
$('#close-calendar').on('click', function () {
|
||||||
$('#select-google-calendar').modal('hide');
|
$('#select-google-calendar').modal('hide');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ window.BackendCalendarGoogleSync = window.BackendCalendarGoogleSync || {};
|
||||||
*
|
*
|
||||||
* Trigger the synchronization algorithm.
|
* Trigger the synchronization algorithm.
|
||||||
*/
|
*/
|
||||||
$('#google-sync').click(function () {
|
$('#google-sync').on('click', function () {
|
||||||
var url = GlobalVariables.baseUrl + '/index.php/google/sync/' + $('#select-filter-item').val();
|
var url = GlobalVariables.baseUrl + '/index.php/google/sync/' + $('#select-filter-item').val();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
|
@ -28,7 +28,7 @@ window.BackendCalendarUnavailabilitiesModal = window.BackendCalendarUnavailabili
|
||||||
*
|
*
|
||||||
* Stores the unavailable period changes or inserts a new record.
|
* Stores the unavailable period changes or inserts a new record.
|
||||||
*/
|
*/
|
||||||
$('#manage-unavailable #save-unavailable').click(function () {
|
$('#manage-unavailable #save-unavailable').on('click', function () {
|
||||||
var $dialog = $('#manage-unavailable');
|
var $dialog = $('#manage-unavailable');
|
||||||
$dialog.find('.has-error').removeClass('has-error');
|
$dialog.find('.has-error').removeClass('has-error');
|
||||||
var start = $dialog.find('#unavailable-start').datetimepicker('getDate');
|
var start = $dialog.find('#unavailable-start').datetimepicker('getDate');
|
||||||
|
@ -76,7 +76,7 @@ window.BackendCalendarUnavailabilitiesModal = window.BackendCalendarUnavailabili
|
||||||
*
|
*
|
||||||
* Closes the dialog without saveing any changes to the database.
|
* Closes the dialog without saveing any changes to the database.
|
||||||
*/
|
*/
|
||||||
$('#manage-unavailable #cancel-unavailable').click(function () {
|
$('#manage-unavailable #cancel-unavailable').on('click', function () {
|
||||||
$('#manage-unavailable').modal('hide');
|
$('#manage-unavailable').modal('hide');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ window.BackendCalendarUnavailabilitiesModal = window.BackendCalendarUnavailabili
|
||||||
* When the user clicks this button a popup dialog appears and the use can set a time period where
|
* When the user clicks this button a popup dialog appears and the use can set a time period where
|
||||||
* he cannot accept any appointments.
|
* he cannot accept any appointments.
|
||||||
*/
|
*/
|
||||||
$('#insert-unavailable').click(function () {
|
$('#insert-unavailable').on('click', function () {
|
||||||
BackendCalendarUnavailabilitiesModal.resetUnavailableDialog();
|
BackendCalendarUnavailabilitiesModal.resetUnavailableDialog();
|
||||||
var $dialog = $('#manage-unavailable');
|
var $dialog = $('#manage-unavailable');
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Filter Categories Cancel Button "Click"
|
* Event: Filter Categories Cancel Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#filter-categories .clear').click(function () {
|
$('#filter-categories .clear').on('click', function () {
|
||||||
$('#filter-categories .key').val('');
|
$('#filter-categories .key').val('');
|
||||||
instance.filter('');
|
instance.filter('');
|
||||||
instance.resetForm();
|
instance.resetForm();
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Add Category Button "Click"
|
* Event: Add Category Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#add-category').click(function () {
|
$('#add-category').on('click', function () {
|
||||||
instance.resetForm();
|
instance.resetForm();
|
||||||
$('#categories .add-edit-delete-group').hide();
|
$('#categories .add-edit-delete-group').hide();
|
||||||
$('#categories .save-cancel-group').show();
|
$('#categories .save-cancel-group').show();
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Edit Category Button "Click"
|
* Event: Edit Category Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#edit-category').click(function () {
|
$('#edit-category').on('click', function () {
|
||||||
$('#categories .add-edit-delete-group').hide();
|
$('#categories .add-edit-delete-group').hide();
|
||||||
$('#categories .save-cancel-group').show();
|
$('#categories .save-cancel-group').show();
|
||||||
$('#categories .record-details').find('input, textarea').prop('readonly', false);
|
$('#categories .record-details').find('input, textarea').prop('readonly', false);
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Delete Category Button "Click"
|
* Event: Delete Category Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#delete-category').click(function () {
|
$('#delete-category').on('click', function () {
|
||||||
var categoryId = $('#category-id').val();
|
var categoryId = $('#category-id').val();
|
||||||
|
|
||||||
var buttons = [
|
var buttons = [
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Categories Save Button "Click"
|
* Event: Categories Save Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#save-category').click(function () {
|
$('#save-category').on('click', function () {
|
||||||
var category = {
|
var category = {
|
||||||
name: $('#category-name').val(),
|
name: $('#category-name').val(),
|
||||||
description: $('#category-description').val()
|
description: $('#category-description').val()
|
||||||
|
@ -148,7 +148,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Cancel Category Button "Click"
|
* Event: Cancel Category Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#cancel-category').click(function () {
|
$('#cancel-category').on('click', function () {
|
||||||
var id = $('#category-id').val();
|
var id = $('#category-id').val();
|
||||||
instance.resetForm();
|
instance.resetForm();
|
||||||
if (id !== '') {
|
if (id !== '') {
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Filter Customers Clear Button "Click"
|
* Event: Filter Customers Clear Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#filter-customers .clear').click(function () {
|
$('#filter-customers .clear').on('click', function () {
|
||||||
$('#filter-customers .key').val('');
|
$('#filter-customers .key').val('');
|
||||||
instance.filterLimit = 20;
|
instance.filterLimit = 20;
|
||||||
instance.filter('');
|
instance.filter('');
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Add Customer Button "Click"
|
* Event: Add Customer Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#add-customer').click(function () {
|
$('#add-customer').on('click', function () {
|
||||||
instance.resetForm();
|
instance.resetForm();
|
||||||
$('#add-edit-delete-group').hide();
|
$('#add-edit-delete-group').hide();
|
||||||
$('#save-cancel-group').show();
|
$('#save-cancel-group').show();
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Edit Customer Button "Click"
|
* Event: Edit Customer Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#edit-customer').click(function () {
|
$('#edit-customer').on('click', function () {
|
||||||
$('.record-details').find('input, textarea').prop('readonly', false);
|
$('.record-details').find('input, textarea').prop('readonly', false);
|
||||||
$('.record-details select').prop('disabled', false);
|
$('.record-details select').prop('disabled', false);
|
||||||
$('#add-edit-delete-group').hide();
|
$('#add-edit-delete-group').hide();
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Cancel Customer Add/Edit Operation Button "Click"
|
* Event: Cancel Customer Add/Edit Operation Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#cancel-customer').click(function () {
|
$('#cancel-customer').on('click', function () {
|
||||||
var id = $('#customer-id').val();
|
var id = $('#customer-id').val();
|
||||||
instance.resetForm();
|
instance.resetForm();
|
||||||
if (id) {
|
if (id) {
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Save Add/Edit Customer Operation "Click"
|
* Event: Save Add/Edit Customer Operation "Click"
|
||||||
*/
|
*/
|
||||||
$('#save-customer').click(function () {
|
$('#save-customer').on('click', function () {
|
||||||
var customer = {
|
var customer = {
|
||||||
first_name: $('#first-name').val(),
|
first_name: $('#first-name').val(),
|
||||||
last_name: $('#last-name').val(),
|
last_name: $('#last-name').val(),
|
||||||
|
@ -166,7 +166,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Delete Customer Button "Click"
|
* Event: Delete Customer Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#delete-customer').click(function () {
|
$('#delete-customer').on('click', function () {
|
||||||
var customerId = $('#customer-id').val();
|
var customerId = $('#customer-id').val();
|
||||||
var buttons = [
|
var buttons = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Filter Service Cancel Button "Click"
|
* Event: Filter Service Cancel Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#filter-services .clear').click(function () {
|
$('#filter-services .clear').on('click', function () {
|
||||||
$('#filter-services .key').val('');
|
$('#filter-services .key').val('');
|
||||||
instance.filter('');
|
instance.filter('');
|
||||||
instance.resetForm();
|
instance.resetForm();
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Add New Service Button "Click"
|
* Event: Add New Service Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#add-service').click(function () {
|
$('#add-service').on('click', function () {
|
||||||
instance.resetForm();
|
instance.resetForm();
|
||||||
$('#services .add-edit-delete-group').hide();
|
$('#services .add-edit-delete-group').hide();
|
||||||
$('#services .save-cancel-group').show();
|
$('#services .save-cancel-group').show();
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
*
|
*
|
||||||
* Cancel add or edit of a service record.
|
* Cancel add or edit of a service record.
|
||||||
*/
|
*/
|
||||||
$('#cancel-service').click(function () {
|
$('#cancel-service').on('click', function () {
|
||||||
var id = $('#service-id').val();
|
var id = $('#service-id').val();
|
||||||
instance.resetForm();
|
instance.resetForm();
|
||||||
if (id !== '') {
|
if (id !== '') {
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Save Service Button "Click"
|
* Event: Save Service Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#save-service').click(function () {
|
$('#save-service').on('click', function () {
|
||||||
var service = {
|
var service = {
|
||||||
name: $('#service-name').val(),
|
name: $('#service-name').val(),
|
||||||
duration: $('#service-duration').val(),
|
duration: $('#service-duration').val(),
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Edit Service Button "Click"
|
* Event: Edit Service Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#edit-service').click(function () {
|
$('#edit-service').on('click', function () {
|
||||||
$('#services .add-edit-delete-group').hide();
|
$('#services .add-edit-delete-group').hide();
|
||||||
$('#services .save-cancel-group').show();
|
$('#services .save-cancel-group').show();
|
||||||
$('#services .record-details').find('input, textarea').prop('disabled', false);
|
$('#services .record-details').find('input, textarea').prop('disabled', false);
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
/**
|
/**
|
||||||
* Event: Delete Service Button "Click"
|
* Event: Delete Service Button "Click"
|
||||||
*/
|
*/
|
||||||
$('#delete-service').click(function () {
|
$('#delete-service').on('click', function () {
|
||||||
var serviceId = $('#service-id').val();
|
var serviceId = $('#service-id').val();
|
||||||
var buttons = [
|
var buttons = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -198,7 +198,7 @@ window.BackendSettings = window.BackendSettings || {};
|
||||||
*
|
*
|
||||||
* Store the setting changes into the database.
|
* Store the setting changes into the database.
|
||||||
*/
|
*/
|
||||||
$('.save-settings').click(function () {
|
$('.save-settings').on('click', function () {
|
||||||
var data = settings.get();
|
var data = settings.get();
|
||||||
settings.save(data);
|
settings.save(data);
|
||||||
});
|
});
|
||||||
|
|
|
@ -212,7 +212,7 @@ window.FrontendBook = window.FrontendBook || {};
|
||||||
*
|
*
|
||||||
* Whenever the provider changes the available appointment date - time periods must be updated.
|
* Whenever the provider changes the available appointment date - time periods must be updated.
|
||||||
*/
|
*/
|
||||||
$('#select-provider').change(function () {
|
$('#select-provider').on('change', function () {
|
||||||
FrontendBookApi.getUnavailableDates($(this).val(), $('#select-service').val(),
|
FrontendBookApi.getUnavailableDates($(this).val(), $('#select-service').val(),
|
||||||
$('#select-date').datepicker('getDate').toString('yyyy-MM-dd'));
|
$('#select-date').datepicker('getDate').toString('yyyy-MM-dd'));
|
||||||
FrontendBook.updateConfirmFrame();
|
FrontendBook.updateConfirmFrame();
|
||||||
|
@ -224,7 +224,7 @@ window.FrontendBook = window.FrontendBook || {};
|
||||||
* When the user clicks on a service, its available providers should
|
* When the user clicks on a service, its available providers should
|
||||||
* become visible.
|
* become visible.
|
||||||
*/
|
*/
|
||||||
$('#select-service').change(function () {
|
$('#select-service').on('change', function () {
|
||||||
var serviceId = $('#select-service').val();
|
var serviceId = $('#select-service').val();
|
||||||
|
|
||||||
$('#select-provider').empty();
|
$('#select-provider').empty();
|
||||||
|
@ -257,7 +257,7 @@ window.FrontendBook = window.FrontendBook || {};
|
||||||
* This handler is triggered every time the user pressed the "next" button on the book wizard.
|
* This handler is triggered every time the user pressed the "next" button on the book wizard.
|
||||||
* Some special tasks might be performed, depending the current wizard step.
|
* Some special tasks might be performed, depending the current wizard step.
|
||||||
*/
|
*/
|
||||||
$('.button-next').click(function () {
|
$('.button-next').on('click', function () {
|
||||||
// If we are on the first step and there is not provider selected do not continue
|
// If we are on the first step and there is not provider selected do not continue
|
||||||
// with the next step.
|
// with the next step.
|
||||||
if ($(this).attr('data-step_index') === '1' && !$('#select-provider').val()) {
|
if ($(this).attr('data-step_index') === '1' && !$('#select-provider').val()) {
|
||||||
|
@ -334,7 +334,7 @@ window.FrontendBook = window.FrontendBook || {};
|
||||||
* This handler is triggered every time the user pressed the "back" button on the
|
* This handler is triggered every time the user pressed the "back" button on the
|
||||||
* book wizard.
|
* book wizard.
|
||||||
*/
|
*/
|
||||||
$('.button-back').click(function () {
|
$('.button-back').on('click', function () {
|
||||||
var prevTabIndex = parseInt($(this).attr('data-step_index')) - 1;
|
var prevTabIndex = parseInt($(this).attr('data-step_index')) - 1;
|
||||||
|
|
||||||
$(this).parents().eq(1).hide('fade', function () {
|
$(this).parents().eq(1).hide('fade', function () {
|
||||||
|
@ -366,7 +366,7 @@ window.FrontendBook = window.FrontendBook || {};
|
||||||
*
|
*
|
||||||
* @param {jQuery.Event} event
|
* @param {jQuery.Event} event
|
||||||
*/
|
*/
|
||||||
$('#cancel-appointment').click(function (event) {
|
$('#cancel-appointment').on('click', function (event) {
|
||||||
var buttons = [
|
var buttons = [
|
||||||
{
|
{
|
||||||
text: EALang.cancel,
|
text: EALang.cancel,
|
||||||
|
@ -433,7 +433,7 @@ window.FrontendBook = window.FrontendBook || {};
|
||||||
*
|
*
|
||||||
* @param {jQuery.Event} event
|
* @param {jQuery.Event} event
|
||||||
*/
|
*/
|
||||||
$('#book-appointment-submit').click(function (event) {
|
$('#book-appointment-submit').on('click', function (event) {
|
||||||
FrontendBookApi.registerAppointment();
|
FrontendBookApi.registerAppointment();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -442,7 +442,7 @@ window.FrontendBook = window.FrontendBook || {};
|
||||||
*
|
*
|
||||||
* @param {jQuery.Event} event
|
* @param {jQuery.Event} event
|
||||||
*/
|
*/
|
||||||
$('.captcha-title small').click(function (event) {
|
$('.captcha-title small').on('click', function (event) {
|
||||||
$('.captcha-image').attr('src', GlobalVariables.baseUrl + '/index.php/captcha?' + Date.now());
|
$('.captcha-image').attr('src', GlobalVariables.baseUrl + '/index.php/captcha?' + Date.now());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ $(document).ready(function () {
|
||||||
* be added to the "primary" calendar. In order to use the API the javascript client library provided by
|
* be added to the "primary" calendar. In order to use the API the javascript client library provided by
|
||||||
* Google is necessary.
|
* Google is necessary.
|
||||||
*/
|
*/
|
||||||
$('#add-to-google-calendar').click(function () {
|
$('#add-to-google-calendar').on('click', function () {
|
||||||
gapi.client.setApiKey(GlobalVariables.googleApiKey);
|
gapi.client.setApiKey(GlobalVariables.googleApiKey);
|
||||||
gapi.auth.authorize({
|
gapi.auth.authorize({
|
||||||
client_id: GlobalVariables.googleClientId,
|
client_id: GlobalVariables.googleClientId,
|
||||||
|
|
|
@ -264,7 +264,7 @@ window.GeneralFunctions = window.GeneralFunctions || {};
|
||||||
trigger: 'manual'
|
trigger: 'manual'
|
||||||
});
|
});
|
||||||
|
|
||||||
$element.click(function () {
|
$element.on('click', function () {
|
||||||
if ($('#language-list').length === 0) {
|
if ($('#language-list').length === 0) {
|
||||||
$(this).popover('show');
|
$(this).popover('show');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -28,7 +28,7 @@ $(function () {
|
||||||
/**
|
/**
|
||||||
* Event: Install Easy!Appointments Button "Click"
|
* Event: Install Easy!Appointments Button "Click"
|
||||||
*/
|
*/
|
||||||
$install.click(function () {
|
$install.on('click', function () {
|
||||||
if (!validate()) {
|
if (!validate()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -385,7 +385,7 @@
|
||||||
* A new row is added on the table and the user can enter the new break
|
* A new row is added on the table and the user can enter the new break
|
||||||
* data. After that he can either press the save or cancel button.
|
* data. After that he can either press the save or cancel button.
|
||||||
*/
|
*/
|
||||||
$('.add-break').click(function () {
|
$('.add-break').on('click', function () {
|
||||||
var timeFormat = GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm';
|
var timeFormat = GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm';
|
||||||
|
|
||||||
var $newBreak = $('<tr/>', {
|
var $newBreak = $('<tr/>', {
|
||||||
|
@ -559,7 +559,7 @@
|
||||||
* A new row is added on the table and the user can enter the new extra day
|
* A new row is added on the table and the user can enter the new extra day
|
||||||
* data. After that he can either press the save or cancel button.
|
* data. After that he can either press the save or cancel button.
|
||||||
*/
|
*/
|
||||||
$('.add-extra-periods').click(function () {
|
$('.add-extra-periods').on('click', function () {
|
||||||
var today = GeneralFunctions.formatDate(new Date(), GlobalVariables.dateFormat, false);
|
var today = GeneralFunctions.formatDate(new Date(), GlobalVariables.dateFormat, false);
|
||||||
|
|
||||||
var $newExtraPeriod = $('<tr/>', {
|
var $newExtraPeriod = $('<tr/>', {
|
||||||
|
@ -897,7 +897,7 @@
|
||||||
/**
|
/**
|
||||||
* This is necessary for translated days.
|
* This is necessary for translated days.
|
||||||
*
|
*
|
||||||
* @param {String} value Day value could be like "Monday", "Tuesday" etc.
|
* @param {String} day Day value could be like "Monday", "Tuesday" etc.
|
||||||
*/
|
*/
|
||||||
WorkingPlan.prototype.convertDayToValue = function (day) {
|
WorkingPlan.prototype.convertDayToValue = function (day) {
|
||||||
switch (day) {
|
switch (day) {
|
||||||
|
|
Loading…
Reference in a new issue