HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers95/rentman.io/wwwroot/js/kms/kms.js
function checkIfResourceShouldBeFresh(){const e=document.querySelectorAll('[id^="TextField-last_modified-"]'),t=document.getElementById("entity-form").getAttribute("data-freshness");if(0===e.length||!isset(t))return!1}function shouldUseNormalSubmit(){const e=document.querySelectorAll('[id^="TextField-last_modified-"]'),t=document.getElementById("entity-form").getAttribute("data-freshness");if(0===e.length||!isset(t))return!0;submitIfFresh(e,t)}function submitIfFresh(e,t){let n={};for(let t=0;t<e.length;t++){const o=e[t];n[o.getAttribute("id")]=o.getAttribute("value")}try{Ajax.post(t,n,function(e){const t=e.status;if(200===t){const e=document.querySelectorAll('.js-components input[type="text"], .js-components input[type="checkbox"], .js-components select, .js-components textarea'),t=e.length;for(let n=0;n<t;n++)e[n].disabled=!0;document.querySelector('input[value="submit-cloaked"]').click()}if(409===t){let e='<div class="modal"><div class="header"><h4>Conflict found</h4></div><div class="body"><p class="message  message--large">We have found a conflict when compare the last modified timestamp. A newer version of this resource has been found. Please recreate your edits in a new tab or refresh the browser and do it again.</p><div class="buttons"><button class="cancel">I understand</button></div></div></div></div><div class="shader"></div>',t=document.createElement("div");t.setAttribute("id","confirmBox"),t.innerHTML=e,t.classList.add("show"),document.body.appendChild(t);let n=t.querySelector("button.cancel"),o=t.querySelector("div.shader");n.addEventListener("click",function(){t.remove()}),o.addEventListener("click",function(){t.remove()}),console.log("Freshness: test failed")}200!==t&&409!==t&&console.log("Freshness: Test unknown error")})}catch(e){console.log(e)}}document.addEventListener("DOMContentLoaded",function(){new TabsController("tab-content","entity-tabs","active",!0,'input[name="tabslug"]');let e=document.getElementById("save-button"),t=new styleClassController(e);e&&e.addEventListener("click",function(e){if(e.preventDefault(),shouldUseNormalSubmit()){let e=document.querySelector('input[value="submit-cloaked"]');t.requestAddClass("disabled");document.querySelectorAll(".js-components input, .js-components select, .js-components textarea");e.click()}});let n=document.querySelector("input.trash.confirm");n&&new ConfirmationController(n);let o=document.getElementById("entity-form"),l=o?o.dataset.globalTranslations:{},i=new Initializer("#entity-form");i.bindSelectorToCallback(".js-components-area",function(e,t){new ComponentAreaManager(t,new ComponentManagerApiController)}),i.bindSelectorToCallback(".entity-attribute-documents",function(e,n){let i=o.dataset.uploadRoute,a=o.dataset.maxPostSize,s=o.dataset.maxUploadSize,r=new HTML5Uploader(i,a,s,l),c=new DocumentManager(n,r);new FileDragAndDropHandler(n.querySelector(".drag-and-drop-area")).hookTo(c),r.on("uploadStart",function(){t.requestAddClass("disabled")}),r.on("uploadComplete",function(){t.requestRemoveClass("disabled")}),r.on("uploadCanceled",function(){t.requestRemoveClass("disabled")}),r.on("uploadFailed",function(){t.requestRemoveClass("disabled")})}),i.bindSelectorToCallback(".js-text-field",function(e,t){new TextField(t)}),i.bindSelectorToCallback(".entity-attribute-autocomplete-combo-box",function(e,t){if("false"===t.dataset.readonly){new AutoCompleteInputManager(t)}}),i.bindSelectorToCallback(".entity-attribute-on-off",function(e,t){new OnOff(t)}),i.bindSelectorToCallback(".js-video",function(e,t){new Video(t)}),i.bindSelectorToCallback(".entity-attribute-data-table",function(e,t){new DataTable(t)}),i.bindSelectorToCallback(".confirm",function(e,t){new ConfirmationController(t)}),i.bindSelectorToCallback(".entity-attribute-select",function(e,t){new Select(t)}),i.bindSelectorToCallback("[data-to-copy]",function(e,t){new CopyText(t)}),i.bindSelectorToCallback(".tiny-mce",function(e,t){t.id||(t.id=(new Date).getTime()+Math.random().toString(36).substring(7)),tinymce.remove("#"+t.id),tinymce.init({target:t,skin:"kms",menubar:!1,statusbar:!1,plugins:["code","paste","link"],toolbar:"undo redo | styleselect | bold italic underline | bullist numlist  | indent | link |  alignleft aligncenter alignright  | code",rel_list:[{title:"None",value:"none"},{title:"No opener",value:"noopener"},{title:"No referrer",value:"noreferrer"},{title:"No follow",value:"nofollow"}],height:"200",paste_as_text:!0,style_formats:[{title:"Titel 1",block:"h1"},{title:"Titel 2",block:"h2"},{title:"Titel 3",block:"h3"},{title:"Titel 4",block:"h4"},{title:"Titel 5",block:"h5"},{title:"Titel 6",block:"h6"},{title:"Subheading 1",block:"h5",classes:"is-sub"},{title:"Subheading 2",block:"h6",classes:"is-sub"},{title:"Subheading 3",block:"h6",classes:"is-alternative-sub"},{title:"UL Checklist",selector:"ul",classes:"s-checklist"},{title:"Intro",block:"p",classes:"is-intro"}],convert_urls:!1,setup:function(e){e.on("change",function(n){!function(e,t){e.save();let n=createNewEvent("change");dispatchEventForElement(t,n)}(e,t)})}})},!1),i.bindSelectorToCallback(".tiny-mce-on-click",function(e,t){t.id||(t.id=(new Date).getTime()+Math.random().toString(36).substring(7)),t.addEventListener("click",function(){t.parentNode.parentNode.querySelector(".js-tinymce-overlay").remove(),tinymce.remove("#"+t.id),tinymce.init({target:t,skin:"kms",menubar:!1,statusbar:!1,plugins:["code","paste","link"],toolbar:"undo redo | styleselect | bold italic underline | bullist numlist  | indent | link |  alignleft aligncenter alignright  | code",rel_list:[{title:"None",value:"none"},{title:"No opener",value:"noopener"},{title:"No referrer",value:"noreferrer"},{title:"No follow",value:"nofollow"}],height:"200",paste_as_text:!0,style_formats:[{title:"Titel 1",block:"h1"},{title:"Titel 2",block:"h2"},{title:"Titel 3",block:"h3"},{title:"Titel 4",block:"h4"},{title:"Titel 5",block:"h5"},{title:"Titel 6",block:"h6"},{title:"Subheading 1",block:"h5",classes:"is-sub"},{title:"Subheading 2",block:"h6",classes:"is-sub"},{title:"Subheading 3",block:"h6",classes:"is-alternative-sub"},{title:"UL Checklist",selector:"ul",classes:"s-checklist"},{title:"Intro",block:"p",classes:"is-intro"}],convert_urls:!1,setup:function(e){e.on("change",function(n){!function(e,t){e.save();let n=createNewEvent("change");dispatchEventForElement(t,n)}(e,t)})}})})},!1),i.startObserving(),new PreventNavigationController(document.querySelector(".entity-attributes"))}),function(e){e(".entities-list-item .dropdown-icon").click(function(t){t.preventDefault(),e(this).parent().parent().hasClass("open")?e(this).parent().parent().removeClass("open"):e(this).parent().parent().addClass("open")});var t=!0;e(window).load(function(){e("#entity-form .lock").hasClass("open")&&(t=!1,e("#entity-form").find("input, textarea").attr("disabled",t));var n=e("#entities .entities-list"),o=e(".entities-list-item.active",n).first();if(0!=o.length){var l=o.position().top;n.scrollTop(l),e(".site-brand-name input").attr("placeholder",e("#global_name").val())}}),e("#global_name").change(function(){e(".site-brand-name input").attr("placeholder",e(this).val())}),e(".error-accordion .collapsible-ul").hide(),e(".error-accordion h3").click(function(){e(this).parent().find(".collapsible-ul").toggle()}),e("#selectYearAndMonthForm select").change(function(){var t="/kms/orders/voltooid?month="+e("#selectYearAndMonthForm select#orderMonthSelector").val()+"&year="+e("#selectYearAndMonthForm select#orderYearSelector").val();window.location=t}),e("#productCategorySelector").change(function(){window.location="/kms/products?category="+encodeURIComponent(this.value)});var n=function(){e("#flash-message").fadeOut()};e("#flash-message").click(function(){n()}),setTimeout(function(){n()},5e3),e("#entity-form .lock").click(function(){e(this).toggleClass("open"),t=!t,e(this).parents("#entity-form").find("input, textarea").attr("disabled",t)});var o=jQuery("#sort_order"),l=(jQuery("#autoSubmit"),jQuery("#message-box"),jQuery(".fieldGroupItems"));l.children("li").each(function(){var e=jQuery(this);e.data("id",e.attr("title")).attr("title","")}),l.sortable({opacity:.7,update:function(){}}),jQuery("#dd-form").bind("submit",function(e){var t,n;e&&e.preventDefault(),t=!0,n=[],l.children("li").each(function(){n.push(jQuery(this).data("id"))}),o.val(n.join(",")),t&&request()})}(jQuery),document.addEventListener("DOMContentLoaded",function(){let e=document.querySelector("#sidebar .navigation li.active");e&&function e(t){let n=t.parentElement?t.parentElement:t.parentNode;n.classList.contains("has-sub-items")&&"LI"===n.tagName&&(n.classList.add("active"),e(n))}(e);let t=document.querySelectorAll("#sidebar .navigation .has-sub-items"),n=t.length;for(let e=0;e<n;e++){t[e].addEventListener("click",function(){this.classList.toggle("active")})}});