Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allowOverlappingBookings #71

Open
msslava opened this issue Dec 28, 2016 · 7 comments
Open

allowOverlappingBookings #71

msslava opened this issue Dec 28, 2016 · 7 comments

Comments

@msslava
Copy link

msslava commented Dec 28, 2016

When the value is set to 0, I can still make a reservation. You can somehow fix it? (I've read that you are working on branch 2.0, but may be a small fixed?)
test

@neokoenig
Copy link
Owner

Have you restarted the application?

@msslava
Copy link
Author

msslava commented Dec 28, 2016

Yes. What happens is this: when I want to click on the Create Booking button - icon appears ban - but the button still works and book created.

@neokoenig
Copy link
Owner

Ah yes, I remember the conversation about this now:
#27

Afraid I don't have time to write this in at the moment;
But you might be able to alter the js fairly easily?

@msslava
Copy link
Author

msslava commented Dec 28, 2016

If you could tell that it is necessary to fix - I'll try to do it.

@neokoenig
Copy link
Owner

neokoenig commented Dec 28, 2016

Try replacing the concurrencyCheck() function in /views/bookings/_form.cfm to this:

function concurrencyCheck(){
		var start=$("#event-start").val(),
			end=$("#event-end").val(),
			location=$("#event-locationid").val(),
			id=$("#tempkey").val();
			display=$("#concurrencyCheckResult"),
			checkurl=display.data("checkurl");
		if(start.length && end.length){
			console.log("Concurrency Check");
			display.html("");
			console.log(start, end, location);
			$.ajax({
				url: checkurl,
				data: {
					start: start,
					end: end,
					location: location,
					id: id
				},
				success: function(r){
					// Has a message has come back from the check?
					if(r.length > 0){
						// Disable stuff here
						$("#bookingform .btn-primary").attr('disabled','disabled');
					} else {
						// Re-enable button
						$("#bookingform .btn-primary").removeAttr('disabled');;
					}
					display.html(r);
				}
			});
		}
	};

no idea if this will work - written off the top of my head with no testing!
Basically, if there's a message coming back from the check, disable the button until there's no message.

@msslava
Copy link
Author

msslava commented Dec 28, 2016

No, unfortunately, it does not work. It works as well as before.
I'm using version 1.3 - there is also mixed up the values 0 and 1 for allowOverlappingBookings parametr.
If you have time in the future - can you fix it?

@msslava
Copy link
Author

msslava commented Dec 28, 2016

If I can help somebody:
in stylesheets/rbs.min file
you need to add a line visibility: hidden:

.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
  cursor: not-allowed;
  opacity: 0.65;
  visibility: hidden;
  filter: alpha(opacity=65);
  -webkit-box-shadow: none;
  box-shadow: none;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants