PageSourceSearch

https://archeonavale.org/wp-content/cache/wpo-minify/1790781662/as…ooter-oum_frontend_ajax_js1790243441.min.js

js archeonavale.org collected 2026-10-02 10:03:52 UTC 4,614 bytes, 11 lines download raw bytes

1
2jQuery('#oum_add_location').submit(function(event){jQuery('#oum_submit_btn').addClass('oum-loading');event.preventDefault();if(window.oumMap2&&typeof window.oumMap2.getZoom==='function'){const zoomField=document.getElementById('oum_location_zoom');if(zoomField){zoomField.value=window.oumMap2.getZoom()}}
3if(typeof OUMFormMap!=='undefined'&&typeof OUMFormMap.syncGeometryFields==='function'){OUMFormMap.syncGeometryFields()}
4let formData=new FormData(this);const openingHoursInputs=document.querySelectorAll('.oum-opening-hours-input');openingHoursInputs.forEach(function(input){const fieldName=input.name;const fieldIndexMatch=fieldName.match(/\[(\d+)\]/);if(!fieldIndexMatch){return}
5const fieldIndex=fieldIndexMatch[1];const hoursValue=input.value.trim();formData.delete(fieldName);if(hoursValue!==''){if(typeof OUMOpeningHours!=='undefined'&&OUMOpeningHours.validateFormat(hoursValue)){formData.append(`oum_location_custom_fields[${fieldIndex}][hours]`,hoursValue)}else{oumShowError([{message:(typeof oum_opening_hours!=='undefined'&&oum_opening_hours.invalid_format)?oum_opening_hours.invalid_format:'Invalid opening hours format. Expected format: Mo 09:00-18:00 or Mo 9:00 AM-5:00 PM'}]);jQuery('#oum_submit_btn').removeClass('oum-loading');return!1}}});const previewContainer=document.getElementById('oum_location_images_preview');let imageOrder=[];if(previewContainer){const previewItems=previewContainer.querySelectorAll('.image-preview-item');previewItems.forEach((item,index)=>{if(item.classList.contains('existing-image')){const existingImageInput=item.querySelector('[name="existing_images[]"]');if(!existingImageInput){return}
6let imgUrl=existingImageInput.value;if(imgUrl.startsWith('http')){try{const urlObj=new URL(imgUrl);imgUrl=urlObj.pathname}catch(e){console.log('Could not parse URL:',imgUrl)}}
7formData.append('existing_images[]',imgUrl);imageOrder.push('existing:'+imgUrl)}else{const fileName=item.dataset.fileName;const file=window.oumSelectedFiles.find(f=>f.name===fileName);if(file){formData.append('oum_location_images[]',file);imageOrder.push('new:'+fileName)}}});formData.append('image_order',JSON.stringify(imageOrder))}
8formData.append('action','oum_add_location_from_frontend');jQuery.ajax({type:'POST',url:oum_ajax.ajaxurl,cache:!1,contentType:!1,processData:!1,data:formData,success:function(response,textStatus,XMLHttpRequest){jQuery('#oum_submit_btn').removeClass('oum-loading');if(response.success==!1){oumShowError(response.data)}
9if(response.success==!0){jQuery('#oum_add_location').trigger('reset');const deleteLocationInput=document.getElementById('oum_delete_location');const postIdInput=document.getElementById('oum_post_id');if(deleteLocationInput&&deleteLocationInput.value==='true'){OUMFormController.showFormMessage('success',oum_custom_strings.location_deleted,oum_custom_strings.delete_success,oum_custom_strings.close_and_refresh,function(){window.location.reload()})}else if(postIdInput&&postIdInput.value){OUMFormController.showFormMessage('success',oum_custom_strings.changes_saved,oum_custom_strings.changes_saved_message,oum_custom_strings.close_and_refresh,function(){window.location.reload()})}else{if(typeof oum_action_after_submit!=='undefined'){if(oum_action_after_submit==='refresh'){window.location.reload()}else if(oum_action_after_submit==='redirect'&&typeof thankyou_redirect!=='undefined'&&thankyou_redirect!==''){window.location.href=thankyou_redirect}else{const thankyouDiv=document.getElementById('oum_add_location_thankyou');const thankyouHeadline=thankyouDiv?.querySelector('h3')?.textContent||oum_custom_strings.thank_you;const thankyouText=thankyouDiv?.querySelector('.oum-add-location-thankyou-text')?.textContent||oum_custom_strings.thank_you_message;OUMFormController.showFormMessage('success',thankyouHeadline,thankyouText,oum_custom_strings.close_and_refresh,function(){window.location.reload()})}}else{const thankyouDiv=document.getElementById('oum_add_location_thankyou');const thankyouHeadline=thankyouDiv?.querySelector('h3')?.textContent||oum_custom_strings.thank_you;const thankyouText=thankyouDiv?.querySelector('.oum-add-location-thankyou-text')?.textContent||oum_custom_strings.thank_you_message;OUMFormController.showFormMessage('success',thankyouHeadline,thankyouText,oum_custom_strings.close_and_refresh,function(){window.location.reload()})}}}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log(errorThrown)}})});function oumShowError(errors){const errorWrapEl=jQuery('#oum_add_location_error');errorWrapEl.html('');
9errors.forEach(error=>{errorWrapEl.append(error.message+'<br>')});errorWrapEl.show()};
10
11

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.