From fbac12112d466db982c493afc6f92ba62ef1351f Mon Sep 17 00:00:00 2001 From: Joep de Jong Date: Mon, 2 Sep 2024 12:22:22 +0200 Subject: [PATCH] Start week on monday --- src/main/resources/static/js/events/script.js | 5 ++++- src/main/resources/static/js/events/script.min.js | 2 +- src/main/resources/static/js/products/script.js | 5 ++++- src/main/resources/static/js/products/script.min.js | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/resources/static/js/events/script.js b/src/main/resources/static/js/events/script.js index e099c827..7e793cd0 100644 --- a/src/main/resources/static/js/events/script.js +++ b/src/main/resources/static/js/events/script.js @@ -80,7 +80,10 @@ $(document).ready(function () { altInput: true, altFormat: 'F j, Y H:i', dateFormat: "Y-m-dTH:i:S", - time_24hr: true + time_24hr: true, + locale: { + firstDayOfWeek: 1 + } }; $('#ending').flatpickr(config); $('#start').flatpickr(config); diff --git a/src/main/resources/static/js/events/script.min.js b/src/main/resources/static/js/events/script.min.js index c6c2878d..b14134d2 100644 --- a/src/main/resources/static/js/events/script.min.js +++ b/src/main/resources/static/js/events/script.min.js @@ -1 +1 @@ -var TemplateSelector;function format(t,e){return $.each(e,(function(e,a){t=t.replace(new RegExp("\\{"+e+"\\}","g"),a)})),t}!function(t){TemplateSelector={init:function(){TemplateSelector.binds()},binds:function(){t(".event-template-item a").on("click",TemplateSelector.__setEventTemplateValues),t(".product-template-item a").on("click",TemplateSelector.__setProductTemplateValues)},__setEventTemplateValues:function(e){e.preventDefault();var a=t(e.target).parent().data("template");t.each(a,(function(e,a){t("#"+e).val(a)})),TemplateSelector.__setCategories(a),TemplateSelector.__setTimes(a)},__setProductTemplateValues:function(e){e.preventDefault();var a=t(e.target).parent().data("template");t.each(a,(function(e,a){var r=e.replace(/\b\w/g,(function(t){return t.toUpperCase()})),o=t("#product"+r);o.val(a),"chOnly"===e&&!0===a?o.attr("checked","checked"):o.removeAttr("checked"),"reservable"===e&&!0===a?o.attr("checked","checked"):o.removeAttr("checked")}))},__setCategories:function(e){t("input[name='categories']").each((function(){t.inArray(t(this).val(),e.categories)>=0?t(this).attr("checked","checked"):t(this).removeAttr("checked")}))},__setTimes:function(t){document.querySelector("#start")._flatpickr.setDate(t.startingTime),document.querySelector("#ending")._flatpickr.setDate(t.endingTime)}}}(jQuery),$(document).ready((function(){TemplateSelector.init();var t={enableTime:!0,altInput:!0,altFormat:"F j, Y H:i",dateFormat:"Y-m-dTH:i:S",time_24hr:!0};$("#ending").flatpickr(t),$("#start").flatpickr(t),$("#productSellStart").flatpickr(t),$("#productSellEnd").flatpickr(t),$("#q").autocomplete({serviceUrl:"/events/api/v1/products/search/unused",onSelect:function(t){r(t.data,t.value),$(this).val(""),$("#addProduct").modal("hide")}});const e=document.getElementById("externalProductUrl");function a(){$("#products").children().length>0&&""!==e.value?e.setCustomValidity("It is not possible to use products when using an external product URL."):e.setCustomValidity("")}function r(t,e){var r=$("#products"),o=r.children().length;$("#productsTable").append(format(" {0}",[e,t])),r.append(format('',[o,o,t])),$("#noProducts").remove(),$((function(){$('[data-toggle="tooltip"]').tooltip()})),a()}e.addEventListener("input",a),$(".remove-product").on("click",(function(t){t.preventDefault();var e=$("#products"),r=e.children().length,o=$(this).data("product-id"),c=e.find(":input[value='"+o+"']"),n=c.attr("id").replace("products","");c.remove(),$(this).parent().parent().remove();for(var l=n;l=0?t(this).attr("checked","checked"):t(this).removeAttr("checked")}))},__setTimes:function(t){document.querySelector("#start")._flatpickr.setDate(t.startingTime),document.querySelector("#ending")._flatpickr.setDate(t.endingTime)}}}(jQuery),$(document).ready((function(){TemplateSelector.init();var t={enableTime:!0,altInput:!0,altFormat:"F j, Y H:i",dateFormat:"Y-m-dTH:i:S",time_24hr:!0,locale:{firstDayOfWeek:1}};$("#ending").flatpickr(t),$("#start").flatpickr(t),$("#productSellStart").flatpickr(t),$("#productSellEnd").flatpickr(t),$("#q").autocomplete({serviceUrl:"/events/api/v1/products/search/unused",onSelect:function(t){r(t.data,t.value),$(this).val(""),$("#addProduct").modal("hide")}});const e=document.getElementById("externalProductUrl");function a(){$("#products").children().length>0&&""!==e.value?e.setCustomValidity("It is not possible to use products when using an external product URL."):e.setCustomValidity("")}function r(t,e){var r=$("#products"),o=r.children().length;$("#productsTable").append(format(" {0}",[e,t])),r.append(format('',[o,o,t])),$("#noProducts").remove(),$((function(){$('[data-toggle="tooltip"]').tooltip()})),a()}e.addEventListener("input",a),$(".remove-product").on("click",(function(t){t.preventDefault();var e=$("#products"),r=e.children().length,o=$(this).data("product-id"),c=e.find(":input[value='"+o+"']"),n=c.attr("id").replace("products","");c.remove(),$(this).parent().parent().remove();for(var l=n;l