new ui up
This commit is contained in:
parent
4bda9c74ca
commit
3c1c09ecd9
|
@ -2,7 +2,7 @@
|
|||
display: block;
|
||||
font-size: 15px;
|
||||
font-weight: normal;
|
||||
margin: 15px 0;
|
||||
margin: 0;
|
||||
}
|
||||
.sec label {
|
||||
font-size: 16px;
|
||||
|
@ -10,7 +10,7 @@
|
|||
}
|
||||
.mep_status .active {
|
||||
background: green none repeat scroll 0 0;
|
||||
color: #fff;
|
||||
color: #FFF;
|
||||
padding: 6px 10px;
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
|
@ -18,7 +18,7 @@
|
|||
}
|
||||
.mep_status .err {
|
||||
background: red none repeat scroll 0 0;
|
||||
color: #fff;
|
||||
color: #FFF;
|
||||
padding: 6px 10px;
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
|
@ -32,14 +32,13 @@ td.mep_event_seat.column-mep_event_seat span {
|
|||
width: 65px;
|
||||
}
|
||||
.inside .sec input {
|
||||
border: 1px solid #ddd;
|
||||
border: 1px solid #DDD;
|
||||
padding: 5px;
|
||||
width: 100%;
|
||||
color: #000;
|
||||
}
|
||||
.inside .sec label {
|
||||
font-weight: normal;
|
||||
display: block;
|
||||
}
|
||||
table.atendee-info {
|
||||
display: block;
|
||||
|
@ -73,8 +72,7 @@ table.atendee-info {
|
|||
-moz-box-sizing: border-box;
|
||||
outline: none;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
|
||||
background-color: #fff;
|
||||
font-family: Roboto;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
#pac-container {
|
||||
|
@ -88,14 +86,12 @@ table.atendee-info {
|
|||
}
|
||||
|
||||
.pac-controls label {
|
||||
font-family: Roboto;
|
||||
font-size: 13px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
#pac-input {
|
||||
background-color: #fff;
|
||||
font-family: Roboto;
|
||||
background-color: #FFF;
|
||||
font-size: 15px;
|
||||
font-weight: 300;
|
||||
margin-left: 12px;
|
||||
|
@ -105,20 +101,18 @@ table.atendee-info {
|
|||
}
|
||||
|
||||
#pac-input:focus {
|
||||
border-color: #4d90fe;
|
||||
border-color: #4D90FE;
|
||||
}
|
||||
|
||||
div#mep_event_day_r,
|
||||
div#mep_event_faq_r {
|
||||
display: block;
|
||||
width: 94%;
|
||||
border: 1px solid #ddd;
|
||||
padding: 20px;
|
||||
padding:0 15px 15px;
|
||||
}
|
||||
|
||||
.mep-faq-input {
|
||||
width: 100%;
|
||||
display: block;
|
||||
border: 1px solid #8a8a8a;
|
||||
border: 1px solid #8A8A8A;
|
||||
padding: 5px;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
@ -136,7 +130,7 @@ a.button.remove-faq-row {
|
|||
padding-left: 10px;
|
||||
}
|
||||
.mep-attendee-sec-details span {
|
||||
border: 1px solid #ddd;
|
||||
border: 1px solid #DDD;
|
||||
padding: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
@ -171,7 +165,7 @@ a.button.remove-faq-row {
|
|||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
background-color: #CCC;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
}
|
||||
|
@ -211,47 +205,32 @@ position: absolute;
|
|||
border-radius: 50%;
|
||||
}
|
||||
|
||||
div#mep-event-price {
|
||||
border: 5px solid red;
|
||||
}
|
||||
|
||||
div#mep-event-price h2 {
|
||||
background: red;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
div#mage-primary-button {
|
||||
background: green !important;
|
||||
color: white !important;
|
||||
}
|
||||
ul.mep_rt_settings_list li {
|
||||
display: block;
|
||||
margin: 20px 0;
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 5px 0 10px;
|
||||
}
|
||||
.mage_settings_panel_wrap .metabox-holder {
|
||||
padding-top: 10px;
|
||||
background: #fff;
|
||||
background: #FFF;
|
||||
padding: 20px;
|
||||
border: 5px solid #0071a1;
|
||||
border: 5px solid #0071A1;
|
||||
/* border-top: 0px; */
|
||||
width: 75%;
|
||||
float: left;
|
||||
margin: 0;
|
||||
order: 3;
|
||||
}
|
||||
|
||||
.mage_settings_panel_wrap .nav-tab {
|
||||
float: none;
|
||||
border: 2px solid #0e678c;
|
||||
border: 2px solid #0E678C;
|
||||
border-bottom: none;
|
||||
margin-left: 0;
|
||||
padding: 5px 10px;
|
||||
font-size: 14px;
|
||||
line-height: 25px;
|
||||
font-weight: 600;
|
||||
background: #0071a1;
|
||||
color: #fff;
|
||||
background: #0071A1;
|
||||
color: #FFF;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
max-width: 100%;
|
||||
|
@ -260,17 +239,17 @@ ul.mep_rt_settings_list li {
|
|||
width: auto;
|
||||
}
|
||||
.mage_settings_panel_wrap .nav-tab.nav-tab-active {
|
||||
background: #5ea8c8;
|
||||
background: #5EA8C8;
|
||||
}
|
||||
.mage_settings_panel_wrap table th {
|
||||
width: 330px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-bottom: 1px solid #DDD;
|
||||
padding: 10px 10px 0 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.mage_settings_panel_wrap table td {
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-bottom: 1px solid #DDD;
|
||||
padding: 10px 0;
|
||||
}
|
||||
.mage_settings_panel_wrap p.submit {
|
||||
|
@ -283,35 +262,30 @@ ul.mep_rt_settings_list li {
|
|||
border-radius: 0;
|
||||
}
|
||||
.mage_settings_panel_wrap .metabox-holder h2 {
|
||||
border-bottom: 2px solid #0071a1;
|
||||
border-bottom: 2px solid #0071A1;
|
||||
font-size: 20px;
|
||||
padding: 15px;
|
||||
background: #ddd;
|
||||
background: #DDD;
|
||||
margin-bottom: 30px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.mep_event_metabox_address .sec {
|
||||
width: 48%;
|
||||
display: inline-block;
|
||||
padding: 0px 10px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
#poststuff .stuffbox > h3, #poststuff h2, #poststuff h3.hndle {
|
||||
display: block;
|
||||
}
|
||||
span.event_meta_help_txt {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
margin: 2px 0 20px;
|
||||
color: #ba2720;
|
||||
}
|
||||
|
||||
span.mep_event_date {
|
||||
background: #b2833f;
|
||||
background: #B2833F;
|
||||
font-size: 11px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
height: auto;
|
||||
padding: 7px 3px;
|
||||
color: #fff;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
div#mep_event_list_thumbnail_meta_boxes table th, div#mep_event_list_thumbnail_meta_boxes table td {
|
||||
|
@ -341,7 +315,6 @@ div#mep_event_list_thumbnail_meta_boxes table td input#enable_global_qty {
|
|||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
#mep_event_list_thumbnail_meta_boxes table.form-table tbody th, #mep_event_list_thumbnail_meta_boxes table.form-table tbody td {
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
@ -353,13 +326,104 @@ div#mep_event_list_thumbnail_meta_boxes table td input#enable_global_qty {
|
|||
display: block;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
display: -webkit-flex;display: flex;-webkit-flex-wrap: wrap;flex-wrap: wrap;
|
||||
}
|
||||
|
||||
h2.nav-tab-wrapper {}
|
||||
|
||||
.wrap.mage_settings_panel_wrap h2.nav-tab-wrapper {
|
||||
width: 20%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
float: left;
|
||||
order:2;
|
||||
}
|
||||
.wrap.mage_settings_panel_wrap #setting-error-tgmpa{order: 0;width: 100%;}
|
||||
#mp_event_all_info_in_tab table.form-table{table-layout: inherit;}
|
||||
#mp_event_all_info_in_tab table.form-table th{width: 35%;}
|
||||
#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 .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,
|
||||
#mp_event_all_info_in_tab .mp_event_custom_form_hidden{display: none;}
|
||||
#mp_event_all_info_in_tab .mp_event_virtual_type_des.active{display:block;}
|
||||
#mp_event_all_info_in_tab .ppof-settings .form-section{padding: 0;}
|
||||
#mp_event_all_info_in_tab .postbox-header{background-color: #007cba;padding: 10px;}
|
||||
#mp_event_all_info_in_tab .postbox-header h2{font-size:20px;font-weight: 600;color:#FFF !important;border: none !important;padding: 0;}
|
||||
#mp_event_all_info_in_tab .postbox-header h2 .dashicons{width: 45px;height: 28px;font-size: 28px;}
|
||||
#mp_event_all_info_in_tab .postbox-header button span{color:#fff;}
|
||||
#mp_event_all_info_in_tab .postbox-header button:hover span{color:#999;}
|
||||
#mp_event_all_info_in_tab .inside{margin: 0;padding: 0;}
|
||||
|
||||
#mp_event_all_info_in_tab table{border: 1px solid #ddd;table-layout: fixed;width:100%;border-collapse: inherit;}
|
||||
#mp_event_all_info_in_tab table th{background-color: #f1f1f1;text-align: left;font-size: 15px;padding: 5px 10px;}
|
||||
#mp_event_all_info_in_tab table th,
|
||||
#mp_event_all_info_in_tab table td{border: 1px solid #ddd;position: relative;width: inherit;}
|
||||
#mp_event_all_info_in_tab table td{padding: 5px;}
|
||||
#mp_event_all_info_in_tab table button{width: 100%;}
|
||||
#mp_event_all_info_in_tab table button.remove-day-row,
|
||||
#mp_event_all_info_in_tab table button.remove-faq-row{width: auto;}
|
||||
#mp_event_all_info_in_tab table.mp_form_builder_table .mp_formControl{width: 100%;}
|
||||
#add-new-date-row,
|
||||
#mp_event_add_new_form,
|
||||
.mp_event_remove_this_row{background: #007cba !important; font-size: 16px;padding: 5px 20px;color: #fff;border:none;
|
||||
display: -webkit-flex;display: flex;-webkit-align-items: center;align-items: center;-webkit-justify-content: center;justify-content: center;
|
||||
}
|
||||
.mp_event_remove_this_row{background: darkred !important;}
|
||||
.mp_event_remove_this_row:hover{background: #fff !important;color:red;}
|
||||
#add-new-date-row span,
|
||||
#mp_event_all_info_in_tab p button span{margin: 0 7px 0 0;}
|
||||
|
||||
#mp_event_all_info_in_tab ul{list-style-type: none;margin:0;padding: 0;}
|
||||
#mp_event_all_info_in_tab ul li{display: -webkit-flex;display: flex;-webkit-align-items: center;align-items: center;}
|
||||
#mp_event_all_info_in_tab h5{font-size: 18px;font-weight: 500;margin: 0 0 5px 0;}
|
||||
|
||||
.mp_event_all_meta_in_tab {display: -webkit-flex;display: flex;min-height: 300px;}
|
||||
.mp_tab_menu {width: 260px;background-color: #f1f1f1;color: #0073aa;font-size: 15px;font-weight: 600;}
|
||||
.mp_tab_menu ul {border-top: 1px solid #FFF;}
|
||||
.mp_tab_menu ul li {
|
||||
padding:10px;margin: 0;border-bottom: 1px solid #FFF;cursor: pointer;color:#0073aa; position: relative;
|
||||
}
|
||||
.mp_tab_menu ul li.active{background-color: #007cba;color: #FFF;font-size: 16px;}
|
||||
.mp_tab_menu ul li:hover {color: #F1ADAD;}
|
||||
.mp_tab_menu ul li.active::after{
|
||||
position: absolute;right: 0;content: '';border: 10px solid transparent;border-right-color: #FFF;
|
||||
}
|
||||
.mp_tab_details {width: calc(100% - 260px);background-color: #FFF;padding: 15px;}
|
||||
.mp_tab_item {display: none;}
|
||||
|
||||
.mp_form_area {display: -webkit-flex;display: flex;}
|
||||
.mp_form_area > * {-webkit-flex: 1;flex: 1;}
|
||||
.mp_form_area label {font-size: 15px;color: #777;font-weight: 500;margin:0;position: relative;
|
||||
display: -webkit-flex;display: flex;-webkit-align-items: center;align-items: center;
|
||||
}
|
||||
.mp_form_area label span{min-width: 220px;font-size: 17px;color: #555;font-weight: 600;}
|
||||
#mp_event_all_info_in_tab .mp_formControl {min-width: auto;font-size: 15px;margin: 0;font-weight: 500;max-width: 100%;width: 100%}
|
||||
#mp_event_all_info_in_tab.switch_checkbox {min-width: 50px;margin: 0 20px 0 0;}
|
||||
.mp_form_area .mp_form_item {margin: 0 0 15px 0;}
|
||||
#mp_event_all_info_in_tab label span.round{min-width: auto;left: 2px;width: 60px;right: inherit;height: 25px;top: 2px;}
|
||||
#mp_event_all_info_in_tab .mp_opacity_zero{opacity: 0;}
|
||||
|
||||
p.event_meta_help_txt {font-size: 13px;margin: 5px;color: #BA2720;}
|
||||
#add-new-date-row{margin: 10px 0;}
|
||||
|
||||
label.mp_event_virtual_type_des{margin:20px 0 0 0;}
|
||||
label.mp_event_virtual_type_des textarea{width:100%;}
|
||||
/*************/
|
||||
#mp_event_all_info_in_tab .mp_event_custom_form_table{margin: 20px 0;}
|
||||
#mp_event_all_info_in_tab .mp_event_custom_form_table .mp_formControl{min-width: auto;width: 100%;}
|
||||
|
||||
#mp_event_all_info_in_tab button,
|
||||
.mp_tab_menu ul li{
|
||||
-webkit-transition: all .25s ease-in-out;transition: all .25s ease-in-out;
|
||||
}
|
||||
|
||||
#mp_event_all_info_in_tab .mp_event_remove_move{display: -webkit-flex;display: flex;}
|
||||
#mp_event_all_info_in_tab .mp_event_remove_move>*{-webkit-flex: 1;flex: 1;}
|
||||
#mp_event_all_info_in_tab .mp_event_type_sortable_button,
|
||||
#mp_event_all_info_in_tab .mp_event_remove_move button{
|
||||
display: -webkit-flex;display: flex;-webkit-align-items: center;align-items: center;-webkit-justify-content: center;justify-content: center;
|
||||
border: 1px solid #ddd;
|
||||
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;}
|
|
@ -86,17 +86,6 @@ function mep_fw_meta_boxs()
|
|||
'type' => 'select2',
|
||||
'args' => 'CPT_%mep_event_speaker%',
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'mep_event_type',
|
||||
'title' => __('Event Type', 'mage-eventpress'),
|
||||
'details' => __('Please Select Event Type, This will add a Rebon in the event list', 'mage-eventpress'),
|
||||
'type' => 'select',
|
||||
'args' => array(
|
||||
'offline' => __('Offline Event', 'mage-eventpress'),
|
||||
'online' => __('Online/Virtual Event', 'mage-eventpress')
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
|
||||
|
@ -104,7 +93,7 @@ function mep_fw_meta_boxs()
|
|||
);
|
||||
$events_speaker_list_meta_args = array(
|
||||
'meta_box_id' => 'mep_event_speakers_list_meta_boxes',
|
||||
'meta_box_title' => __('Event Speaker Information', 'mage-eventpress'),
|
||||
'meta_box_title' => '<span class="dashicons dashicons-businessman"></span> '.__('Speaker Information', 'mage-eventpress'),
|
||||
'screen' => array('mep_events'),
|
||||
'context' => 'normal',
|
||||
'priority' => 'high',
|
||||
|
@ -199,7 +188,7 @@ function mep_fw_meta_boxs()
|
|||
|
||||
$email_body_meta_args = array(
|
||||
'meta_box_id' => 'mep_event_email_body_meta_boxes',
|
||||
'meta_box_title' => __('Event Email Confirmation Text', 'mage-eventpress'),
|
||||
'meta_box_title' => '<span class="dashicons dashicons-email"></span> '.__('Email Confirmation Text', 'mage-eventpress'),
|
||||
//'callback' => '_meta_box_callback',
|
||||
'screen' => array('mep_events'),
|
||||
'context' => 'normal', // 'normal', 'side', and 'advanced'
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -223,7 +223,7 @@ function mep_add_custom_fields_text_to_order_items($item, $cart_item_key, $value
|
|||
$cart_location = $values['event_cart_location'];
|
||||
$event_extra_service = $values['event_extra_service'];
|
||||
$ticket_type_arr = $values['event_ticket_info'];
|
||||
$cart_date = $values['event_cart_date'];
|
||||
$cart_date = get_mep_datetime($values['event_cart_date'],'date-time-text');
|
||||
$form_position = mep_get_option('mep_user_form_position', 'general_attendee_sec', 'details_page');
|
||||
$event_user_info = $form_position == 'details_page' ? $values['event_user_info'] : mep_save_attendee_info_into_cart($eid);
|
||||
$recurring = get_post_meta($eid, 'mep_enable_recurring', true) ? get_post_meta($eid, 'mep_enable_recurring', true) : 'no';
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
get_header();
|
||||
the_post();
|
||||
global $post, $woocommerce;
|
||||
if ( post_password_required() ) {
|
||||
echo get_the_password_form(); // WPCS: XSS ok.
|
||||
}else{
|
||||
|
||||
$event_meta = get_post_custom(get_the_id());
|
||||
$author_terms = get_the_terms(get_the_id(), 'mep_org');
|
||||
$book_count = get_post_meta(get_the_id(), 'total_booking', true);
|
||||
|
@ -219,7 +223,7 @@ jQuery('#quantity_5a7abbd1bff73').on('change', function () {
|
|||
<?php
|
||||
}else{
|
||||
do_action('mep_event_single_template_end',get_the_id());
|
||||
}?>
|
||||
<?php
|
||||
}
|
||||
do_action('mep_event_single_page_before_footer');
|
||||
}
|
||||
get_footer();
|
||||
|
|
|
@ -1,5 +1,87 @@
|
|||
// jQuery(document).ready(function($) {
|
||||
// "use strict";
|
||||
jQuery(document).ready(function ($) {
|
||||
"use strict";
|
||||
// Tabs
|
||||
$(window).load(function () {
|
||||
$('.mp_event_all_meta_in_tab .mp_tab_menu li:first-child[data-target-tabs]').trigger('click');
|
||||
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');
|
||||
let targetParent = $(this).parents('.mp_event_all_meta_in_tab');
|
||||
targetParent.find('.mp_tab_item.active').removeClass('active').slideUp('fast');
|
||||
targetParent.find('.mp_tab_item[data-tab-item="' + tabsTarget + '"]').addClass('active').slideDown(250);
|
||||
targetParent.find('li.active').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$('[name="mep_event_expire"]').datepicker({
|
||||
dateFormat: "yy-mm-dd",
|
||||
minDate: 0
|
||||
});
|
||||
$(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);
|
||||
} else {
|
||||
$(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');
|
||||
jQuery('.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 {
|
||||
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 {
|
||||
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-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;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
if ( ! defined('ABSPATH')) exit; // if direct access
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
} // if direct access
|
||||
|
||||
|
||||
if ( ! class_exists( 'AddMetaBox' ) ) {
|
||||
|
@ -11,8 +13,18 @@ if( ! class_exists( 'AddMetaBox' ) ) {
|
|||
public function __construct( $args ) {
|
||||
|
||||
$this->data = &$args;
|
||||
|
||||
if ( isset( $this->data['seat_plan'] ) ) {
|
||||
add_action( 'mp_event_all_in_tab_item_seat_plan', array( $this, 'meta_box_callback' ), 10, 1 );
|
||||
}elseif ( isset( $this->data['every_day_setting'] ) ) {
|
||||
add_action('mp_event_recurring_every_day_setting',array( $this, 'meta_box_callback' ), 10, 1);
|
||||
} elseif ( $this->get_meta_box_screen()[0] == 'mep_events' && $this->get_meta_box_context() == 'normal' ) {
|
||||
add_action( 'mp_event_all_in_tab_menu', array( $this, 'mp_event_all_in_tab_menu_list' ) );
|
||||
add_action( 'mp_event_all_in_tab_item', array( $this, 'meta_box_callback' ), 10, 1 );
|
||||
} else {
|
||||
add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 12 );
|
||||
}
|
||||
|
||||
|
||||
add_action( 'save_post', array( $this, 'save_post' ), 12 );
|
||||
|
||||
|
||||
|
@ -50,7 +62,6 @@ if( ! class_exists( 'AddMetaBox' ) ) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
update_post_meta( $post_id, $option['id'], $option_value );
|
||||
|
||||
endforeach;
|
||||
|
@ -60,15 +71,27 @@ if( ! class_exists( 'AddMetaBox' ) ) {
|
|||
endif;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function mp_event_all_in_tab_menu_list() {
|
||||
?>
|
||||
<li data-target-tabs="#<?php echo $this->get_meta_box_id(); ?>">
|
||||
<?php echo $this->get_meta_box_title(); ?>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
public function meta_box_callback(){
|
||||
public function meta_box_callback( $post_id = null ) {
|
||||
|
||||
$get_nav_position = $this->get_nav_position();
|
||||
|
||||
//var_dump($get_nav_position);
|
||||
if ( $this->get_meta_box_screen()[0] == 'mep_events' && $this->get_meta_box_context() == 'normal' && !isset( $this->data['seat_plan'] )) {
|
||||
?>
|
||||
<div class="mp_tab_item" data-tab-item="#<?php echo $this->get_meta_box_id(); ?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div class='wrap ppof-settings ppof-metabox'>
|
||||
|
@ -102,11 +125,18 @@ if( ! class_exists( 'AddMetaBox' ) ) {
|
|||
$page_settings_count = count( $page_settings );
|
||||
//var_dump($page_settings);
|
||||
?>
|
||||
<li class="nav-item-wrap <?php if(($page_settings_count > 1)) echo 'has-child'; ?> <?php if($current_page==$page_id) echo 'active'; ?>">
|
||||
<a dataid="<?php echo $page_id; ?>" href='#<?php //echo $pagenow.'?'.$section_id; ?><?php echo
|
||||
<li class="nav-item-wrap <?php if ( ( $page_settings_count > 1 ) ) {
|
||||
echo 'has-child';
|
||||
} ?> <?php if ( $current_page == $page_id ) {
|
||||
echo 'active';
|
||||
} ?>">
|
||||
<a dataid="<?php echo $page_id; ?>" href='#<?php //echo $pagenow.'?'.$section_id;
|
||||
?><?php echo
|
||||
$page_id; ?>' class='nav-item'><?php echo $page['page_nav']; ?>
|
||||
|
||||
<?php if(($page_settings_count > 1)) echo '<i class="child-nav-icon fas fa-angle-down"></i>'; ?>
|
||||
<?php if ( ( $page_settings_count > 1 ) ) {
|
||||
echo '<i class="child-nav-icon fas fa-angle-down"></i>';
|
||||
} ?>
|
||||
</a>
|
||||
<?php
|
||||
if ( ( $page_settings_count > 1 ) ):
|
||||
|
@ -120,7 +150,9 @@ if( ! class_exists( 'AddMetaBox' ) ) {
|
|||
?>
|
||||
<li>
|
||||
|
||||
<a sectionId="<?php echo $section_id; ?>" dataid="<?php echo $page_id; ?>" href='#<?php echo $section_id; ?>' class='nav-item <?php if($current_page==$page_id) echo 'active'; ?>'><?php echo $nav_sections_title; ?>
|
||||
<a sectionId="<?php echo $section_id; ?>" dataid="<?php echo $page_id; ?>" href='#<?php echo $section_id; ?>' class='nav-item <?php if ( $current_page == $page_id ) {
|
||||
echo 'active';
|
||||
} ?>'><?php echo $nav_sections_title; ?>
|
||||
|
||||
|
||||
</a>
|
||||
|
@ -137,15 +169,11 @@ if( ! class_exists( 'AddMetaBox' ) ) {
|
|||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
$current_page ++;
|
||||
endforeach;
|
||||
?>
|
||||
|
@ -170,14 +198,11 @@ if( ! class_exists( 'AddMetaBox' ) ) {
|
|||
|
||||
if ( $get_nav_position == 'right' ) {
|
||||
$form_wrapper_position = 'left';
|
||||
}
|
||||
elseif($get_nav_position == 'left'){
|
||||
} elseif ( $get_nav_position == 'left' ) {
|
||||
$form_wrapper_position = 'right';
|
||||
}
|
||||
elseif($get_nav_position == 'top'){
|
||||
} elseif ( $get_nav_position == 'top' ) {
|
||||
$form_wrapper_position = 'full-width-top';
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$form_wrapper_position = 'full-width';
|
||||
}
|
||||
?>
|
||||
|
@ -192,9 +217,10 @@ if( ! class_exists( 'AddMetaBox' ) ) {
|
|||
foreach ( $this->get_panels() as $panelsIndex => $panel ):
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<div class="tab-content <?php if($current_page==1) echo 'active'; ?> tab-content-<?php
|
||||
<div class="tab-content <?php if ( $current_page == 1 ) {
|
||||
echo 'active';
|
||||
} ?> tab-content-<?php
|
||||
echo $panelsIndex; ?>">
|
||||
<?php
|
||||
foreach ( $panel['sections'] as $sectionIndex => $section ):
|
||||
|
@ -225,9 +251,6 @@ if( ! class_exists( 'AddMetaBox' ) ) {
|
|||
$option['value'] = $option_value;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->field_generator( $option )
|
||||
?>
|
||||
|
||||
|
@ -262,11 +285,13 @@ if( ! class_exists( 'AddMetaBox' ) ) {
|
|||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
|
||||
if ( $this->get_meta_box_screen()[0] == 'mep_events' && $this->get_meta_box_context() == 'normal' && !isset( $this->data['seat_plan'] )) {
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function field_generator( $option ) {
|
||||
|
@ -277,7 +302,9 @@ if( ! class_exists( 'AddMetaBox' ) ) {
|
|||
|
||||
$post_id = $this->get_post_id();
|
||||
|
||||
if( empty( $id ) ) return;
|
||||
if ( empty( $id ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$prent_option_name = $this->get_option_name();
|
||||
$FormFieldsGenerator = new FormFieldsGenerator();
|
||||
|
@ -307,221 +334,190 @@ if( ! class_exists( 'AddMetaBox' ) ) {
|
|||
|
||||
if ( isset( $option['type'] ) && $option['type'] === 'text' ) {
|
||||
echo $FormFieldsGenerator->field_text( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'text_multi' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'text_multi' ) {
|
||||
echo $FormFieldsGenerator->field_text_multi( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'textarea' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'textarea' ) {
|
||||
echo $FormFieldsGenerator->field_textarea( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'checkbox' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'checkbox' ) {
|
||||
echo $FormFieldsGenerator->field_checkbox( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'checkbox_multi' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'checkbox_multi' ) {
|
||||
echo $FormFieldsGenerator->field_checkbox_multi( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'radio' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'radio' ) {
|
||||
echo $FormFieldsGenerator->field_radio( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'select' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'select' ) {
|
||||
echo $FormFieldsGenerator->field_select( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'range' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'range' ) {
|
||||
echo $FormFieldsGenerator->field_range( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'range_input' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'range_input' ) {
|
||||
echo $FormFieldsGenerator->field_range_input( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'switch' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'switch' ) {
|
||||
echo $FormFieldsGenerator->field_switch( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'switch_multi' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'switch_multi' ) {
|
||||
echo $FormFieldsGenerator->field_switch_multi( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'switch_img' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'switch_img' ) {
|
||||
echo $FormFieldsGenerator->field_switch_img( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'time_format' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'time_format' ) {
|
||||
echo $FormFieldsGenerator->field_time_format( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'date_format' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'date_format' ) {
|
||||
echo $FormFieldsGenerator->field_date_format( $option );
|
||||
}
|
||||
|
||||
elseif( isset($option['type']) && $option['type'] === 'datepicker' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'datepicker' ) {
|
||||
echo $FormFieldsGenerator->field_datepicker( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'color_sets' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'color_sets' ) {
|
||||
echo $FormFieldsGenerator->field_color_sets( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'colorpicker' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'colorpicker' ) {
|
||||
echo $FormFieldsGenerator->field_colorpicker( $option );
|
||||
}
|
||||
|
||||
elseif( isset($option['type']) && $option['type'] === 'colorpicker_multi' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'colorpicker_multi' ) {
|
||||
echo $FormFieldsGenerator->field_colorpicker_multi( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'link_color' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'link_color' ) {
|
||||
echo $FormFieldsGenerator->field_link_color( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'icon' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'icon' ) {
|
||||
echo $FormFieldsGenerator->field_icon( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'icon_multi' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'icon_multi' ) {
|
||||
echo $FormFieldsGenerator->field_icon_multi( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'dimensions' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'dimensions' ) {
|
||||
echo $FormFieldsGenerator->field_dimensions( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'wp_editor' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'wp_editor' ) {
|
||||
echo $FormFieldsGenerator->field_wp_editor( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'select2' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'select2' ) {
|
||||
echo $FormFieldsGenerator->field_select2( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'faq' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'faq' ) {
|
||||
echo $FormFieldsGenerator->field_faq( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'grid' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'grid' ) {
|
||||
echo $FormFieldsGenerator->field_grid( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'color_palette' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'color_palette' ) {
|
||||
echo $FormFieldsGenerator->field_color_palette( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'color_palette_multi' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'color_palette_multi' ) {
|
||||
echo $FormFieldsGenerator->field_color_palette_multi( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'media' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'media' ) {
|
||||
echo $FormFieldsGenerator->field_media( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'media_multi' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'media_multi' ) {
|
||||
echo $FormFieldsGenerator->field_media_multi( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'repeatable' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'repeatable' ) {
|
||||
echo $FormFieldsGenerator->field_repeatable( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'user' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'user' ) {
|
||||
echo $FormFieldsGenerator->field_user( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'margin' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'margin' ) {
|
||||
echo $FormFieldsGenerator->field_margin( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'padding' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'padding' ) {
|
||||
echo $FormFieldsGenerator->field_padding( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'border' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'border' ) {
|
||||
echo $FormFieldsGenerator->field_border( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'switcher' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'switcher' ) {
|
||||
echo $FormFieldsGenerator->field_switcher( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'password' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'password' ) {
|
||||
echo $FormFieldsGenerator->field_password( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'post_objects' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'post_objects' ) {
|
||||
echo $FormFieldsGenerator->field_post_objects( $option );
|
||||
}
|
||||
elseif( isset($option['type']) && $option['type'] === 'google_map' ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === 'google_map' ) {
|
||||
echo $FormFieldsGenerator->field_google_map( $option );
|
||||
}
|
||||
|
||||
elseif( isset($option['type']) && $option['type'] === $type ){
|
||||
} elseif ( isset( $option['type'] ) && $option['type'] === $type ) {
|
||||
do_action( "wp_theme_settings_field_$type", $option );
|
||||
}
|
||||
if( !empty( $details ) ) echo "<p class='description'>$details</p>";
|
||||
if ( ! empty( $details ) ) {
|
||||
echo "<p class='description'>$details</p>";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private function get_meta_box_id() {
|
||||
if( isset( $this->data['meta_box_id'] ) ) return $this->data['meta_box_id'];
|
||||
else return "";
|
||||
if ( isset( $this->data['meta_box_id'] ) ) {
|
||||
return $this->data['meta_box_id'];
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
private function get_meta_box_title() {
|
||||
if( isset( $this->data['meta_box_title'] ) ) return $this->data['meta_box_title'];
|
||||
else return "";
|
||||
if ( isset( $this->data['meta_box_title'] ) ) {
|
||||
return $this->data['meta_box_title'];
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
private function get_meta_box_screen() {
|
||||
if( isset( $this->data['screen'] ) ) return $this->data['screen'];
|
||||
else return array('post');
|
||||
if ( isset( $this->data['screen'] ) ) {
|
||||
return $this->data['screen'];
|
||||
} else {
|
||||
return array( 'post' );
|
||||
}
|
||||
}
|
||||
|
||||
private function get_meta_box_context() {
|
||||
if( isset( $this->data['context'] ) ) return $this->data['context'];
|
||||
else return 'normal';
|
||||
if ( isset( $this->data['context'] ) ) {
|
||||
return $this->data['context'];
|
||||
} else {
|
||||
return 'normal';
|
||||
}
|
||||
}
|
||||
|
||||
private function get_meta_box_priority() {
|
||||
if( isset( $this->data['priority'] ) ) return $this->data['priority'];
|
||||
else return "high";
|
||||
if ( isset( $this->data['priority'] ) ) {
|
||||
return $this->data['priority'];
|
||||
} else {
|
||||
return "high";
|
||||
}
|
||||
}
|
||||
|
||||
private function get_callback_args() {
|
||||
if( isset( $this->data['callback_args'] ) ) return $this->data['callback_args'];
|
||||
else return array();
|
||||
if ( isset( $this->data['callback_args'] ) ) {
|
||||
return $this->data['callback_args'];
|
||||
} else {
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
private function get_panels() {
|
||||
if( isset( $this->data['panels'] ) ) return $this->data['panels'];
|
||||
else return array();
|
||||
if ( isset( $this->data['panels'] ) ) {
|
||||
return $this->data['panels'];
|
||||
} else {
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function get_item_name() {
|
||||
if( isset( $this->data['item_name'] ) ) return $this->data['item_name'];
|
||||
else return "PickPlugins";
|
||||
if ( isset( $this->data['item_name'] ) ) {
|
||||
return $this->data['item_name'];
|
||||
} else {
|
||||
return "PickPlugins";
|
||||
}
|
||||
}
|
||||
|
||||
private function get_item_version() {
|
||||
if( isset( $this->data['item_version'] ) ) return $this->data['item_version'];
|
||||
else return "1.0.0";
|
||||
if ( isset( $this->data['item_version'] ) ) {
|
||||
return $this->data['item_version'];
|
||||
} else {
|
||||
return "1.0.0";
|
||||
}
|
||||
}
|
||||
|
||||
private function get_option_name() {
|
||||
if( isset( $this->data['option_name'] )) return $this->data['option_name'];
|
||||
else return false;
|
||||
if ( isset( $this->data['option_name'] ) ) {
|
||||
return $this->data['option_name'];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private function get_nav_position() {
|
||||
if( isset( $this->data['nav_position'] )) return $this->data['nav_position'];
|
||||
else return 'left';
|
||||
if ( isset( $this->data['nav_position'] ) ) {
|
||||
return $this->data['nav_position'];
|
||||
} else {
|
||||
return 'left';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function get_post_id() {
|
||||
|
||||
$post_id = get_the_ID();
|
||||
|
||||
return $post_id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue