PageSourceSearch

https://www.parkhotelvalmonte.nl/data/static/fletcher-assets/js/includes/restaurant.js?t=1790151163

js parkhotelvalmonte.nl collected 2026-09-26 03:05:26 UTC 10,956 bytes, 1 lines download raw bytes

1function sendReservationForm(){var e=new Object;$("#reservationForm").find("input").each(function(){"checkbox"==$(this).attr("type")||"radio"==$(this).attr("type")?void 0!==$(this).val()?$(this).is(":checked")&&(e[$(this).attr("name")]=$(this).val()):$(this).is(":checked")?e[$(this).attr("name")]="ja":e[$(this).attr("name")]="nee":e[$(this).attr("name")]=$(this).val()}),$("#reservationForm").find("select").each(function(){e[$(this).attr("name")]=$(this).val()}),$("#reservationForm").find("textarea").each(function(){e[$(this).attr("name")]=$(this).val()}),showLoader(1e3),e.format="json",$.post($("#reservationForm").data("action"),e).done(function(e){var t,e=$.parseJSON(e),a="";$.each(e.errors,function(e,t){a+=t+"<br/>",$('[name="'+e+'"]').addClass("form__input--error"),$('[for="'+e+'"]').addClass("form__label--error")}),void 0!==e.message&&null!=e.message&&(t=e.message,t+='<p class="alert">'+a+"</p>",$(".error_container").html(t),$(".error_container").show(),reInitCaptcha()),void 0!==e.url&&null!=e.url&&(location.href=e.url)});1==$("#reservationForm").data("captcha")&&grecaptcha.reset()}$("#reservationForm").find("input").on(eventMode+" click",function(e){mobileMode||(e.preventDefault(),$(e.target).blur())}),$('a[data-modal="reservationModal"]').on(eventMode,function(){$(".error_container").hide(),$("#resContainer").show(),$(".reservationFormContainer").find(".modal__footer").show(),$("#reservationForm").find("input").on(eventMode+" click",function(e){mobileMode||(e.preventDefault(),$(e.target).blur())}),setTimeout(function(){$("#reservationForm").find("input").off(eventMode+" click")},500);var e=["first_name","last_name","res_email","phone","type_reservation"];$("#reservationForm").find("input").each(function(){"hidden"!=$(this).attr("type")&&("checkbox"==$(this).attr("type")?$(this).prop("checked",!1):jQuery.inArray($(this).attr("name"),e)<0&&($(this).attr("value",""),$(this).val("")))}),$("#reservationForm").find("textarea").each(function(){"hidden"!=$(this).attr("type")&&($(this).attr("value",""),$(this).val(""))}),$("#reservationForm").find("select").each(function(){$(this).find("option").prop("selected",!1)})}),$("#reservationForm button.button--action").on("click",function(){1==$("#reservationForm").data("captcha")&&($("#g-recaptcha-response").length<1||""==$("#g-recaptcha-response").val())?grecaptcha.execute(window.recaptchaWidget.reservationForm):sendReservationForm()});var menuContent,H2list,menucards=$(".content--menu h2.main__heading").length;function updateAvailabilityCalendar(n,e){var t={};0<$('input[name="type_reservation"]').length?t.type=$('input[name="type_reservation"]:checked').val():t.type=$('input[name="type"]').val(),t.restaurant=$("input#restaurant_id").val(),"object"!=typeof n&&(t.month=n,t.year=e),showLoader(),$.post("/?module=TableReservation&command=UpdateAvailability",t).done(function(e){var t,a;window.json=e,"object"==typeof n&&(a=(a=$(form+" #reservation__date").data("mindate").split("-"))[2]+"-"+a[1]+"-"+a[0],a=Date.parse(a),t=$.now(),a>$.now()&&(t=a),a=new Date(t),window.openCalendar=a,$(form+" #reservation__date").addClass("form__select--disabled")),hideLoader(),setRestaurantDates(),setRestaurantTimes(),void 0===e.error&&updatePersonOptions()})}1<menucards&&(menuContent=$(".content--menu"),H2list=new Array,menuContent.wrapInner('<div class="grid"><div class="m-bit-100 bit-70">'),menuContent.find(".grid").prepend('<div class="m-bit-100 bit-30" id="menucardList"></div>'),$.each(menuContent.find("h2.main__heading"),function(e){var t=$(this).closest(".dish__menucard");t.prop("id","menucard-"+e),0!=e&&t.addClass("dish__menucard--hide"),H2list.push($(this).text())}),0<H2list.length&&(menu='<ul class="dish__menucards">',$.each(H2list,function(e,t){menu+=0==e?'<li><a href="javascript:;" class="dish__menucards--active" data-menucard="menucard-'+e+'">'+t+'<svg xmlns:xlink="http://www.w3.org/1999/xlink"><use xlink:href="/data/static/fletcher-assets/svg/icons-gui.svg#angle-right"></use></svg></a></li>':'<li><a href="javascript:;" data-menucard="menucard-'+e+'">'+t+'<svg xmlns:xlink="http://www.w3.org/1999/xlink"><use xlink:href="/data/static/fletcher-assets/svg/icons-gui.svg#angle-right"></use></svg></a></li>'}),menu+="</ul>"),$("#menucardList").prepend(menu),$(document).on("click","#menucardList a",function(){var e=$
1(this).data("menucard");$("#menucardList a").removeClass("dish__menucards--active"),$(this).addClass("dish__menucards--active"),$(".dish__menucard:not(.dish__menucard--hide)").fadeOut(300,function(){$(this).addClass("dish__menucard--hide"),$("#"+e).fadeIn(300,function(){$(this).removeClass("dish__menucard--hide")})})}));var json,setFBDates,setFBTimes,form="#resContainer",updateRestaurantDates=(window.openCalendar=null,function(){var e=$(form+" #nr_persons").val();window.dates=[],$(form+" #reservation__date").val(null),$(form+" #time").val(null);var t=$(form+" #reservation__date").data("mindate").split("-"),t=t[2]+"-"+t[1]+"-"+t[0],n=Date.parse(t),t=$(form+" #reservation__date").data("maxdate").split("-"),t=t[2]+"-"+t[1]+"-"+t[0],r=Date.parse(t);0<e&&(void 0!==window.json[e]&&$.each(window.json[e],function(e,t){var a=Date.parse(e);n<=a&&a<=r&&window.dates.push(e)}),$(form+" #reservation__date").datepicker("refresh"))}),setRestaurantDates=function(){var a,e,t;$(form+" #reservation__date").hasClass("form__select--disabled")?(t=$(form+" #nr_persons").val(),window.dates=[],$(form+" #reservation__date").val(null),$(form+" #time").val(null),0<t?(e=(e=$(form+" #reservation__date").data("maxdate").split("-"))[2]+"-"+e[1]+"-"+e[0],a=Date.parse(e),void 0!==window.json[t]&&$.each(window.json[t],function(e,t){Date.parse(e)<=a&&window.dates.push(e)}),t=(e=$(form+" #reservation__date").data("mindate").split("-"))[2]+"-"+e[1]+"-"+e[0],e=Date.parse(t),t=$.now(),e>$.now()&&(t=e),e=new Date(t),null!==window.openCalendar&&(e=window.openCalendar),$(form+" #reservation__date").removeClass("form__select--disabled"),$(form+" #reservation__date").datepicker("destroy"),$(form+" #reservation__date").datepicker({beforeShowDay:function(e){e=jQuery.datepicker.formatDate("yy-mm-dd",e);return[0<=window.dates.indexOf(e)]},onChangeMonthYear:function(e,t){var a=new Date(e,t-1,1);window.openCalendar=a,updateAvailabilityCalendar(t,e)},onClose:function(e){""==e&&($(form+" #reservation__date").addClass("form__select--disabled"),setRestaurantDates())},defaultDate:e,dateFormat:"dd-mm-yy",dayNamesMin:daynames,monthNames:monthnames}),$(form+" #reservation__date").removeAttr("disabled"),$(form+" #reservation__date").removeAttr("placeholder")):(t=$(form+" #reservation__date").data("original"),$(form+" #reservation__date").attr("placeholder",t),$(form+' #reservation__date option[value=""]').html(t),$(form+" #reservation__date option").attr("disabled","disabled"),$(form+" #reservation__date").addClass("form__select--disabled").prop("disabled","disabled"),t=$(form+" #time").data("original"),$(form+" #time").attr("placeholder",t),$(form+' #time option[value=""]').html(t),$(form+" #time option").attr("disabled","disabled"),$(form+" #time").addClass("form__select--disabled").prop("disabled","disabled"))):updateRestaurantDates()},updatePersonOptions=function(){var e,t={};for(e in window.json)t[e]=e;var a={};$(form+" #nr_persons option").each(function(){a[$(this).val()]=$(this)}
1),$(form+" #nr_persons option").each(function(){var e=$(this).val();""!=e&&void 0===t[e]&&$(this).remove()}),$(form+" #nr_persons option").each(function(){$.each(t,function(e){var t;0==$(form+' #nr_persons option[value="'+e+'"]').length&&((t=document.createElement("option")).text=e,t.setAttribute("value",e),void 0===a[e]&&void 0!==a[e-1]?a[e-1].after(t):void 0===a[e]&&void 0!==a[e+1]?a[e+1].before(t):$(form+" #nr_persons").appendChild(t))})})},setRestaurantTimes=function(){var o,e=$(form+" #reservation__date").val(),t=$(form+" #nr_persons").val(),t=window.json[t];$(form+" #time").val(null),e?(e=e.split("-"),o=e[2]+"-"+e[1]+"-"+e[0],e=$(form+" #time").data("option"),$(form+" #time").empty().append("<option value=''>"+e+"</option>"),$(form+" #time").removeAttr("disabled").removeClass("form__select--disabled"),t[o]&&$.each(t[o],function(t,e){let a=t;var n=new Date(o+" "+t),r=n.getHours(),n=n.getMinutes().toString().padStart(2,"0");if("en"===document.documentElement.lang){let e=r%12;0===e&&(e=12),a=e+":"+n+" "+(12<=r?"PM":"AM")+" / "+t}else"nl"===document.documentElement.lang&&(a=a.replace(":","."));$(form+" #time").append("<option value='"+t+"'>"+a+"</option>")})):(e=$(form+" #time").data("original"),$(form+" #time").attr("placeholder",e),$(form+' #time option[value=""]').html(e),$(form+" #time option").attr("disabled","disabled"),$(form+" #time").addClass("form__select--disabled").prop("disabled","disabled"))};0<$("#reservationForm").length&&"undefined"!=typeof restaurantAvailability&&"undefined"==typeof packageAvailability&&(window.json=restaurantAvailability,$(document).on("change",form+" #nr_persons",setRestaurantDates),$(document).on("change",form+" #reservation__date",setRestaurantTimes),$(document).on("change",form+" [name='type_reservation']",updateAvailabilityCalendar)),0<$("#resContainer").length&&"undefined"!=typeof packageAvailability&&(json=packageAvailability,setFBDates=function(){if(0<$(form+" #reservation__date").length)return setRestaurantDates();var e,t=$(form+" #nr_persons").val();packageAvailability;0<t?(t=packageAvailability[t],e=$(form+" #date").data("option"),$(form+" #date").attr("placeholder",e),$(form+' #date option[value=""]').html(e),$(form+" #date option").attr("disabled","disabled"),$(form+' #date option[value=""]').removeAttr("disabled"),$.each(t,function(e,t){e=e.split("-"),e=e[2]+"-"+e[1]+"-"+e[0];$(form+' #date option[value="'+e+'"]').removeAttr("disabled")}),$(form+" #date").removeClass("form__select--disabled").prop("disabled",!1)):(e=$(form+" #date").data("original"),$(form+" #date").attr("placeholder",e),$(form+' #date option[value=""]').html(e),$(form+" #date option").attr("disabled","disabled"),$(form+" #date").addClass("form__select--disabled").prop("disabled","disabled"))},setFBTimes=function(){if(0<$(form+" #reservation__date").length)return setRestaurantTimes();var e,t=null,a=$(form+" #nr_persons").val(),n=$(form+" #date").val(),r=packageAvailability,n=n.split("-"),n=n[2]+"-"+n[1]+"-"+n[0];null!==(t=0<a&&n?r[a][n]:t)?(e=$(form+" #time").data("option"),$(form+" #time").empty().append('<option value="">'+e+"</option>"),$.each(t,function(e,t){$(form+" #time").append("<option value='"+e+"'>"+e+"</option>")}),$(form+" #time").removeClass("form__select--disabled").prop("disabled",!1)):(e=$(form+" #time").data("original"),$(form+" #time").addClass("form__select--disabled").prop("disabled","disabled").empty().append('<option value="">'+e+"</option>"))},$(document).on("change",form+" #nr_persons",setFBDates),$(document).on("change",form+" #date",setFBTimes),0<$(form+" #reservation__date").length)&&$(document).on("change",form+" #reservation__date",setFBTimes);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.