Skip to content

Instantly share code, notes, and snippets.

Created March 19, 2013 02:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5193107 to your computer and use it in GitHub Desktop.
Save anonymous/5193107 to your computer and use it in GitHub Desktop.
$(document).ready(function () {
$("#rota td").selectable({
selected: function(event, ui) {
var $target = $(this);
var $bf = $target.find('.booking_form');
var hospital = $target.data('hospital-id');
console.log($bf);
console.log("Hospital ID: " + hospital);
$bf.dialog();
$bf.find('input#hospital_id').val(hospital);
event.preventDefault();
$('.booking_form .user_full_name').on('change', function (e) {
this.form.submit();
});
$('.rota td').addClass("Half Full Semi-Foo");
}
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment