forked from mirrors/easyappointments
Fixed Issue #29
This commit is contained in:
parent
3059f03a3d
commit
b935dd954f
8 changed files with 19 additions and 22 deletions
|
@ -73,7 +73,7 @@
|
|||
* Make an ajax call to the server and check whether the user's credentials are right.
|
||||
* If yes then redirect him to his desired page, otherwise display a message.
|
||||
*/
|
||||
$('form').submit(function() {
|
||||
$('form').submit(function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
var postUrl = GlobalVariables.baseUrl + 'user/ajax_forgot_password';
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
* Make an ajax call to the server and check whether the user's credentials are right.
|
||||
* If yes then redirect him to his desired page, otherwise display a message.
|
||||
*/
|
||||
$('#login-form').submit(function() {
|
||||
$('#login-form').submit(function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
var postUrl = GlobalVariables.baseUrl + 'user/ajax_check_login';
|
||||
|
|
|
@ -60,12 +60,12 @@ CustomersHelper.prototype.bindEventHandlers = function() {
|
|||
/**
|
||||
* Event: Filter Customers Form "Submit"
|
||||
*/
|
||||
$('#filter-customers form').submit(function() {
|
||||
event.preventDefault();
|
||||
$('#filter-customers form').submit(function(event) {
|
||||
var key = $('#filter-customers .key').val();
|
||||
$('#filter-customers .selected-row').removeClass('selected-row');
|
||||
BackendCustomers.helper.resetForm();
|
||||
BackendCustomers.helper.filter(key);
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -116,12 +116,12 @@ ServicesHelper.prototype.bindEventHandlers = function() {
|
|||
/**
|
||||
* Event: Filter Services Form "Submit"
|
||||
*/
|
||||
$('#filter-services form').submit(function() {
|
||||
event.preventDefault();
|
||||
$('#filter-services form').submit(function(event) {
|
||||
var key = $('#filter-services .key').val();
|
||||
$('#filter-services .selected-row').removeClass('selected-row');
|
||||
BackendServices.helper.resetForm();
|
||||
BackendServices.helper.filter(key);
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -343,7 +343,6 @@ ServicesHelper.prototype.resetForm = function() {
|
|||
$('#filter-services .selected-row').removeClass('selected-row');
|
||||
$('#filter-services button').prop('disabled', false);
|
||||
$('#filter-services .results').css('color', '');
|
||||
$('#filter-services .key').val('');
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -478,12 +477,12 @@ CategoriesHelper.prototype.bindEventHandlers = function() {
|
|||
/**
|
||||
* Event: Filter Categories Form "Submit"
|
||||
*/
|
||||
$('#filter-categories form').submit(function() {
|
||||
event.preventDefault();
|
||||
$('#filter-categories form').submit(function(event) {
|
||||
var key = $('#filter-categories .key').val();
|
||||
$('.selected-row').removeClass('selected-row');
|
||||
BackendServices.helper.resetForm();
|
||||
BackendServices.helper.filter(key);
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -724,7 +723,6 @@ CategoriesHelper.prototype.resetForm = function() {
|
|||
$('#filter-categories .selected-row').removeClass('selected-row');
|
||||
$('#filter-categories .results').css('color', '');
|
||||
$('#filter-categories button').prop('disabled', false);
|
||||
$('#filter-categories .key').val('');
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,12 +18,12 @@ AdminsHelper.prototype.bindEventHandlers = function() {
|
|||
*
|
||||
* Filter the admin records with the given key string.
|
||||
*/
|
||||
$('#filter-admins form').submit(function() {
|
||||
event.preventDefault();
|
||||
$('#filter-admins form').submit(function(event) {
|
||||
var key = $('#filter-admins .key').val();
|
||||
$('#filter-admins .selected-row').removeClass('selected-row');
|
||||
BackendUsers.helper.resetForm();
|
||||
BackendUsers.helper.filter(key);
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,12 +18,12 @@ ProvidersHelper.prototype.bindEventHandlers = function() {
|
|||
*
|
||||
* Filter the provider records with the given key string.
|
||||
*/
|
||||
$('#filter-providers form').submit(function() {
|
||||
event.preventDefault();
|
||||
$('#filter-providers form').submit(function(event) {
|
||||
var key = $('#filter-providers .key').val();
|
||||
$('.selected-row').removeClass('selected-row');
|
||||
BackendUsers.helper.resetForm();
|
||||
BackendUsers.helper.filter(key);
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,12 +18,12 @@ SecretariesHelper.prototype.bindEventHandlers = function() {
|
|||
*
|
||||
* Filter the secretary records with the given key string.
|
||||
*/
|
||||
$('#filter-secretaries form').submit(function() {
|
||||
event.preventDefault();
|
||||
$('#filter-secretaries form').submit(function(event) {
|
||||
var key = $('#filter-secretaries .key').val();
|
||||
$('#filter-secretaries .selected-row').removeClass('selected-row');
|
||||
BackendUsers.helper.resetForm();
|
||||
BackendUsers.helper.filter(key);
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -212,9 +212,7 @@ var FrontendBook = {
|
|||
* once the appointment is cancelled, it will be delete from the
|
||||
* database.
|
||||
*/
|
||||
$('#cancel-appointment').click(function() {
|
||||
event.preventDefault();
|
||||
|
||||
$('#cancel-appointment').click(function(event) {
|
||||
var dialogButtons = {};
|
||||
dialogButtons['OK'] = function() {
|
||||
if ($('#cancel-reason').val() === '') {
|
||||
|
@ -234,6 +232,7 @@ var FrontendBook = {
|
|||
|
||||
$('#message_box').append('<textarea id="cancel-reason" rows="3"></textarea>');
|
||||
$('#cancel-reason').css('width', '353px');
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -244,9 +243,7 @@ var FrontendBook = {
|
|||
* in the meantime the selected appointment date/time wasn't reserved by
|
||||
* another customer or event.
|
||||
*/
|
||||
$('#book-appointment-form').submit(function() {
|
||||
event.preventDefault();
|
||||
|
||||
$('#book-appointment-form').submit(function(event) {
|
||||
var formData = jQuery.parseJSON($('input[name="post_data"]').val());
|
||||
|
||||
var postData = {
|
||||
|
@ -284,6 +281,8 @@ var FrontendBook = {
|
|||
FrontendBook.getAvailableHours($('#select-date').val());
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
return false;
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue