file update

This commit is contained in:
magepeopleteam 2020-12-17 10:11:50 +00:00
parent 12a04aa8b9
commit fdd3af16ad
8 changed files with 97 additions and 242 deletions

View File

@ -371,6 +371,7 @@ div#mep_event_list_thumbnail_meta_boxes table td input#enable_global_qty {
#mp_event_all_info_in_tab table.form-table td{width: 65%;}
/****************mp_event_all_meta_in_tab********************/
iframe#gmap_canvas {width: 100%; height: 300px;}
#mp_event_all_info_in_tab{margin: 0 0 35px 0;}
#mp_event_all_info_in_tab .section-title,
#mp_event_all_info_in_tab .mp_event_virtual_type_des,
#mp_event_all_info_in_tab label.mp_event_drop_list_hidden,
@ -456,4 +457,8 @@ label.mp_event_virtual_type_des textarea{width:100%;}
border-radius: 5px 0 0 5px;
padding: 0;background-color: #f2f2f2;
}
#mp_event_all_info_in_tab .mp_event_type_sortable_button{ border-radius: 0 5px 5px 0;border-left: none;cursor: move;}
#mp_event_all_info_in_tab .mp_event_type_sortable_button{ border-radius: 0 5px 5px 0;border-left: none;cursor: move;}
/****************/
#mp_event_all_info_in_tab table button#mep_event_cc_email_text-tmce,
#mp_event_all_info_in_tab table button#mep_event_cc_email_text-html{width:auto;}

View File

@ -597,7 +597,7 @@ div.mep-default-feature-content p, div.mep-default-feature-content ul, div.mep-d
line-height: 22px;
list-style: inherit;
}
.mep-events-wrapper p:not(.mep-events-wrapper .mep-default-feature-content p){
.mep-events-wrapper p:not(.mep-events-wrapper .mep-default-feature-content p,.ui-accordion .ui-accordion-content){
line-height: 1.2;
margin: 0;
padding: 0;
@ -854,7 +854,13 @@ div.item_hover_effect{position:absolute;left:0;top:0;right:0;bottom:0;background
div.item_hover_effect a{font-size:22px;font-weight:500;color:#fff;padding:15px 30px;border-radius:5px;background-color:#346B80;transition: 250ms ease-in-out;border:1px solid #FFF;}
div.item_hover_effect a:hover{color:#346B80;background-color:#fff;border:1px solid #346B80;}
.mep-event-list-loop.column_style {-webkit-box-sizing: border-box;box-sizing: border-box;}
/************************/
.mep-day-details-section h4{font-size: 22px;font-weight: bold;}
.mep-day-details-section .mep-day-title{font-size: 20px;font-weight: 600;}
.mep-day-details-section .mep-day-details{font-size: 16px;margin: 0 0 0 30px;padding: 0 0 0 5px;border-left: 2px solid #ddd;}
.ui-accordion .ui-accordion-header{background-image: none;margin: 10px 0 0 0;}
.ui-accordion .ui-accordion-header.ui-state-active{background-image: none;background-color: #1D4A68;color: #fff;font-size: 18px;}
/******Responsive*******/
@media only screen and (max-width: 1199px) {
/********Default Theme***********/

View File

@ -2991,13 +2991,12 @@ function mep_single_page_js_script($event_id){
<script>
jQuery(document).ready(function() {
<?php if(sizeof($mep_event_faq) > 0 && !is_admin() ){ ?>
<?php if(sizeof($mep_event_faq) > 0 && !is_admin() ){ ?>
jQuery("#mep-event-accordion").accordion({
collapsible: true,
active: false
});
<?php } ?>
<?php } ?>
jQuery(document).on("change", ".etp", function() {
var sum = 0;
@ -3054,7 +3053,7 @@ function mep_single_page_js_script($event_id){
}).change(); //trigger change event on page load
<?php
$mep_event_ticket_type = get_post_meta($event_id, 'mep_event_ticket_type', true) ? get_post_meta($event_id, 'mep_event_ticket_type', true) : array();
//This is if no ticket type
//This is if no ticket type
if (sizeof($mep_event_ticket_type) > 0 ) {
//This is if get ticket type
$count = 1;

View File

@ -11,7 +11,19 @@ function mep_event_query($show, $sort = '', $cat = '', $org = '', $city = '', $c
$event_expire_on_old = mep_get_option('mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime');
$event_expire_on = $event_expire_on_old == 'event_end_datetime' ? 'event_expire_datetime' : $event_expire_on_old;
$now = current_time('Y-m-d H:i:s');
$paged = get_query_var("paged") ? get_query_var("paged") : 1;
if ( get_query_var('paged') ) {
$paged = get_query_var('paged');
} elseif ( get_query_var('page') ) {
$paged = get_query_var('page');
} else {
$paged = 1;
}
$etype = $evnt_type == 'expired' ? '<' : '>';
$cat_filter = !empty($cat) ? array(
@ -73,7 +85,21 @@ function mep_event_query($show, $sort = '', $cat = '', $org = '', $city = '', $c
*/
function mep_event_pagination($total_page)
{
$paged = get_query_var("paged") ? get_query_var("paged") : 1;
if ( get_query_var('paged') ) {
$paged = get_query_var('paged');
} elseif ( get_query_var('page') ) {
$paged = get_query_var('page');
} else {
$paged = 1;
}
?>
<div class="row">
<div class="col-md-12">
@ -88,3 +114,5 @@ function mep_event_pagination($total_page)
</div>
<?php
}

View File

@ -44,188 +44,7 @@ do_action('mep_event_single_page_after_header');
<?php do_action('after-single-events'); ?>
</div>
<?php
$builder_version = mep_get_builder_version();
$mep_event_faq = get_post_meta(get_the_id(), 'mep_event_faq', true) ? get_post_meta(get_the_id(), 'mep_event_faq', true) : [];
if($builder_version < 3.5){
?>
<script>
jQuery('#quantity_5a7abbd1bff73').click(function() {
var $form = jQuery('form'); //on a real app it would be better to have a class or ID
var $totalQuant = jQuery('#quantity_5a7abbd1bff73', $form);
jQuery('#quantity_5a7abbd1bff73', $form).change(calculateTotal);
function calculateTotal() {
var sum = jQuery('#rowtotal').val();
jQuery('#usertotal').html('<?php if($currency_pos=="left"){ echo get_woocommerce_currency_symbol(); } ?>' + sum * parseInt( $totalQuant.val() || 0, 10) + "<?php if($currency_pos=="right"){ echo get_woocommerce_currency_symbol(); } ?>");
}
});
jQuery(document).ready(function () {
<?php if(sizeof($mep_event_faq) > 0 && !is_admin() ){ ?>
jQuery( "#mep-event-accordion" ).accordion({
collapsible: true,
active: false
});
<?php } ?>
jQuery(document).on("change", ".etp", function() {
var sum = 0;
jQuery(".etp").each(function(){
sum += +jQuery(this).val();
});
jQuery("#ttyttl").html(sum);
});
jQuery("#ttypelist").change(function () {
vallllp = jQuery(this).val()+"_";
var n = vallllp.split('_');
var price = n[0];
var ctt = 99;
if(vallllp!="_"){
var currentValue = parseInt(ctt);
jQuery('#rowtotal').val(currentValue += parseFloat(price));
}
if(vallllp=="_"){
jQuery('#eventtp').attr('value', 0);
jQuery('#eventtp').attr('max', 0);
jQuery("#ttypeprice_show").html("")
}
});
function updateTotal() {
var total = 0;
vallllp = jQuery(this).val()+"_";
var n = vallllp.split('_');
var price = n[0];
total += parseFloat(price);
jQuery('#rowtotal').val(total);
}
//Bind the change event
jQuery(".extra-qty-box").on('change', function() {
var sum = 0;
var total = <?php if($event_meta['_price'][0]){ echo $event_meta['_price'][0]; }else{ echo 0; } ?>;
jQuery('.price_jq').each(function () {
var price = jQuery(this);
var count = price.closest('tr').find('.extra-qty-box');
sum = (price.html() * count.val());
total = total + sum;
// price.closest('tr').find('.cart_total_price').html(sum + "â‚´");
});
//Fix Tony 5.9.2020: Immer 2 Nachkommastellen anzeigen
total = total.toFixed(2);
//End of fix
jQuery('#usertotal').html("<?php if($currency_pos=="left"){ echo get_woocommerce_currency_symbol(); } ?>" + total + "<?php if($currency_pos=="right"){ echo get_woocommerce_currency_symbol(); } ?>");
jQuery('#rowtotal').val(total);
}).change(); //trigger change event on page load
<?php
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
if($mep_event_ticket_type){
$count =1;
$event_id = $post->ID;
$event_more_date[0]['event_more_start_date'] = date('Y-m-d',strtotime(get_post_meta($event_id,'event_start_date',true)));
$event_more_date[0]['event_more_start_time'] = date('H:i',strtotime(get_post_meta($event_id,'event_start_time',true)));
$event_more_date[0]['event_more_end_date'] = date('Y-m-d',strtotime(get_post_meta($event_id,'event_end_date',true)));
$event_more_date[0]['event_more_end_time'] = date('H:i',strtotime(get_post_meta($event_id,'event_end_time',true)));
$event_more_dates = get_post_meta($event_id,'mep_event_more_date',true) ? get_post_meta($event_id,'mep_event_more_date',true) : array();
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
if($recurring == 'yes'){
$event_multi_date = array_merge($event_more_date,$event_more_dates);
}else{
$event_multi_date = $event_more_date;
}
foreach($event_multi_date as $event_date){
$start_date = $recurring == 'yes' ? date('Y-m-d H:i:s', strtotime($event_date['event_more_start_date'] . ' ' . $event_date['event_more_start_time'])) : date('Y-m-d H:i:s', strtotime(mep_get_event_expire_date($event_id)));
if(strtotime(current_time('Y-m-d H:i:s')) < strtotime($start_date)){
foreach ( $mep_event_ticket_type as $field ) {
$qm = mep_remove_apostopie($field['option_name_t']);
?>
var inputs = jQuery("#ttyttl").html() || 0;
var inputs = jQuery('#eventpxtp_<?php echo $count; ?>').val() || 0;
var input = parseInt(inputs);
var children=jQuery('#dadainfo_<?php echo $count; ?> > div').length || 0;
var selected_ticket = jQuery('#ttyttl').html();
if(input < children){
jQuery('#dadainfo_<?php echo $count; ?>').empty();
children=0;
}
for (var i = children+1; i <= input; i++) {
jQuery('#dadainfo_<?php echo $count; ?>').append(
jQuery('<div/>')
.attr("id", "newDiv" + i)
.html("<?php do_action('mep_reg_fields',$start_date, get_the_id(), $qm); ?>")
);
}
jQuery('#eventpxtp_<?php echo $count; ?>').on('change', function () {
var inputs = jQuery("#ttyttl").html() || 0;
var inputs = jQuery('#eventpxtp_<?php echo $count; ?>').val() || 0;
var input = parseInt(inputs);
var children=jQuery('#dadainfo_<?php echo $count; ?> > div').length || 0;
jQuery(document).on("change", ".etp", function() {
var TotalQty = 0;
jQuery(".etp").each(function(){
TotalQty += +jQuery(this).val();
});
});
if(input < children){
jQuery('#dadainfo_<?php echo $count; ?>').empty();
children=0;
}
for (var i = children+1; i <= input; i++) {
jQuery('#dadainfo_<?php echo $count; ?>').append(
jQuery('<div/>')
.attr("id", "newDiv" + i)
.html("<?php do_action('mep_reg_fields',$start_date, get_the_id(), $qm); ?>")
);
}
});
<?php
$count++;
}
}
}
}else{
?>
jQuery('#quantity_5a7abbd1bff73').on('change', function () {
var input = jQuery('#quantity_5a7abbd1bff73').val() || 0;
var children=jQuery('#divParent > div').length || 0;
if(input < children){
jQuery('#divParent').empty();
children=0;
}
for (var i = children+1; i <= input; i++) {
jQuery('#divParent').append(
jQuery('<div/>')
.attr("id", "newDiv" + i)
});
<?php
}
?>
});
</script>
<?php
}else{
do_action('mep_event_single_template_end',get_the_id());
}
do_action('mep_event_single_page_before_footer');
}
get_footer();

View File

@ -1,7 +1,5 @@
(function ($) {
"use strict";
jQuery(document).ready(function ($) {
// Tabs
$(window).load(function () {
$('.mp_tab_menu').each(function () {
$(this).find('ul li:first-child').trigger('click');
@ -10,7 +8,6 @@
$('.mp_event_address').slideUp(250);
}
});
$(document).on('click', '[data-target-tabs]', function () {
if (!$(this).hasClass('active')) {
let tabsTarget = $(this).attr('data-target-tabs');
@ -22,7 +19,6 @@
}
return false;
});
$(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);
@ -30,59 +26,59 @@
$(this).parents('label.mp_event_virtual_type_des_switch').siblings('label.mp_event_virtual_type_des').val('').slideUp(200);
}
});
$('#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');
return false;
});
$('.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 {
$(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');
return false;
}
});
$(document).find('.mp_event_type_sortable').sortable({
handle: $(this).find('.mp_event_type_sortable_button')
});
});
$('.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')
});
$('#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');
return false;
});
$('.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 {
$('#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');
return false;
}
});
});
$('#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');
return false;
});
$('.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;
}
});
$('.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 {
$('#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');
return false;
}
});
});
$('.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;
}
});
});
}(jQuery));

View File

@ -8451,7 +8451,9 @@ if( ! class_exists( 'FormFieldsGenerator' ) ) {
$new[$key]['default'] = $fields[$key]['default'];
$new[$key]['item_id'] = $fields[$key]['item_id'];
$new[$key]['name'] = $fields[$key]['name'];
$new[$key]['args'] = !is_array($fields[$key]['args']) ? $this->args_from_string($fields[$key]['args']):$fields[$key]['args'];
if($args){
$new[$key]['args'] = !is_array($fields[$key]['args']) ? $this->args_from_string($fields[$key]['args']) : $fields[$key]['args'];
}
}
$fields = $new;

View File

@ -44,7 +44,7 @@ if ( ! class_exists( 'AddMetaBox' ) ) {
$post_id = $this->get_post_id();
if ( ! empty( $get_option_name ) ):
$option_value = serialize( $_POST[ $get_option_name ] );
$option_value = serialize( stripslashes_deep($_POST[ $get_option_name ]) );
update_post_meta( $post_id, $get_option_name, $option_value );
@ -55,7 +55,7 @@ if ( ! class_exists( 'AddMetaBox' ) ) {
foreach ( $panel['sections'] as $sectionIndex => $section ):
foreach ( $section['options'] as $option ):
$option_value = isset( $_POST[ $option['id'] ] ) ? $_POST[ $option['id'] ] : '';
$option_value = isset( $_POST[ $option['id'] ] ) ? stripslashes_deep($_POST[ $option['id'] ]) : '';
if ( is_array( $option_value ) ) {
$option_value = serialize( $option_value );