diff --git a/src/application/config/config.php b/src/application/config/config.php index 985c454b..fa9b6cc9 100644 --- a/src/application/config/config.php +++ b/src/application/config/config.php @@ -29,8 +29,8 @@ $config['base_url'] = SystemConfiguration::$base_url; | the global "config" variable. | */ -$config['ea_version'] = '0.6'; // This must be changed manually. -$config['ea_release_title'] = 'Alpha'; // Leave empty for no title or add BETA, TEST etc ... +$config['ea_version'] = '0.7'; // This must be changed manually. +$config['ea_release_title'] = 'Beta'; // Leave empty for no title or add BETA, TEST etc ... $config['ea_google_sync_feature'] = SystemConfiguration::$google_sync_feature; /* diff --git a/src/application/views/backend/calendar.php b/src/application/views/backend/calendar.php index b9320661..e656168f 100644 --- a/src/application/views/backend/calendar.php +++ b/src/application/views/backend/calendar.php @@ -84,6 +84,13 @@
+ + \ No newline at end of file diff --git a/src/application/views/general/installation.php b/src/application/views/general/installation.php index f12e6cd9..be4b5477 100644 --- a/src/application/views/general/installation.php +++ b/src/application/views/general/installation.php @@ -292,6 +292,16 @@
+

+

License

+ Easy!Appointments is licensed under the GPLv3 license. By using + the code of Easy!Appointments in any way
you are agreeing to the + terms described in the following url: + http://www.gnu.org/copyleft/gpl.html +

+ +
+ diff --git a/src/assets/css/backend.css b/src/assets/css/backend.css index b9defede..b464e5bf 100644 --- a/src/assets/css/backend.css +++ b/src/assets/css/backend.css @@ -644,4 +644,17 @@ padding: 4px 7px; #settings-page .miscellaneous-wrapper { max-width: 400px; +} + +#settings-page #about { + max-width: 720px; +} + +#settings-page #about .current-version { + padding: 15px 10px; + background: #EEE; + border-bottom: 2px solid #CFCFCF; + font-size: 18px; + font-weight: bold; + color: #838383; } \ No newline at end of file diff --git a/src/assets/js/backend_calendar.js b/src/assets/js/backend_calendar.js index ae6acd08..19d7177e 100644 --- a/src/assets/js/backend_calendar.js +++ b/src/assets/js/backend_calendar.js @@ -717,6 +717,49 @@ var BackendCalendar = { $('#insert-appointment').click(function() { BackendCalendar.resetAppointmentDialog(); var $dialog = $('#manage-appointment'); + + // 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; + }); + } + $providerOption.prop('selected', true); + } else { + $dialog.find('#select-service option[value="' + + $('#select-filter-item').val() + '"]').prop('selected', true); + } + + var serviceDuration = 0; + $.each(GlobalVariables.availableServices, function(index, service) { + if (service['id'] == $dialog.find('#select-service').val()) { + serviceDuration = service['duration']; + return false; // exit loop + } + }); + + var start = new Date(); + var currentMin = parseInt(start.toString('mm')); + + if (currentMin > 0 && currentMin < 15) + start.set({ 'minute': 15 }); + else if (currentMin > 15 && currentMin < 30) + start.set({ 'minute': 30 }); + else if (currentMin > 30 && currentMin < 45) + start.set({ 'minute': 45 }); + else + start.addHours(1).set({ 'minute': 0 }); + + $dialog.find('#start-datetime').val(start.toString('dd/MM/yyyy HH:mm')); + $dialog.find('#end-datetime').val(start.addMinutes(serviceDuration).toString('dd/MM/yyyy HH:mm')); + + // Display modal form. $dialog.find('.modal-header h3').text('New Appointment'); $dialog.modal('show'); }); @@ -784,17 +827,17 @@ var BackendCalendar = { * Event: Filter Existing Customers "Change" */ $('#filter-existing-customers').keyup(function() { - var key = $(this).val(); + var key = $(this).val().toLowerCase(); var $list = $('#existing-customers-list'); $list.empty(); $.each(GlobalVariables.customers, function(index, c) { - if (c.first_name.indexOf(key) != -1 - || c.last_name.indexOf(key) != -1 - || c.email.indexOf(key) != -1 - || c.phone_number.indexOf(key) != -1 - || c.address.indexOf(key) != -1 - || c.city.indexOf(key) != -1 - || c.zip_code.indexOf(key) != -1) { + if (c.first_name.toLowerCase().indexOf(key) != -1 + || c.last_name.toLowerCase().indexOf(key) != -1 + || c.email.toLowerCase().indexOf(key) != -1 + || c.phone_number.toLowerCase().indexOf(key) != -1 + || c.address.toLowerCase().indexOf(key) != -1 + || c.city.toLowerCase().indexOf(key) != -1 + || c.zip_code.toLowerCase().indexOf(key) != -1) { $list.append('
' + c.first_name + ' ' + c.last_name + '
'); } @@ -817,7 +860,7 @@ var BackendCalendar = { // add him to the listbox. if (serviceId == sid) { var optionHtml = ''; $('#select-provider').append(optionHtml); } @@ -1687,6 +1730,11 @@ var BackendCalendar = { $dialog.find('#select-provider').append(option); } }); + + // :: CLOSE EXISTING CUSTOMERS FILTER FRAME + $('#existing-customers-list').slideUp('slow'); + $('#filter-existing-customers').fadeOut('slow'); + $('#select-customer').text('Select'); // :: SETUP START AND END DATETIME PICKERS // Get the selected service duration. It will be needed in order to calculate @@ -1747,6 +1795,15 @@ var BackendCalendar = { throw 'Invalid email address!'; } + // :: CHECK APPOINTMENT START AND END TIME + var start = Date.parseExact($('#start-datetime').val(), 'dd/MM/yyyy HH:mm'); + var end = Date.parseExact($('#end-datetime').val(), 'dd/MM/yyyy HH:mm'); + if (start > end) { + $dialog.find('#start-datetime').parents().eq(1).addClass('error'); + $dialog.find('#end-datetime').parents().eq(1).addClass('error'); + throw 'Appointment start must be prior to appointment end date!'; + } + return true; } catch(exc) { $dialog.find('.modal-message').addClass('alert-error').text(exc).show('fade'); diff --git a/src/assets/js/backend_settings.js b/src/assets/js/backend_settings.js index 0d8b62d3..4c183c6e 100644 --- a/src/assets/js/backend_settings.js +++ b/src/assets/js/backend_settings.js @@ -137,6 +137,8 @@ var BackendSettings = { } else { $('#user-notifications').removeClass('active'); } + } else if ($(this).hasClass('about-tab')) { + $('#about').show(); } Backend.placeFooterToBottom();