2020-12-14 07:10:30 -05:00
|
|
|
(function ($) {
|
2020-12-13 07:25:42 -05:00
|
|
|
"use strict";
|
|
|
|
$(window).load(function () {
|
2020-12-14 07:10:30 -05:00
|
|
|
$('.mp_tab_menu').each(function () {
|
|
|
|
$(this).find('ul li:first-child').trigger('click');
|
|
|
|
});
|
2020-12-13 07:25:42 -05:00
|
|
|
if ($('[name="mep_org_address"]').val() > 0) {
|
|
|
|
$('.mp_event_address').slideUp(250);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
$(document).on('click', '[data-target-tabs]', function () {
|
|
|
|
if (!$(this).hasClass('active')) {
|
|
|
|
let tabsTarget = $(this).attr('data-target-tabs');
|
2020-12-14 07:10:30 -05:00
|
|
|
let targetParent = $(this).closest('.mp_event_tab_area').find('.mp_tab_details').first();
|
|
|
|
targetParent.children('.mp_tab_item:visible').slideUp('fast');
|
|
|
|
targetParent.children('.mp_tab_item[data-tab-item="' + tabsTarget + '"]').slideDown(250);
|
|
|
|
$(this).siblings('li.active').removeClass('active');
|
2020-12-13 07:25:42 -05:00
|
|
|
$(this).addClass('active');
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
});
|
2022-08-23 02:57:23 -04:00
|
|
|
|
|
|
|
|
2020-12-13 07:25:42 -05:00
|
|
|
$(document).on('click', 'label.mp_event_virtual_type_des_switch input', function () {
|
|
|
|
if ($(this).is(":checked")) {
|
|
|
|
$(this).parents('label.mp_event_virtual_type_des_switch').siblings('label.mp_event_virtual_type_des').slideDown(200);
|
2022-08-23 02:57:23 -04:00
|
|
|
$(".mep_event_tab_location_content").hide(200);
|
2020-12-13 07:25:42 -05:00
|
|
|
} else {
|
|
|
|
$(this).parents('label.mp_event_virtual_type_des_switch').siblings('label.mp_event_virtual_type_des').val('').slideUp(200);
|
2022-08-23 02:57:23 -04:00
|
|
|
$(".mep_event_tab_location_content").show(200);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2022-09-08 03:05:12 -04:00
|
|
|
|
|
|
|
|
2022-08-23 02:57:23 -04:00
|
|
|
$(document).on('click', 'label.mp_event_ticket_type_des_switch input', function () {
|
|
|
|
if ($(this).is(":checked")) {
|
|
|
|
// $(this).parents('label.mp_event_ticket_type_des_switch').siblings('label.mep_ticket_type_setting_sec').slideDown(200);
|
2022-08-23 04:02:35 -04:00
|
|
|
$(".mep_ticket_type_setting_sec").slideDown(200);
|
2022-08-23 02:57:23 -04:00
|
|
|
} else {
|
|
|
|
// $(this).parents('label.mp_event_ticket_type_des_switch').siblings('label.mep_ticket_type_setting_sec').val('').slideUp(200);
|
2022-08-23 04:02:35 -04:00
|
|
|
$(".mep_ticket_type_setting_sec").slideUp(200);
|
2020-12-13 07:25:42 -05:00
|
|
|
}
|
|
|
|
});
|
2022-08-23 02:57:23 -04:00
|
|
|
|
2022-09-08 03:05:12 -04:00
|
|
|
$(document).on('click', 'label.mep_enable_custom_dt_format input', function () {
|
|
|
|
if ($(this).is(":checked")) {
|
|
|
|
// $(this).parents('label.mp_event_ticket_type_des_switch').siblings('label.mep_ticket_type_setting_sec').slideDown(200);
|
|
|
|
$(".mep_custom_timezone_setting").slideDown(200);
|
|
|
|
} else {
|
|
|
|
// $(this).parents('label.mp_event_ticket_type_des_switch').siblings('label.mep_ticket_type_setting_sec').val('').slideUp(200);
|
|
|
|
$(".mep_custom_timezone_setting").slideUp(200);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2022-10-31 22:09:15 -04:00
|
|
|
$(document).on('click', 'label.mp_event_ticket_type_advance_col_switch input', function () {
|
|
|
|
if ($(this).is(":checked")) {
|
|
|
|
// $(this).parents('label.mp_event_ticket_type_des_switch').siblings('label.mep_ticket_type_setting_sec').slideDown(200);
|
|
|
|
$(".mep_hide_on_load").slideDown(200);
|
|
|
|
} else {
|
|
|
|
// $(this).parents('label.mp_event_ticket_type_des_switch').siblings('label.mep_ticket_type_setting_sec').val('').slideUp(200);
|
|
|
|
$(".mep_hide_on_load").slideUp(200);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2022-08-23 02:57:23 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-17 05:11:50 -05:00
|
|
|
$(document).ready(function () {
|
|
|
|
$('#add-row-t').on('click', function () {
|
|
|
|
var row = $('.empty-row-t.screen-reader-text').clone(true);
|
|
|
|
row.removeClass('empty-row-t screen-reader-text');
|
|
|
|
row.insertBefore('#repeatable-fieldset-one-t tbody>tr:last');
|
|
|
|
$('#mep_ticket_type_empty option[value=inputbox]').attr('selected', 'selected');
|
|
|
|
$('.empty-row-t #mep_ticket_type_empty option[value=inputbox]').removeAttr('selected');
|
2022-08-04 00:45:25 -04:00
|
|
|
//return false;
|
2020-12-17 05:11:50 -05:00
|
|
|
});
|
2020-12-13 07:25:42 -05:00
|
|
|
|
2020-12-17 05:11:50 -05:00
|
|
|
$('.remove-row-t').on('click', function () {
|
|
|
|
if (confirm('Are You Sure , Remove this row ? \n\n 1. Ok : To Remove . \n 2. Cancel : To Cancel .')) {
|
|
|
|
$(this).parents('tr').remove();
|
|
|
|
$('#mep_ticket_type_empty option[value=inputbox]').removeAttr('selected');
|
|
|
|
$('#mep_ticket_type_empty option[value=dropdown]').removeAttr('selected');
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
$(document).find('.mp_event_type_sortable').sortable({
|
|
|
|
handle: $(this).find('.mp_event_type_sortable_button')
|
|
|
|
});
|
2020-12-13 07:25:42 -05:00
|
|
|
|
|
|
|
|
2020-12-17 05:11:50 -05:00
|
|
|
$('#add-row').on('click', function () {
|
|
|
|
var row = $('.empty-row.screen-reader-text').clone(true);
|
|
|
|
row.removeClass('empty-row screen-reader-text');
|
|
|
|
row.insertBefore('#repeatable-fieldset-one tbody>tr:last');
|
2020-12-13 07:25:42 -05:00
|
|
|
return false;
|
2020-12-17 05:11:50 -05:00
|
|
|
});
|
2020-12-13 07:25:42 -05:00
|
|
|
|
2020-12-17 05:11:50 -05:00
|
|
|
$('.remove-row').on('click', function () {
|
|
|
|
if (confirm('Are You Sure , Remove this row ? \n\n 1. Ok : To Remove . \n 2. Cancel : To Cancel .')) {
|
|
|
|
$(this).parents('tr').remove();
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
});
|
2020-12-13 07:25:42 -05:00
|
|
|
|
2020-12-17 05:11:50 -05:00
|
|
|
$('#add-new-date-row').on('click', function () {
|
|
|
|
var row = $('.empty-row-d.screen-reader-text').clone(true);
|
|
|
|
row.removeClass('empty-row-d screen-reader-text');
|
|
|
|
row.insertBefore('#repeatable-fieldset-one-d tbody>tr:last');
|
2020-12-13 07:25:42 -05:00
|
|
|
return false;
|
2020-12-17 05:11:50 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
$('.remove-row-d').on('click', function () {
|
|
|
|
if (confirm('Are You Sure , Remove this row ? \n\n 1. Ok : To Remove . \n 2. Cancel : To Cancel .')) {
|
|
|
|
$(this).parents('tr').remove();
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
});
|
2020-12-17 00:27:30 -05:00
|
|
|
});
|
2021-11-24 01:51:57 -05:00
|
|
|
$(document).on('keyup change', '.mp_ticket_type_table [name="option_name_t[]"],.mp_ticket_type_table [name="option_name[]"]', function () {
|
|
|
|
let n = $(this).val();
|
2021-11-29 06:49:04 -05:00
|
|
|
$(this).val(n.replace(/[@%'":;&_]/g, ''));
|
2021-11-24 01:51:57 -05:00
|
|
|
});
|
2020-12-14 07:10:30 -05:00
|
|
|
}(jQuery));
|