forked from mirrors/easyappointments
More formatting changes
This commit is contained in:
parent
b2d2a5a1ce
commit
7c082689ea
7 changed files with 22 additions and 22 deletions
|
@ -284,16 +284,16 @@ body legend {
|
|||
width: auto;
|
||||
}
|
||||
|
||||
.form-sub-button img{
|
||||
.form-sub-button img {
|
||||
margin-top: -.25rem;
|
||||
}
|
||||
|
||||
.hidden{
|
||||
.hidden {
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.hide-toggle div{
|
||||
.hide-toggle div {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
|
|
|
@ -235,7 +235,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
|
|||
|
||||
var key = $(this).val().toLowerCase();
|
||||
|
||||
filterExistingCustomersTimeout = setTimeout(function() {
|
||||
filterExistingCustomersTimeout = setTimeout(function () {
|
||||
var $list = $('#existing-customers-list');
|
||||
|
||||
var url = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_filter_customers';
|
||||
|
@ -291,7 +291,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
|
|||
}
|
||||
});
|
||||
})
|
||||
.always(function() {
|
||||
.always(function () {
|
||||
$('#loading').css('visibility', '');
|
||||
});
|
||||
}, 1000);
|
||||
|
|
|
@ -224,8 +224,8 @@ window.BackendSettings = window.BackendSettings || {};
|
|||
* @argument isVisible a boolean which is true if the button should display 'visible' and false when the button should display 'hidden'
|
||||
*
|
||||
*/
|
||||
function setShowToggleValue($element, isVisible){
|
||||
if (getShowToggleValue($element) !== isVisible){
|
||||
function setShowToggleValue($element, isVisible) {
|
||||
if (getShowToggleValue($element) !== isVisible) {
|
||||
$element.find("div").toggleClass("hidden");
|
||||
}
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ window.BackendSettings = window.BackendSettings || {};
|
|||
*
|
||||
* @return the state of the button. True for visible, false for hidden.
|
||||
*/
|
||||
function getShowToggleValue($element){
|
||||
function getShowToggleValue($element) {
|
||||
var visiblePartArray = $element.find(".hide-toggle-visible");
|
||||
return !visiblePartArray.hasClass("hidden");
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ window.BackendSettings = window.BackendSettings || {};
|
|||
* make sure that our phone number is visible when it is required.
|
||||
*/
|
||||
$('#show-phone-number').on('click', function () {
|
||||
if (!getShowToggleValue($(this))){//if button is set to hidden
|
||||
if (!getShowToggleValue($(this))) {//if button is set to hidden
|
||||
$('#require-phone-number').prop('checked', false);
|
||||
}
|
||||
});
|
||||
|
@ -259,7 +259,7 @@ window.BackendSettings = window.BackendSettings || {};
|
|||
* make sure that our phone number is visible when it is required.
|
||||
*/
|
||||
$('#require-phone-number').on('click', function () {
|
||||
if ($(this).prop('checked')){
|
||||
if ($(this).prop('checked')) {
|
||||
setShowToggleValue($('#show-phone-number'), true);
|
||||
}
|
||||
});
|
||||
|
@ -287,7 +287,7 @@ window.BackendSettings = window.BackendSettings || {};
|
|||
|
||||
$.post(url, data)
|
||||
.done(function (response) {
|
||||
if (response === 'false') {
|
||||
if (response.is_valid === 'false') {
|
||||
$input.closest('.form-group').addClass('has-error');
|
||||
Backend.displayNotification(EALang.username_already_exists);
|
||||
$input.attr('already-exists', 'true');
|
||||
|
|
|
@ -80,12 +80,12 @@
|
|||
var visiblePartArray = $element.find(".hide-toggle-visible");
|
||||
var invisiblePartArray = $element.find(".hide-toggle-hidden");
|
||||
if (!(visiblePartArray.length === 0 || invisiblePartArray.length === 0)) {
|
||||
if (visiblePartArray.hasClass("hidden")){//our button is currently invisible
|
||||
if (visiblePartArray.hasClass("hidden")) {//our button is currently invisible
|
||||
return '0';//invisible
|
||||
}else{//our button is currently visible
|
||||
} else {//our button is currently visible
|
||||
return '1';//visible
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return '0';//invisible
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,14 +69,14 @@ window.FrontendBookApi = window.FrontendBookApi || {};
|
|||
|
||||
$.post(url, data)
|
||||
.done(function (response) {
|
||||
// The response contains the available hours for the selected provider and
|
||||
// service. Fill the available hours div with response data.
|
||||
// The response contains the available hours for the selected provider and service. Fill the available
|
||||
// hours div with response data.
|
||||
if (response.length > 0) {
|
||||
var providerId = $('#select-provider').val();
|
||||
|
||||
if (providerId === 'any-provider') {
|
||||
for (var availableProvider of GlobalVariables.availableProviders) {
|
||||
if (availableProvider.services.indexOf(serviceId) !== -1) {
|
||||
if (availableProvider.services.indexOf(Number(serviceId)) !== -1) {
|
||||
providerId = availableProvider.id; // Use first available provider.
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue