diff --git a/doc/google-calendar-sync.md b/doc/google-calendar-sync.md index 6e76e751..9f532d74 100644 --- a/doc/google-calendar-sync.md +++ b/doc/google-calendar-sync.md @@ -16,7 +16,7 @@ The synchronization feature requires valid Google API credentials in order to re - Go to the Google Cloud Console and create a new project. - Click on **Use Google APIs** box and enable the Google Calendar API. -- Then click on the **Credentials** menu item (on the left) and create an **OAuth cliend ID** for your installation. You will need to fill the consent screen information and then select **Web Application** in the next frame. Give it a client name and add your installation domain as the **Authorised JavaScript origins** (important give only the domain not the complete URL e.g. `http://mywebsite.com`). The **Authorised redirect URIs** field will need the following value `http://url/to/easyappointments/installation/index.php/google/oauth_callback` (replace `url/to/easyappointments/installation` with your real domain). +- Then click on the **Credentials** menu item (on the left) and create an **OAuth client ID** for your installation. You will need to fill the consent screen information and then select **Web Application** in the next frame. Give it a client name and add your installation domain as the **Authorised JavaScript origins** (important give only the domain not the complete URL e.g. `http://mywebsite.com`). The **Authorised redirect URIs** field will need the following value `http://url/to/easyappointments/installation/index.php/google/oauth_callback` (replace `url/to/easyappointments/installation` with your real domain). - Click on **Create** button to complete the wizard. Afterwards Google Cloud will show you two key strings that you need to mark for the following step. ## Google API Key diff --git a/doc/installation-guide.md b/doc/installation-guide.md index 76ed4244..e086b714 100644 --- a/doc/installation-guide.md +++ b/doc/installation-guide.md @@ -8,7 +8,7 @@ Easy!Appointments is a web appointment scheduler that can be installed and run i ### Installation There are 5 steps you must follow during the installation process. - 1. **Make sure that your server has at least the following applications/tools installed: Apache(v2.4), PHP(v5.4) and MySQL(v5.5).** Easy!Appointments needs these programs to run. Most of the web hosting companies provide these tools within their Linux hosting plans. If you want to install Easy!Appointments on your local server use one of the premade bundles available on the web (XAMPP, MAMP, WAMP ...), all of which are free to use. If you plan to use the Google Calendar synchronization you will need the **php_curl** extension installed and enabled as well. + 1. **Make sure that your server has at least the following applications/tools installed: Apache(v2.4), PHP(v5.4) and MySQL(v5.5).** Easy!Appointments needs these programs to run. Most of the web hosting companies provide these tools within their Linux hosting plans. If you want to install Easy!Appointments on your local server use one of the pre-made bundles available on the web (XAMPP, MAMP, WAMP ...), all of which are free to use. If you plan to use the Google Calendar synchronization you will need the **php_curl** extension installed and enabled as well. 2. **Create a new database (or use an existing one).** The database is necessary for storing the system data. Therefore your hosting plan must include at least one MySQL database. You must also get the database administration credentials because they will be needed later on. 3. **Upload the Easy!Appointments source files to your server.** You can place the files into a directory with named "easyappointments" or "appointments" or "book" etc. Make sure that you mark the Easy!Appointments folder URL because it will be needed in the following step. For example if the system files are placed in the this directory ".../httpdocs/easyappointments/" then the URL to this folder will be "http://your-domain.com/easyappointments". This URL will be needed in the following step. 4. **Edit the "config.php" file and set your server properties.** Like other web systems Easy!Appointments needs to know how to connect to the database and the base URL of the installation. You can also provide the Google Calendar API keys in this file, if you want to use the Google Calendar Sync feature. NOTE that you will need to create an API key before that in the Google Cloud Console. diff --git a/src/application/controllers/Appointments.php b/src/application/controllers/Appointments.php index 4a3b5940..04700fec 100755 --- a/src/application/controllers/Appointments.php +++ b/src/application/controllers/Appointments.php @@ -274,7 +274,7 @@ class Appointments extends CI_Controller { * [AJAX] Get the available appointment hours for the given date. * * This method answers to an AJAX request. It calculates the available hours - * for thegiven service, provider and date. + * for the given service, provider and date. * * @param numeric $_POST['service_id'] The selected service's record id. * @param numeric|string $_POST['provider_id'] The selected provider's record id, can also be 'any-provider'. @@ -517,7 +517,7 @@ class Appointments extends CI_Controller { for ($i=1; $i<=$number_of_days; $i++) { $current_date = new DateTime($selected_date->format('Y-m') . '-' . $i); - if ($current_date < new DateTime(date('Y-m-d 00:00:00'))) { // Past dates become immediatelly unavailable. + if ($current_date < new DateTime(date('Y-m-d 00:00:00'))) { // Past dates become immediately unavailable. $unavailable_dates[] = $current_date->format('Y-m-d'); continue; } @@ -546,7 +546,7 @@ class Appointments extends CI_Controller { * * It might be times where two or more customers select the same appointment date and time. * This shouldn't be allowed to happen, so one of the two customers will eventually get the - * prefered date and the other one will have to choose for another date. Use this method + * preferred date and the other one will have to choose for another date. Use this method * just before the customer confirms the appointment details. If the selected date was taken * in the mean time, the customer must be prompted to select another time for his appointment. * @@ -615,7 +615,7 @@ class Appointments extends CI_Controller { * Get an array containing the free time periods (start - end) of a selected date. * * This method is very important because there are many cases where the system needs to - * know when a provider is avaible for an appointment. This method will return an array + * know when a provider is available for an appointment. This method will return an array * that belongs to the selected date and contains values that have the start and the end * time of an available time period. * @@ -796,7 +796,7 @@ class Appointments extends CI_Controller { } /** - * Calculate the avaialble appointment hours. + * Calculate the available appointment hours. * * Calculate the available appointment hours for the given date. The empty spaces * are broken down to 15 min and if the service fit in each quarter then a new @@ -807,7 +807,7 @@ class Appointments extends CI_Controller { * @param string $selected_date The selected date to be search (format ) * @param numeric $service_duration The service duration is required for the hour calculation. * @param bool $manage_mode (optional) Whether we are currently on manage mode (editing an existing appointment). - * @param string $availlabilities_type Optional ('flexible'), the service availabilities type. + * @param string $availabilities_type Optional ('flexible'), the service availabilities type. * * @return array Returns an array with the available hours for the appointment. */ @@ -833,7 +833,7 @@ class Appointments extends CI_Controller { } // If the selected date is today, remove past hours. It is important include the timeout before - // booking that is set in the backoffice the system. Normally we might want the customer to book + // booking that is set in the back-office the system. Normally we might want the customer to book // an appointment that is at least half or one hour from now. The setting is stored in minutes. if (date('m/d/Y', strtotime($selected_date)) === date('m/d/Y')) { $book_advance_timeout = $this->settings_model->get_setting('book_advance_timeout'); diff --git a/src/application/controllers/Backend.php b/src/application/controllers/Backend.php index fe6f1a2d..94c67f3f 100644 --- a/src/application/controllers/Backend.php +++ b/src/application/controllers/Backend.php @@ -38,7 +38,7 @@ class Backend extends CI_Controller { * * This method displays the main backend page. All users login permission can * view this page which displays a calendar with the events of the selected - * provider or service. If a user has more priviledges he will see more menus + * provider or service. If a user has more privileges he will see more menus * at the top of the page. * * @param string $appointment_hash If given, the appointment edit dialog will @@ -226,7 +226,7 @@ class Backend extends CI_Controller { * view a page. * * The backend page requires different privileges from the users to display pages. Not all - * pages are avaiable to all users. For example secretaries should not be able to edit the + * pages are available to all users. For example secretaries should not be able to edit the * system users. * * @see Constant Definition In application/config/constants.php diff --git a/src/application/controllers/Backend_api.php b/src/application/controllers/Backend_api.php index 1fcf8f4f..1bb77d2d 100644 --- a/src/application/controllers/Backend_api.php +++ b/src/application/controllers/Backend_api.php @@ -775,7 +775,7 @@ class Backend_api extends CI_Controller { * [AJAX] Save (insert or update) category record. * * @param array $_POST['category'] Json encoded array with the category data. If an id - * value is provided then the category is going to be udpated instead of inserted. + * value is provided then the category is going to be updated instead of inserted. */ public function ajax_save_service_category() { try { @@ -1012,7 +1012,7 @@ class Backend_api extends CI_Controller { * * @param numeric $_POST['provider_id'] The id of the record to be deleted. * - * @return string Returns the operation result constant (AJAX_SUCESS or AJAX_FAILURE). + * @return string Returns the operation result constant (AJAX_SUCCESS or AJAX_FAILURE). */ public function ajax_delete_provider() { try { @@ -1066,7 +1066,7 @@ class Backend_api extends CI_Controller { * @param array $_POST['secretary'] A json encoded array that contains the secretary data. * If an 'id' value is provided then the record is going to be updated. * - * @return string Returns the success contant 'AJAX_SUCCESS' so javascript knows that + * @return string Returns the success constant 'AJAX_SUCCESS' so javascript knows that * everything completed successfully. */ public function ajax_save_secretary() { @@ -1099,7 +1099,7 @@ class Backend_api extends CI_Controller { * * @param numeric $_POST['secretary_id'] The id of the record to be deleted. * - * @return string Returns the operation result constant (AJAX_SUCESS or AJAX_FAILURE). + * @return string Returns the operation result constant (AJAX_SUCCESS or AJAX_FAILURE). */ public function ajax_delete_secretary() { try { diff --git a/src/application/controllers/User.php b/src/application/controllers/User.php index 263e7160..83b558bc 100644 --- a/src/application/controllers/User.php +++ b/src/application/controllers/User.php @@ -133,7 +133,7 @@ class User extends CI_Controller { /** * Regenerate a new password for the current user, only if the username and - * email address given corresond to an existing user in db. + * email address given correspond to an existing user in db. * * @param string $_POST['username'] * @param string $_POST['email'] diff --git a/src/application/controllers/api/v1/API_V1_Controller.php b/src/application/controllers/api/v1/API_V1_Controller.php index c638a882..866f96aa 100644 --- a/src/application/controllers/api/v1/API_V1_Controller.php +++ b/src/application/controllers/api/v1/API_V1_Controller.php @@ -64,7 +64,7 @@ class API_V1_Controller extends CI_Controller { * * Call this method from catch blocks of child controller callbacks. * - * @param \Exception $exception Thrown exception to be outputed. + * @param \Exception $exception Thrown exception to be outputted. */ protected function _handleException(\Exception $exception) { $error = [ diff --git a/src/application/controllers/api/v1/Availabilities.php b/src/application/controllers/api/v1/Availabilities.php index 068e2ee3..7370c488 100644 --- a/src/application/controllers/api/v1/Availabilities.php +++ b/src/application/controllers/api/v1/Availabilities.php @@ -79,7 +79,7 @@ class Availabilities extends API_V1_Controller { * Get an array containing the free time periods (start - end) of a selected date. * * This method is very important because there are many cases where the system needs to - * know when a provider is avaible for an appointment. This method will return an array + * know when a provider is available for an appointment. This method will return an array * that belongs to the selected date and contains values that have the start and the end * time of an available time period. * @@ -225,7 +225,7 @@ class Availabilities extends API_V1_Controller { } /** - * Calculate the avaialble appointment hours. + * Calculate the available appointment hours. * * Calculate the available appointment hours for the given date. The empty spaces * are broken down to 15 min and if the service fit in each quarter then a new @@ -236,7 +236,7 @@ class Availabilities extends API_V1_Controller { * @param string $selected_date The selected date to be search (format ) * @param numeric $service_duration The service duration is required for the hour calculation. * @param bool $manage_mode (optional) Whether we are currently on manage mode (editing an existing appointment). - * @param string $availlabilities_type Optional ('flexible'), the service availabilities type. + * @param string $availabilities_type Optional ('flexible'), the service availabilities type. * * @return array Returns an array with the available hours for the appointment. */ @@ -262,7 +262,7 @@ class Availabilities extends API_V1_Controller { } // If the selected date is today, remove past hours. It is important include the timeout before - // booking that is set in the backoffice the system. Normally we might want the customer to book + // booking that is set in the back-office the system. Normally we might want the customer to book // an appointment that is at least half or one hour from now. The setting is stored in minutes. if (date('m/d/Y', strtotime($selected_date)) === date('m/d/Y')) { $book_advance_timeout = $this->settings_model->get_setting('book_advance_timeout'); diff --git a/src/application/models/Admins_model.php b/src/application/models/Admins_model.php index c2251b04..ab4f5dfa 100644 --- a/src/application/models/Admins_model.php +++ b/src/application/models/Admins_model.php @@ -121,7 +121,7 @@ class Admins_Model extends CI_Model { * Update an existing admin record in the database. * * @param array $admin Contains the admin record data. - * @return int Retuns the record id. + * @return int Returns the record id. * @throws Exception When the update operation fails. */ public function update($admin) { diff --git a/src/application/models/Appointments_model.php b/src/application/models/Appointments_model.php index 400ae0e1..cfadfa62 100644 --- a/src/application/models/Appointments_model.php +++ b/src/application/models/Appointments_model.php @@ -45,14 +45,14 @@ class Appointments_Model extends CI_Model { /** * Check if a particular appointment record already exists. * - * This method checks wether the given appointment already exists + * This method checks whether the given appointment already exists * in the database. It doesn't search with the id, but by using the * following fields: "start_datetime", "end_datetime", "id_users_provider", * "id_users_customer", "id_services". * * @param array $appointment Associative array with the appointment's * data. Each key has the same name with the database fields. - * @return bool Returns wether the record exists or not. + * @return bool Returns whether the record exists or not. */ public function exists($appointment) { if (!isset($appointment['start_datetime']) @@ -100,7 +100,7 @@ class Appointments_Model extends CI_Model { * id in order to process the update operation. * * @expectedException DatabaseException Raises when the update operation - * failes to complete successfully. + * fails to complete successfully. * * @param array $appointment Associative array with the appointment's * data. Each key has the same name with the database fields. @@ -124,7 +124,7 @@ class Appointments_Model extends CI_Model { * * @param array $appointment Array with the appointment data. The * keys of the array should have the same names as the db fields. - * @return int Returns the db id of the record that matches the apppointment + * @return int Returns the db id of the record that matches the appointment * data. */ public function find_record_id($appointment) { @@ -155,7 +155,7 @@ class Appointments_Model extends CI_Model { public function validate($appointment) { $this->load->helper('data_validation'); - // If a appointment id is given, check wether the record exists + // If a appointment id is given, check whether the record exists // in the database. if (isset($appointment['id'])) { $num_rows = $this->db->get_where('ea_appointments', @@ -322,7 +322,7 @@ class Appointments_Model extends CI_Model { /** * Inserts or updates an unavailable period record in the database. * - * @param array $unavailable Contains the unavaible data. + * @param array $unavailable Contains the unavailable data. * @return int Returns the record id. */ public function add_unavailable($unavailable) { diff --git a/src/application/models/Customers_model.php b/src/application/models/Customers_model.php index df3895bb..5b3d2516 100644 --- a/src/application/models/Customers_model.php +++ b/src/application/models/Customers_model.php @@ -51,13 +51,13 @@ class Customers_Model extends CI_Model { /** * Check if a particular customer record already exists. * - * This method checks wether the given customer already exists in + * This method checks whether the given customer already exists in * the database. It doesn't search with the id, but with the following * fields: "email" * * @param array $customer Associative array with the customer's * data. Each key has the same name with the database fields. - * @return bool Returns wether the record exists or not. + * @return bool Returns whether the record exists or not. */ public function exists($customer) { if (!isset($customer['email'])) { diff --git a/src/application/models/Providers_model.php b/src/application/models/Providers_model.php index ad32717a..ed07d509 100644 --- a/src/application/models/Providers_model.php +++ b/src/application/models/Providers_model.php @@ -15,7 +15,7 @@ * Providers_Model Class * * Contains the database operations for the service provider users of - * Easy!Appointmenst. + * Easy!Appointments. * * Data Structure: * 'fist_name' @@ -405,7 +405,7 @@ class Providers_Model extends CI_Model { $batch = $this->db->get_where('ea_users', array('id_roles' => $role_id))->result_array(); - // Include each provider sevices and settings. + // Include each provider services and settings. foreach($batch as &$provider) { // Services $services = $this->db->get_where('ea_services_providers', @@ -481,7 +481,7 @@ class Providers_Model extends CI_Model { * @param string $setting_name The setting name that is going to be * returned. * @param int $provider_id The selected provider id. - * @return string Returs the value of the selected user setting. + * @return string Returns the value of the selected user setting. */ public function get_setting($setting_name, $provider_id) { $provider_settings = $this->db->get_where('ea_user_settings', @@ -535,7 +535,7 @@ class Providers_Model extends CI_Model { * @param array $services Contains the service ids that the selected provider can provide. * @param numeric $provider_id The selected provider record id. * @throws Exception When the $services argument type is not array. - * @throws Exception When the $provider_id argumetn type is not numeric. + * @throws Exception When the $provider_id argument type is not numeric. */ protected function save_services($services, $provider_id) { // Validate method arguments. diff --git a/src/application/models/Secretaries_model.php b/src/application/models/Secretaries_model.php index 5f019ab7..66a98c91 100644 --- a/src/application/models/Secretaries_model.php +++ b/src/application/models/Secretaries_model.php @@ -83,7 +83,7 @@ class Secretaries_Model extends CI_Model { } /** - * Insert a new sercretary record into the database. + * Insert a new secretary record into the database. * * @param array $secretary Contains the secretary data. * @return int Returns the new record id. @@ -117,7 +117,7 @@ class Secretaries_Model extends CI_Model { * Update an existing secretary record in the database. * * @param array $secretary Contains the secretary record data. - * @return int Retuns the record id. + * @return int Returns the record id. * @throws Exception When the update operation fails. */ protected function _update($secretary) { @@ -190,7 +190,7 @@ class Secretaries_Model extends CI_Model { } } - // Validate 'providers' value datatype (must be array) + // Validate 'providers' value data type (must be array) if (isset($secretary['providers']) && !is_array($secretary['providers'])) { throw new Exception('Secretary providers value is not an array.'); } @@ -388,7 +388,7 @@ class Secretaries_Model extends CI_Model { } /** - * Save a secretary hasndling users. + * Save a secretary handling users. * @param array $providers Contains the provider ids that are handled by the secretary. * @param numeric $secretary_id The selected secretary record. */ @@ -442,7 +442,7 @@ class Secretaries_Model extends CI_Model { * * @param string $setting_name The setting name that is going to be returned. * @param int $secretary_id The selected provider id. - * @return string Returs the value of the selected user setting. + * @return string Returns the value of the selected user setting. */ public function get_setting($setting_name, $secretary_id) { $provider_settings = $this->db->get_where('ea_user_settings', diff --git a/src/application/models/Services_model.php b/src/application/models/Services_model.php index 9f130a88..6a55f31f 100644 --- a/src/application/models/Services_model.php +++ b/src/application/models/Services_model.php @@ -154,7 +154,7 @@ class Services_Model extends CI_Model { /** * Get the record id of an existing record. * - * NOTICE! The record must exist, otherwise an exeption will be raised. + * NOTICE! The record must exist, otherwise an exception will be raised. * * @param array $service Contains the service record data. Name, duration and price values * are mandatory for this method to complete. @@ -174,7 +174,7 @@ class Services_Model extends CI_Model { )); if ($result->num_rows() == 0) { - throw new Exception('Cound not find service record id'); + throw new Exception('Could not find service record id'); } return $result->row()->id; @@ -285,7 +285,7 @@ class Services_Model extends CI_Model { /** * Add (insert or update) a service category record into database. * - * @param array $category Containst the service category data. + * @param array $category Contains the service category data. * * @return int Returns the record id.s */ diff --git a/src/application/models/Settings_model.php b/src/application/models/Settings_model.php index 7f8379e0..3547a717 100644 --- a/src/application/models/Settings_model.php +++ b/src/application/models/Settings_model.php @@ -105,7 +105,7 @@ class Settings_Model extends CI_Model { /** * Saves all the system settings into the database. * - * This method is usefull when trying to save all the system settings at once instead of + * This method is useful when trying to save all the system settings at once instead of * saving them one by one. * * @param array $settings Contains all the system settings. diff --git a/src/assets/js/backend_calendar.js b/src/assets/js/backend_calendar.js index d09ba4ec..144ee9ec 100644 --- a/src/assets/js/backend_calendar.js +++ b/src/assets/js/backend_calendar.js @@ -44,7 +44,7 @@ window.BackendCalendar = window.BackendCalendar || {}; else if (document.mozCancelFullScreen) document.mozCancelFullScreen(); else if (document.webkitExitFullscreen) - document.webkitExitFullscreen() + document.webkitExitFullscreen(); $target .removeClass('btn-success') diff --git a/src/assets/js/backend_calendar_api.js b/src/assets/js/backend_calendar_api.js index 4a089118..571feca2 100644 --- a/src/assets/js/backend_calendar_api.js +++ b/src/assets/js/backend_calendar_api.js @@ -65,7 +65,7 @@ window.BackendCalendarApi = window.BackendCalendarApi || {}; /** * Save unavailable period to database. * - * @param {Object} unavailable Containts the unavailable period data. + * @param {Object} unavailable Contains the unavailable period data. * @param {Function} successCallback The ajax success callback function. * @param {Function} errorCallback The ajax failure callback function. */ diff --git a/src/assets/js/backend_calendar_appointments_modal.js b/src/assets/js/backend_calendar_appointments_modal.js index 36cb40d0..da81e650 100644 --- a/src/assets/js/backend_calendar_appointments_modal.js +++ b/src/assets/js/backend_calendar_appointments_modal.js @@ -320,7 +320,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa } /** - * Reset Apppointment Dialog + * Reset Appointment Dialog * * This method resets the manage appointment dialog modal to its initial state. After that you can make * any modification might be necessary in order to bring the dialog to the desired state. @@ -457,7 +457,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa function _validateAppointmentForm() { var $dialog = $('#manage-appointment'); - // Reset previous validation css formating. + // Reset previous validation css formatting. $dialog.find('.form-group').removeClass('has-error'); $dialog.find('.modal-message').addClass('hidden'); diff --git a/src/assets/js/backend_calendar_default_view.js b/src/assets/js/backend_calendar_default_view.js index 47115e90..8df59aec 100644 --- a/src/assets/js/backend_calendar_default_view.js +++ b/src/assets/js/backend_calendar_default_view.js @@ -105,7 +105,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; $dialog = $('#manage-unavailable'); BackendCalendarUnavailabilitiesModal.resetUnavailableDialog(); - // Apply unvailable data to dialog. + // Apply unavailable data to dialog. $dialog.find('.modal-header h3').text('Edit Unavailable Period'); $dialog.find('#unavailable-start').datetimepicker('setDate', unavailable.start_datetime); $dialog.find('#unavailable-id').val(unavailable.id); @@ -121,7 +121,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; /** * Event: Popover Delete Button "Click" * - * Displays a prompt on whether the user wants the appoinmtent to be deleted. If he confirms the + * Displays a prompt on whether the user wants the appointment to be deleted. If he confirms the * deletion then an ajax call is made to the server and deletes the appointment from the database. */ $calendarPage.on('click', '.delete-popover', function() { @@ -170,7 +170,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; $('#message_box').append(''); $('#delete-reason').css('width', '100%'); } else { - // Do not display confirmation promt. + // Do not display confirmation prompt. var postUrl = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_delete_unavailable'; var postData = { csrfToken: GlobalVariables.csrfToken, @@ -428,7 +428,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; // Update appointment data. BackendCalendarApi.saveAppointment(appointment, undefined, successCallback, undefined); } else { - // Update unvailable time period. + // Update unavailable time period. var unavailable = { id: event.data.id, start_datetime: event.start.toString('yyyy-MM-dd HH:mm:ss'), @@ -487,7 +487,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; /** * Calendar Window "Resize" Callback * - * The calendar element needs to be resized too in order to fit into the window. Nevertheless, if the window + * The calendar element needs to be re-sized too in order to fit into the window. Nevertheless, if the window * becomes very small the the calendar won't shrink anymore. * * @see _getCalendarHeight() @@ -499,7 +499,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; /** * Calendar Day "Click" Callback * - * When the user clicks on a day square on the calendar, then he will automatically be transfered to that + * When the user clicks on a day square on the calendar, then he will automatically be transferred to that * day view calendar. */ function _calendarDayClick(date, allDay, jsEvent, view) { @@ -702,7 +702,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; * * On some calendar events the titles contain html markup that is not displayed properly due to the * fullcalendar plugin. This plugin sets the .fc-event-title value by using the $.text() method and - * not the $.html() method. So in order for the title to displya the html properly we convert all the + * not the $.html() method. So in order for the title to display the html properly we convert all the * .fc-event-titles where needed into html. */ function _convertTitlesToHtml() { diff --git a/src/assets/js/backend_calendar_google_sync.js b/src/assets/js/backend_calendar_google_sync.js index ccad82e2..148adf35 100644 --- a/src/assets/js/backend_calendar_google_sync.js +++ b/src/assets/js/backend_calendar_google_sync.js @@ -190,7 +190,6 @@ window.BackendCalendarGoogleSync = window.BackendCalendarGoogleSync || {}; response.exceptions = GeneralFunctions.parseExceptions(response.exceptions); GeneralFunctions.displayMessageBox(GeneralFunctions.EXCEPTIONS_TITLE, GeneralFunctions.EXCEPTIONS_MESSAGE); $('#message_box').append(GeneralFunctions.exceptionsToHtml(response.exceptions)); - return; } }, 'json').fail(GeneralFunctions.ajaxFailureHandler); } diff --git a/src/assets/js/backend_customers.js b/src/assets/js/backend_customers.js index 7cd9d64a..b6e8f295 100644 --- a/src/assets/js/backend_customers.js +++ b/src/assets/js/backend_customers.js @@ -14,7 +14,7 @@ /** * Backend Customers * - * Backend Customers javasript namespace. Contains the main functionality of the backend customers + * Backend Customers javascript namespace. Contains the main functionality of the backend customers * page. If you need to use this namespace in a different page, do not bind the default event handlers * during initialization. * diff --git a/src/assets/js/backend_customers_helper.js b/src/assets/js/backend_customers_helper.js index f51dd6cf..71222f98 100644 --- a/src/assets/js/backend_customers_helper.js +++ b/src/assets/js/backend_customers_helper.js @@ -401,7 +401,7 @@ * on the form. */ CustomersHelper.prototype.select = function(id, display) { - display = display || false + display = display || false; $('#filter-customers .selected').removeClass('selected'); diff --git a/src/assets/js/backend_settings.js b/src/assets/js/backend_settings.js index a97a242d..284f6151 100644 --- a/src/assets/js/backend_settings.js +++ b/src/assets/js/backend_settings.js @@ -165,7 +165,7 @@ window.BackendSettings = window.BackendSettings || {}; } else { $('#user-notifications').removeClass('active'); } - } else if ($(this).hasClass('about-tab')) {0 + } else if ($(this).hasClass('about-tab')) { $('#about').show(); } diff --git a/src/assets/js/backend_settings_user.js b/src/assets/js/backend_settings_user.js index 38921cdc..f828c40a 100644 --- a/src/assets/js/backend_settings_user.js +++ b/src/assets/js/backend_settings_user.js @@ -60,7 +60,7 @@ UserSettings.prototype.save = function(settings) { if (!this.validate(settings)) { Backend.displayNotification(EALang['user_settings_are_invalid']); - return; // Validation failed, do not procceed. + return; // Validation failed, do not proceed. } var postUrl = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_save_settings'; diff --git a/src/assets/js/backend_users.js b/src/assets/js/backend_users.js index 0b7b9f01..5ecba92d 100644 --- a/src/assets/js/backend_users.js +++ b/src/assets/js/backend_users.js @@ -57,7 +57,7 @@ window.BackendUsers = window.BackendUsers || {}; $('#filter-providers .results').jScrollPane(); $('#filter-secretaries .results').jScrollPane(); - // Instanciate default helper object (admin). + // Instantiate default helper object (admin). helper = new AdminsHelper(); helper.resetForm(); helper.filter(''); @@ -114,7 +114,7 @@ window.BackendUsers = window.BackendUsers || {}; }; /** - * Binds the defauly backend users event handlers. Do not use this method on a different + * Binds the default backend users event handlers. Do not use this method on a different * page because it needs the backend users page DOM. */ function _bindEventHandlers() { diff --git a/src/assets/js/backend_users_admins.js b/src/assets/js/backend_users_admins.js index fab84cf6..ddc237e7 100644 --- a/src/assets/js/backend_users_admins.js +++ b/src/assets/js/backend_users_admins.js @@ -15,7 +15,7 @@ /** * This class contains the Admins helper class declaration, along with the "Admins" tab - * event handlers. By deviding the backend/users tab functionality into separate files + * event handlers. By dividing the backend/users tab functionality into separate files * it is easier to maintain the code. * * @class AdminsHelper @@ -29,7 +29,7 @@ */ AdminsHelper.prototype.bindEventHandlers = function() { /** - * Event: Filter Admins Form "Sumbit" + * Event: Filter Admins Form "Submit" * * Filter the admin records with the given key string. */ diff --git a/src/assets/js/backend_users_secretaries.js b/src/assets/js/backend_users_secretaries.js index d8bd5732..69c1841a 100644 --- a/src/assets/js/backend_users_secretaries.js +++ b/src/assets/js/backend_users_secretaries.js @@ -17,7 +17,7 @@ * Secretaries Helper * * This class contains the Secretaries helper class declaration, along with the "Secretaries" - * tab event handlers. By deviding the backend/users tab functionality into separate files + * tab event handlers. By dividing the backend/users tab functionality into separate files * it is easier to maintain the code. * * @class SecretariesHelper diff --git a/src/assets/js/frontend_book.js b/src/assets/js/frontend_book.js index 497979fd..fc52f048 100644 --- a/src/assets/js/frontend_book.js +++ b/src/assets/js/frontend_book.js @@ -35,7 +35,7 @@ window.FrontendBook = window.FrontendBook || {}; * This method initializes the book appointment page. * * @param {Boolean} bindEventHandlers (OPTIONAL) Determines whether the default - * event handlers will be binded to the dom elements. + * event handlers will be bound to the dom elements. * @param {Boolean} manageMode (OPTIONAL) Determines whether the customer is going * to make changes to an existing appointment rather than booking a new one. */ @@ -44,7 +44,7 @@ window.FrontendBook = window.FrontendBook || {}; manageMode = manageMode || false; if (window.console === undefined) { - window.console = function() {} // IE compatibility + window.console = function() {}; // IE compatibility } FrontendBook.manageMode = manageMode; @@ -202,7 +202,7 @@ window.FrontendBook = window.FrontendBook || {}; * Event: Next Step Button "Clicked" * * This handler is triggered every time the user pressed the "next" button on the book wizard. - * Some special tasks might be perfomed, depending the current wizard step. + * Some special tasks might be performed, depending the current wizard step. */ $('.button-next').click(function() { // If we are on the first step and there is not provider selected do not continue @@ -338,7 +338,7 @@ window.FrontendBook = window.FrontendBook || {}; }; /** - * This function validates the customer's data input. The user cannot contiue + * This function validates the customer's data input. The user cannot continue * without passing all the validation checks. * * @return {Boolean} Returns the validation result. @@ -376,7 +376,7 @@ window.FrontendBook = window.FrontendBook || {}; /** * Every time this function is executed, it updates the confirmation page with the latest - * customer settigns and input for the appointment booking. + * customer settings and input for the appointment booking. */ exports.updateConfirmFrame = function() { // Appointment Details @@ -411,8 +411,8 @@ window.FrontendBook = window.FrontendBook || {}; $('#appointment-details').html(html); // Customer Details - var firstname = GeneralFunctions.escapeHtml($('#first-name').val()); - var lastname = GeneralFunctions.escapeHtml($('#last-name').val()); + var firstName = GeneralFunctions.escapeHtml($('#first-name').val()); + var lastName = GeneralFunctions.escapeHtml($('#last-name').val()); var phoneNumber = GeneralFunctions.escapeHtml($('#phone-number').val()); var email = GeneralFunctions.escapeHtml($('#email').val()); var address = GeneralFunctions.escapeHtml($('#address').val()); @@ -420,7 +420,7 @@ window.FrontendBook = window.FrontendBook || {}; var zipCode = GeneralFunctions.escapeHtml($('#zip-code').val()); html = - '
' +
EALang['phone'] + ': ' + phoneNumber +
'
' +
@@ -467,11 +467,11 @@ window.FrontendBook = window.FrontendBook || {};
}
$('input[name="csrfToken"]').val(GlobalVariables.csrfToken);
$('input[name="post_data"]').val(JSON.stringify(postData));
- }
+ };
/**
* This method calculates the end datetime of the current appointment.
- * End datetime is depending on the service and start datetime fieldss.
+ * End datetime is depending on the service and start datetime fields.
*
* @return {String} Returns the end datetime in string format.
*/
@@ -544,7 +544,7 @@ window.FrontendBook = window.FrontendBook || {};
/**
* This method updates a div's html content with a brief description of the
- * user selected service (only if available in db). This is usefull for the
+ * user selected service (only if available in db). This is useful for the
* customers upon selecting the correct service.
*
* @param {Number} serviceId The selected service record id.
diff --git a/src/assets/js/general_functions.js b/src/assets/js/general_functions.js
index 44bb9327..d66c06e6 100644
--- a/src/assets/js/general_functions.js
+++ b/src/assets/js/general_functions.js
@@ -31,7 +31,7 @@ window.GeneralFunctions = window.GeneralFunctions || {};
exports.WARNINGS_MESSAGE = EALang['unexpected_warnings_message'];
/**
- * This functions displays a message box in the admin array. It is usefull when user
+ * This functions displays a message box in the admin array. It is useful when user
* decisions or verifications are needed.
*
* @param {String} title The title of the message box.
@@ -157,8 +157,8 @@ window.GeneralFunctions = window.GeneralFunctions || {};
/**
* Clone JS Object
*
- * This method creates and returns an exact copy of the provided object. It is very usefull whenever
- * changes need to be made to an object without modyfing the original data.
+ * This method creates and returns an exact copy of the provided object. It is very useful whenever
+ * changes need to be made to an object without modifying the original data.
*
* {@link http://stackoverflow.com/questions/728360/most-elegant-way-to-clone-a-javascript-object}
*
diff --git a/src/assets/js/installation.js b/src/assets/js/installation.js
index 36e6fa7c..e0a07065 100644
--- a/src/assets/js/installation.js
+++ b/src/assets/js/installation.js
@@ -43,7 +43,7 @@ $(document).ready(function() {
url: postUrl,
type: 'POST',
data: postData,
- datatype: 'json',
+ dataType: 'json',
success: function(response) {
if (!GeneralFunctions.handleAjaxExceptions(response)) {
return;