`
if (theme_type == 'theme16' || theme_type == 'theme20' || theme_type == 'theme21') {
preview_html = `
`;
desc = '';
} else if (theme_type == 'theme17' || theme_type == 'theme18') {
preview_html = `
`;
}
if (theme_type == 'theme18') {
sclass = ' card-contact-shadow mt-2';
}
preview_html += `
`;
if(theme_type == 'theme12' || theme_type == 'theme14'||theme_type == 'theme18'){
preview_html = `
`;
}
if(theme_type == 'theme15' || theme_type == 'theme16' || theme_type == 'theme17'|| theme_type == 'theme20'|| theme_type == 'theme21'){
desc = `
`;
}
if(theme_type == 'theme15'|| theme_type == 'theme16'||theme_type == 'theme17' ||theme_type == 'theme20'||theme_type == 'theme21'){
preview_html = `
`;
}
if(theme_type == 'theme13'){
preview_html = `
`;
}
if(theme_type == 'theme19'){
preview_html = `
`;
}
if(theme_type == 'theme1'||theme_type == 'theme2'||theme_type == 'theme3'||theme_type == 'theme5'||theme_type == 'theme6'||theme_type == 'theme4'||theme_type == 'theme7'||theme_type == 'theme10'){
preview_html = `
`;
}
if(theme_type == 'theme8' ||theme_type == 'theme9' ||theme_type == 'theme11'){
preview_html = `
`;
}
pr_image_count++;
rowno++;
}
if (element_type == "testimonial") {
if(chatgpt=="on")
{
html = `
`;
}else
{
html = `
`;
}
preview_html = `
`;
if(theme_type == 'theme12' || theme_type == 'theme14' ||theme_type == 'theme16' ||theme_type == 'theme17'||theme_type == 'theme21'){
preview_html = `
`;
}
if(theme_type == 'theme13' ||theme_type == 'theme15'||theme_type == 'theme19'||theme_type == 'theme18'||theme_type == 'theme20'){
preview_html = `
`;
}
if(theme_type == 'theme1'|| theme_type == 'theme2'||theme_type == 'theme3'||theme_type == 'theme4'||theme_type == 'theme5'||theme_type == 'theme6'||theme_type == 'theme7'||theme_type == 'theme8'||theme_type == 'theme9'||theme_type == 'theme10'||theme_type == 'theme11'){
preview_html = `
`;
}
testimonial_rating_count++;
testimonial_image_count++;
rowno++;
}
if (element_type == "social_links") {
html = `
`;
if (theme_type == 'theme12') {
preview_html = `
`;
social_preview_html = `
`;
$(".inputrow_socials_preview").append(preview_html);
}
if (theme_type == 'theme13') {
preview_html = `
`;
social_preview_html = `
`;
$(".inputrow_socials_preview").append(social_preview_html);
}
if (theme_type == 'theme14') {
preview_html = `
`;
$(".inputrow_socials_preview").append(preview_html);
}
if (theme_type == 'theme15') {
preview_html = `
`;
social_preview_html = `
`;
$(".inputrow_socials_preview").append(preview_html);
}
if (theme_type == 'theme16')
{
preview_html = `
`;
$(".inputrow_socials_preview").append(preview_html);
}
if (theme_type == 'theme17') {
preview_html = `
`;
$(".inputrow_socials_preview").append(preview_html);
}
if (theme_type == 'theme18') {
preview_html = `
`;
$(".inputrow_socials_preview").append(preview_html);
}
if (theme_type == 'theme19') {
preview_html = `
`;
$(".inputrow_socials_preview").append(preview_html);
}
if (theme_type == 'theme20')
{
preview_html = `
`;
$(".inputrow_socials_preview").append(preview_html);
}
if (theme_type == 'theme21') {
preview_html = `
`;
$(".inputrow_socials_preview").append(preview_html);
}
if (theme_type == 'theme1'||theme_type == 'theme2'||theme_type == 'theme3'||theme_type == 'theme4'||theme_type == 'theme5'||theme_type == 'theme6'||theme_type == 'theme7'||theme_type == 'theme8'||theme_type == 'theme9'||theme_type == 'theme10'||theme_type == 'theme11') {
preview_html = `
`;
$(".inputrow_socials_preview").append(preview_html);
}
rowno++;
$("#socialsModal").modal('hide');
}
$(`#${divid}`).append(html);
$(`#${divid}_preview`).append(preview_html);
if (element_type == "contact") {
checkcount('hide');
}
$("input").keyup(function() {
var id = $(this).attr('id');
var preview = $(`#${id}`).val();
$(`#${id}_preview`).text(preview);
});
$("textarea").keyup(function() {
var id = $(this).attr('id');
var preview = $(`#${id}`).val();
$(`#${id}_preview`).text(preview);
});
$(".social_href").keyup(function() {
var id = $(this).attr('id');
var preview = $(`#${id}`).val();
var text = $(this).attr('name');
var subtext = "Whatsapp";
var isIncluded = text.includes(subtext);
var h_preview = validURL(preview);
if (h_preview == true) {
$(`#${id}_error_href`).text("");
$(`.${id}_href_preview`).attr("href", preview);
} else {
if(isIncluded==false)
{
$(`#${id}_error_href`).text("Please enter valid link");
$(`#${id}_href_preview`).attr("href", "#");
}
}
});
$( ".textboxhover" ).mouseover(function() {
$( this ).removeClass( "border-0" );
}).mouseout(function() {
$( this ).addClass("border-0");
});
return rowno;
}
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_product', function() {
var this_id = $(this).data('id');
$(`#${this_id}`).remove();
$(this).closest('#inputFormRow6').remove();
});
$(document).on('click', '#removeRow_testimonials', function() {
var this_id = $(this).data('id');
$(".testimonial-slider").slick('destroy');
$(`#${this_id}`).remove();
$(this).closest('#inputFormRow3').remove();
if ($('.testimonial-slider').length > 0) {
$('.testimonial-slider').slick({
autoplay: false,
slidesToShow: 2,
speed: 1000,
slidesToScroll: 1,
//rtl: true,
// prevArrow: '
',
// nextArrow: '
',
dots: false,
arrows: false,
buttons: false,
responsive: [
{
breakpoint: 420,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
}
}
]
});
}
});
$(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";
});
function getCurrency() {
// Here, you can make an AJAX request or fetch data from an API
// For this example, we'll use a hardcoded array as a placeholder
return [
{ code: 'INR', name: 'Indian', symbol: '₹' },
{ code: 'AFN', name: 'Afghani', symbol: '؋' },
{ code: 'ANG', name: 'Netherlands Antillian Guilder', symbol: 'f' },
{ code: 'AUD', name: 'Australian Dollar', symbol: '$' },
{ code: 'AWG', name: 'Aruban Guilder', symbol: '$' },
{code : 'AZN', name: 'Azerbaijanian Manat', symbol: 'ман'},
{code : 'BAM', name: 'Convertible Marks', symbol: 'KM'},
{code : 'BBD', name: 'Barbados Dollar', symbol: '$'},
{code : 'BGN', name: 'Bulgarian Lev', symbol: 'лв'},
{code : 'BMD', name: 'Bermudian Dollar', symbol: '$'},
{code: 'BND', name: 'Brunei Dollar', symbol: '$'},
{code: 'BOB', name: 'BOV Boliviano Mvdol', symbol: '$b'},
{code: 'BRL', name: 'Brazilian Real', symbol: 'R$'},
{code: 'BSD', name: 'Bahamian Dollar', symbol: '$'},
{code: 'BWP', name: 'Pula', symbol: 'P'},
{code: 'BYR', name: 'Belarussian Ruble', symbol: 'p.'},
{code: 'BZD', name: 'Belize Dollar', symbol: 'BZ$'},
{code: 'CAD', name: 'Canadian Dollar', symbol: '$'},
{code: 'CHF', name: 'Swiss Franc', symbol: 'CHF'},
{code: 'CLP', name: 'CLF Chilean Peso Unidades de fomento', symbol: '$'},
{code: 'CNY', name: 'Yuan Renminbi', symbol: '¥'},
{code: 'COP', name: 'COU Colombian Peso Unidad de Valor Real', symbol: '$'},
{code: 'CRC', name: 'Costa Rican Colon', symbol: '₡'},
{code: 'CUP', name: 'CUC Cuban Peso Peso Convertible', symbol: '₱'},
{code: 'CZK', name: 'Czech Koruna', symbol: 'Kč'},
{code: 'DKK', name: 'Danish Krone', symbol: 'kr'},
{code: 'DOP', name: 'Dominican Peso', symbol: 'RD$'},
{code: 'EGP', name: 'Egyptian Pound', symbol: '£'},
{code: 'EUR', name: 'Euro', symbol: '€'},
{code:'FJD', name: 'Fiji Dollar', symbol: '$'},
{code:'FKP', name: 'Falkland Islands Pound', symbol: '£'},
{code:'GBP', name: 'Pound Sterling', symbol: '£'},
{code:'GIP', name: 'Gibraltar Pound', symbol: '£'},
{code:'GTQ', name: 'Quetzal', symbol: 'Q'},
{code:'GYD', name: 'Guyana Dollar', symbol: '$'},
{code:'HKD', name: 'Hong Kong Dollar', symbol: '$'},
{code:'HNL', name: 'Lempira', symbol: 'L'},
{code:'HRK', name: 'Croatian Kuna', symbol: 'kn'},
{code:'HUF', name: 'Forint', symbol: 'Ft'},
{code:'IDR', name: 'Rupiah', symbol: 'Rp'},
{code:'ILS', name: 'New Israeli Sheqel', symbol: '₪'},
{code:'IRR', name: 'Iranian Rial', symbol: '﷼'},
{code:'ISK', name: 'Iceland Krona', symbol: 'kr'},
{code:'JMD', name: 'Jamaican Dollar', symbol: 'J$'},
{code:'JPY', name: 'Yen', symbol: '¥'},
{code:'KGS', name: 'Som', symbol: 'лв'},
{code:'KHR', name: 'Riel', symbol: '៛'},
{code:'KPW', name: 'North Korean Won', symbol: '₩'},
{code:'KRW', name: 'Won', symbol: '₩'},
{code:'KYD', name: 'Cayman Islands Dollar', symbol: '$'},
{code:'KZT', name: 'Tenge', symbol: 'лв'},
{code:'LAK', name: 'Kip', symbol: '₭'},
{code:'LBP', name :'Lebanese Pound', symbol: '£'},
{code:'LKR', name :'Sri Lanka Rupee', symbol: '₨'},
{code:'LRD', name :'Liberian Dollar', symbol: '$'},
{code:'LTL', name :'Lithuanian Litas', symbol: 'Lt'},
{code:'LVL', name :'Latvian Lats', symbol: 'Ls'},
{code:'MKD', name :'Denar', symbol: 'ден'},
{code:'MNT', name :'Tugrik', symbol: '₮'},
{code:'MUR', name :'Mauritius Rupee', symbol: '₨'},
{code:'MXN', name :'MXV Mexican Peso Mexican Unidad de Inversion (UDI)', symbol: '$'},
{code:'MYR', name :'Malaysian Ringgit', symbol: 'RM'},
{code:'MZN', name :'Metical', symbol: 'MT'},
{code:'NGN', name :'Naira', symbol: '₦'},
{code:'NIO', name :'Cordoba Oro', symbol: 'C$'},
{code:'NOK', name :'Norwegian Krone', symbol: 'kr'},
{code:'NPR', name :'Nepalese Rupee', symbol: '₨'},
{code:'NZD', name :'New Zealand Dollar', symbol: '$'},
{code:'OMR', name :'Rial Omani', symbol: '﷼'},
{code:'PAB', name :'USD Balboa US Dollar', symbol: 'B/.'},
{code:'PEN', name :'Nuevo Sol', symbol: 'S/.'},
{code:'PHP', name :'Philippine Peso', symbol: 'Php'},
{code:'PKR', name :'Pakistan Rupee', symbol: '₨'},
{code:'PLN', name :'Zloty', symbol: 'zł'},
{code:'PYG', name :'Guarani', symbol: 'Gs'},
{code:'QAR', name :'Qatari Rial', symbol: '﷼'},
{code:'RON', name :'New Leu', symbol: 'lei'},
{code:'RSD', name :'Serbian Dinar', symbol: 'Дин.'},
{code:'RUB', name :'Russian Ruble', symbol: 'руб'},
{code:'SAR', name :'Saudi Riyal', symbol: '﷼'},
{code:'SBD', name :'Solomon Islands Dollar', symbol: '$'},
{code: 'SCR', name :'Seychelles Rupee', symbol: '₨'},
{code: 'SEK', name :'Swedish Krona', symbol: 'kr'},
{code: 'SGD', name :'Singapore Dollar', symbol: '$'},
{code: 'SHP', name :'Saint Helena Pound', symbol: '£'},
{code: 'SOS', name :'Somali Shilling', symbol: 'S'},
{code: 'SRD', name :'Surinam Dollar', symbol: '$'},
{code: 'SVC', name :'USD El Salvador Colon US Dollar', symbol: '$'},
{code: 'SYP', name :'Syrian Pound', symbol: '£'},
{code: 'THB', name :'Baht', symbol: '฿'},
{code: 'TRY', name :'Turkish Lira', symbol: 'TL'},
{code: 'TTD', name :'Trinidad and Tobago Dollar', symbol: 'TT$'},
{code: 'TWD', name :'New Taiwan Dollar', symbol: 'NT$'},
{code: 'UAH', name :'Hryvnia', symbol: '₴'},
{code: 'USD', name :'United States Dollar', symbol: '$'},
{code: 'UYU', name :'UYI Peso Uruguayo Uruguay Peso en Unidades Indexadas', symbol: '$U'},
{code: 'UZS', name :'Uzbekistan Sum', symbol: 'лв'},
{code: 'VEF', name :'Bolivar Fuerte', symbol: 'Bs'},
{code: 'VND', name :'Dong', symbol: '₫'},
{code: 'XCD', name :'East Caribbean Dollar', symbol: '$'},
{code: 'YER', name :'Yemeni Rial', symbol: '﷼'},
{code: 'ZAR', name :'Rand', symbol: 'R'},
// Add more currency options as needed
];
}