JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbrfunction checkcount(type) { if (type == "hide") { var count = document.querySelectorAll('.inputFormRow').length; if (count == 3) { $('.hideelement').hide(); } } else { var count = document.querySelectorAll('.inputFormRow').length; if (count <= 3) { $('.hideelement').show(); } } } var image_count = 0; var testimonial_image_count = 0; var testimonial_rating_count = 0; var radio_count = 1; function repeaterInput(element, element_type, rowno, divid, path, theme_type, color, assets) { // alert(color); var html = ''; var preview_html = ''; var social_preview_html = ''; if (element_type == "contact") { html = `
`; if(element == "Address"){ html += `
`; } else { html += `
`; } html += `
`; if (theme_type == 'theme1' || theme_type == 'theme8') { preview_html = `
  • `; } if (theme_type == 'theme2') { /*preview_html = `
  • `;*/ preview_html = ``; } if (theme_type == 'theme3') { preview_html = `
  • `; } if (theme_type == 'theme4') { preview_html = ``; } if ( theme_type == 'theme5') { preview_html = `
  • `; } if (theme_type == 'theme6') { preview_html = `
  • ${element}

  • `; } if (theme_type == 'theme7') { preview_html = `
  • ${element}

  • `; } if (theme_type == 'theme8') { preview_html = `
  • `; if(element = 'Web_url'){ preview_html += `Web Url
  • `; } else{ preview_html += `${element} `; } } if (theme_type == 'theme9') { preview_html = `
  • ${element}

  • `; } // if (theme_type == 'theme10') { // preview_html = `
    //
    // //
    //
    `; // $(".inputrow_socials_preview").append(preview_html); // } if (theme_type == 'theme10') { preview_html = `
  • ${element}
    `; } rowno++; $("#fieldModal").modal('hide'); } if (element_type == "appointment") { var class_radio = ''; if(radio_count % 2 == 0){ class_radio = 'radio-left'; } html = `
    `; preview_html = `
    `; if (theme_type == 'theme4') { // preview_html = ``; preview_html = `00:00 - 00:00`; } if (theme_type == 'theme5' || theme_type == 'theme7' || theme_type == 'theme8' || theme_type == 'theme9') { preview_html = `
  • 00:00 - 00:00
  • `; } radio_count++; rowno++; } if (element_type == "service") { html = `
    Image placeholder
    `; var sclass = ''; preview_html = `
    `; var desc = `

    ` if (theme_type == 'theme5' || theme_type == 'theme9' || theme_type == 'theme10') { preview_html = `
    `; desc = ''; } else if (theme_type == 'theme6' || theme_type == 'theme7') { preview_html = `
    `; } if (theme_type == 'theme7') { sclass = ' card-contact-shadow mt-2'; } preview_html += `
    image

    ${desc}

    `; if(theme_type == 'theme1' || theme_type == 'theme3'){ preview_html = `
    image
    ${desc}
    `; } if(theme_type == 'theme4' || theme_type == 'theme5'){ desc = `

    `; } if(theme_type == 'theme4'|| theme_type == 'theme5' ){ preview_html = `
    image
    ${desc}
    `; } if(theme_type == 'theme2'){ preview_html = `
    image
    ${desc}
    `; } image_count++; rowno++; } if (element_type == "testimonial") { html = `
    Image placeholder
    0/5
    `; preview_html = `
    user

    0/5

    `; if(theme_type == 'theme1' || theme_type == 'theme3' ||theme_type == 'theme5'){ preview_html = `
    image
    0/5

    `; } if(theme_type == 'theme2' ||theme_type == 'theme4'){ preview_html = `
    image
    0/5

    `; } testimonial_rating_count++; testimonial_image_count++; rowno++; } if (element_type == "social_links") { html = `

    `; if (theme_type == 'theme1') { preview_html = ``; social_preview_html = ` `; $(".inputrow_socials_preview").append(preview_html); } if (theme_type == 'theme2') { /*preview_html = ``;*/ preview_html = ``; social_preview_html = ` `; $(".inputrow_socials_preview").append(social_preview_html); } if (theme_type == 'theme3') { preview_html = ``; $(".inputrow_socials_preview").append(preview_html); } if (theme_type == 'theme4') { preview_html = ``; social_preview_html = ` `; $(".inputrow_socials_preview").append(preview_html); } if (theme_type == 'theme5') { // preview_html = `
    // //
    `; preview_html = `
  • `; $(".inputrow_socials_preview").append(preview_html); } if (theme_type == 'theme6') { preview_html = ``; $(".inputrow_socials_preview").append(preview_html); } if (theme_type == 'theme7') { preview_html = ``; $(".inputrow_socials_preview").append(preview_html); } if (theme_type == 'theme8') { preview_html = `
  • ${element}
    ${element}
  • `; $(".inputrow_socials_preview").append(preview_html); } if (theme_type == 'theme9') { preview_html = ``; $(".inputrow_socials_preview").append(preview_html); } if (theme_type == 'theme10') { preview_html = ``; $(".inputrow_socials_preview").append(preview_html); } rowno++; $("#socialsModal").modal('hide'); } $(`#${divid}`).append(html); console.log(preview_html); $(`#${divid}_preview`).append(preview_html); if (element_type == "contact") { checkcount('hide'); } $("input").keyup(function() { var id = $(this).attr('id'); //console.log(id); var preview = $(`#${id}`).val(); $(`#${id}_preview`).text(preview); }); $("textarea").keyup(function() { var id = $(this).attr('id'); //console.log(id); var preview = $(`#${id}`).val(); $(`#${id}_preview`).text(preview); }); $(".social_href").keyup(function() { var id = $(this).attr('id'); //console.log(id); var preview = $(`#${id}`).val(); var h_preview = validURL(preview); //console.log(h_preview); if (h_preview == true) { $(`#${id}_error_href`).text(""); $(`.${id}_href_preview`).attr("href", preview); } else { $(`#${id}_error_href`).text("Please enter valid link"); $(`#${id}_href_preview`).attr("href", "#"); } //var h_preview = `{{ url("") }}/${preview}`; }); $( ".textboxhover" ).mouseover(function() { $( this ).removeClass( "border-0" ); }).mouseout(function() { $( this ).addClass("border-0"); }); return rowno; } /*$(document).on('click', '#removeRow', function () { if($(this).data('id') == "testimonials"){ $(this).closest('#inputFormRow3').remove(); } if($(this).data('id') == "socials"){ $(this).closest('#inputFormRow4').remove(); } });*/ function validURL(str) { var pattern = new RegExp('^(https?:\\/\\/)?' + // protocol '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name '((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path '(\\?[;&a-z\\d%_.~+=-]*)?' + // query string '(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator return !!pattern.test(str); } $(document).on('click', '#removeRow_contact', function() { var this_id = $(this).data('id'); $(`#${this_id}`).remove(); $(this).closest('#inputFormRow').remove(); checkcount('show'); }); $(document).on('click', '#removeRow_appointment', function() { var this_id = $(this).data('id'); $(`#${this_id}`).remove(); $(this).closest('#inputFormRow1').remove(); }); $(document).on('click', '#removeRow_services', function() { var this_id = $(this).data('id'); $(`#${this_id}`).remove(); $(this).closest('#inputFormRow2').remove(); }); $(document).on('click', '#removeRow_testimonials', function() { var this_id = $(this).data('id'); $(`#${this_id}`).remove(); $(this).closest('#inputFormRow3').remove(); }); $(document).on('click', '#removeRow_socials', function() { var this_id = $(this).data('id'); $(`.${this_id}`).remove(); $(this).closest('#inputFormRow4').remove(); }); $(".input-text-location").each(function () { var textarea = $(this); var text = textarea.text(); var div = $('
    '); div.css({ "width":"530px" }); div.text(text); $('body').append(div); var divHeight = $('#temp').height(); div.remove(); divHeight += 32; this.setAttribute("style", "height:" + divHeight + "px;overflow-y:hidden;"); }).on("input", function () { this.style.height = "auto"; this.style.height = (this.scrollHeight) + "px"; });