Item(s) | £0.00 |
Grand Total | £0.00 |
");screen.append("
");$("a#calendarProductModalView", screen).on("click", function() {var targetPage = "/pd/"; if (calEvent.extendedProps.IDDesignationProduct > 0 && calEvent.extendedProps.IDDesignationProduct !== calEvent.extendedProps.IDProduct) { targetPage += calEvent.extendedProps.IDDesignationProduct + "?diid=" + calEvent.extendedProps.IDProduct;} else { targetPage += calEvent.extendedProps.IDProduct;}window.location.href = targetPage;}).button();$("a#calendarProductModalDelete", screen).on("click", function() {var confirm = $("div#CartCalendarViewProductRemoveConfirm");if (confirm.length === 0) {confirm = $("
Are you sure you want to remove this product from your cart?
");}confirm.dialog({dialogClass: 'dialog',title: "Remove product from cart",resizable: false,modal: true,buttons: {"Remove item": function() {MCE.RemoveCartProduct(calEvent.id, MCE.RedirectToPageWithoutHash);},Cancel: function() {$(this).dialog("close");return false;}}});}).button();}screen.dialog({dialogClass: 'dialog',autoOpen: true,title: "Product actions",modal: true,width: "auto",height: "auto",open: function(event, ui) {},close: function(event, ui) {$(this).dialog("destroy");}});}$("a#viewCartProductsCalendar").on("click", function() {if (!$("#cartProductCalendar").hasClass("fc")) {MCE.CartProductCalendar = new FullCalendar.Calendar(document.getElementById('cartProductCalendar'), { locale: cfg.configs.CultureName,theme: true, headerToolbar: { start: 'prev,next today', center: 'title', end: 'dayGridMonth,timeGridWeek,timeGridDay'}, dayHeaderDidMount: function (info) { $('#cartProductCalendar').find('.fc-today-button').removeAttr('title'); },columnFormat: 'dddd',events: function(info, callback) {$.ajax({type: "POST",contentType: "application/json; charset=utf-8",url: "/WebServices/wsSuggestedProduct.asmx/GetAllCartEvents",dataType: "json",success: function(data) {var events = [];for (var i = 0; i < data.d.Data.length; i++) {events.push(data.d.Data[i]);}callback(events);},error: function(status) {}});},eventClick: function(info) {BuildCartCalendarViewModal(info.event);}}); MCE.CartProductCalendar.render();}$("div#cartCalendarModalContainer").dialog({dialogClass: 'dialog',autoOpen: true,title: "Basket Calendar View",modal: true,width: "900px",height: "auto",open: function () {// Need to find another solution. The 'open' event happens before the div is rendered. Could not find a way to trigger a function AFTER the div is rendered. setTimeout(function () { MCE.CartProductCalendar.render(); }, 1000); }});$.ajax({type: "POST",contentType: "application/json; charset=utf-8",url: "/WebServices/wsSuggestedProduct.asmx/GetCartEventConflicts",dataType: "json",success: function(data) {if (data.d.Data != "") {var screen = $("div#CartCalendarViewConflictModal");if (screen.length === 0) {screen = $("
");}screen.append(data.d.Data);screen.dialog({dialogClass: 'dialog',autoOpen: true,title: "Conflicts were found with your schedule",modal: true,width: "auto",height: "auto"});}},error: function(status) {}});});$(".hiddenInfoHeader").on("click", function() {var $this = $(this);var row = $this.siblings(".hiddenInfo");var span = $this.find(".hiddenInfoText");if (span.text().indexOf("More") >= 0) {span.html(" Less");} else {span.html(" More");}row.toggleClass("hiddenDependentTable");});});