1require(['domReady!'], function() { 2 const rsvpForm = Array.from(document.querySelectorAll('#rsvp-container')); 3 const rfpForm = Array.from(document.querySelectorAll("#rfpForm")); 4 const submitEventForm = Array.from(document.querySelectorAll('#sv_submit_event_form')); 5 const simpleForm = Array.from(document.querySelectorAll('form.simpleForm')); 6 const calendar = Array.from(document.querySelectorAll('.lookup-calHolder')); 7 8 if (location.search.indexOf('action=popupCal') > -1 && calendar.length) { 9 /* This code is excuted when you're in the submit event for calendar popup. 10 We need to hid everything but the calendar itself. */ 11 calendar.forEach((cal) => { 12 let parent = cal.parentElement; 13 let parents = []; 14 15 while (parent) { 16 parents.push(parent); 17 parent = parent.parentElement; 18 } 19 20 cal.classList.add('core-styles'); 21 parents.forEach((p) => { 22 p.style.display = 'block'; 23 p.classList.add('crm-calendar-parent'); 24 }); 25 }); 26 } else if (rfpForm.length) { 27 rfpForm.forEach((form) => { 28 Array.from(form.querySelectorAll('.ui-datepicker-trigger')).forEach((el) => { 29 const parent = el.parentElement; 30 const parentHtml = parent.innerHTML; 31 32 parent.innerHTML = `<span class="cal-wrapper">${parentHtml}</span>`; 33 }); 34 }); 35 } else if (simpleForm.length) { 36 simpleForm.forEach((form) => { 37 const captcha = Array.from(form.querySelectorAll('.captcha')); 38 const textEls = Array.from(form.querySelectorAll('h3, p')); 39 const sideColHtml = '<div class="medium-3 columns"></div>'; 40 41 captcha.forEach((c) => c.parentElement.insertAdjacentHTML('afterbegin', sideColHtml)); 42 textEls.forEach((el) => { 43 const html = el.outerHTML; 44 45 el.outerHTML = 46 `<div class="row"> 47 ${sideColHtml} 48 <div class="medium-9 columns"> 49 ${html} 50 </div> 51 </div>`; 52 }); 53 }); 54 } else if (rsvpForm.length) { 55 let labels = []; 56 57 rsvpForm.forEach((form) => { 58 Array.from(form.querySelectorAll('.eventList_headerRow .eventListCell')).forEac
58h((el) => labels.push(el.innerHTML)); 59 Array.from(form.querySelectorAll('.eventListRow .eventListCell')).forEach((el, index) => { 60 if (labels[index].toLowerCase() !== 'details') el.setAttribute('data-title', labels[index]); 61 }); 62 }); 63 } else if (submitEventForm.length) { 64 submitEventForm.forEach((form) => { 65 Array.from(form.querySelectorAll('p, span, input, li')).forEach((el) => { 66 if (el.hasAttribute('style') && el.getAttribute('type') !== 'file') el.removeAttribute('style'); 67 }); 68 }); 69 } 70});
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.