diff --git a/css/admin_style.css b/css/admin_style.css index 05ea34f..9cc8c83 100644 --- a/css/admin_style.css +++ b/css/admin_style.css @@ -305,4 +305,40 @@ span.mep_event_date { height: auto; padding: 7px 3px; color: #fff; +} + +div#mep_event_list_thumbnail_meta_boxes table th, div#mep_event_list_thumbnail_meta_boxes table td { + width: 100%; + display: block; + float: none; + overflow: hidden; +} + +div#mep_event_list_thumbnail_meta_boxes table, div#mep_event_list_thumbnail_meta_boxes table tbody { + width: 100%!important; + overflow: hidden; + display: block; +} + +div#mep_event_list_thumbnail_meta_boxes table td input { + width: 93%!important; +} +div#mep_event_list_thumbnail_meta_boxes span.slider:before { + display: none; +} +div#mep_event_list_thumbnail_meta_boxes table td input#enable_global_qty { + width: auto!important; +} +#mep_event_list_thumbnail_meta_boxes table.form-table { + width: 100%!important; + 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%; +} +#mep_event_list_thumbnail_meta_boxes .media_preview { + width: 92%!important; } \ No newline at end of file diff --git a/css/style.css b/css/style.css index fe25568..20a9f4c 100644 --- a/css/style.css +++ b/css/style.css @@ -272,7 +272,11 @@ ul#mep_add_calender_links li a {display: block;margin-top: 10px;width: 100%;padd /*********Related Event*****************/ .mep-related-events-sec .mep_event_grid_item:last-child{margin: 0;} .mep-related-events-sec .mep_list_thumb img{height: 186px;} -.mep-ev-start-date {position: absolute;top: 10px;left: 10px;background: #ffbe30;text-align: center;width: 50px;color: #fff;font-size: 18px;line-height: 1.8;border-radius: 6px;} +.mep-ev-start-date { + position: absolute;top: 10px;left: 10px; + line-height: 1.8;border-radius: 6px; + background: #ffbe30;text-align: center;width: 50px;color: #fff;font-size: 18px; +} .mep-day {font-weight: bold;} /*********List style*****************/ .mep_event_list .mep_event_list_sec, @@ -301,20 +305,20 @@ h3.mep_list_date {font-size: 16px; font-style: italic;font-weight: bold;color: # .mep-list-footer ul li h5{font-size: 14px;font-weight: 600;padding: 0 5px 0 0;} .evl-cc{margin: 0 0 0 10px;} /*******Grid Style******/ -.mep_event_grid_item {border: 1px solid #ddd;margin: 0 20px 0 0; +.mep_event_grid_item { + border: 1px solid #ddd; + margin: 7px; -webkit-box-shadow: 0 0 6px 1px #d9d9d9;box-shadow: 0 0 6px 1px #d9d9d9; } -.mage_grid_box{margin: 0 0 20px 0;} +.mage_grid_box{margin: 0 -7px 20px -7px;} .mage_grid_box .blank_div{margin: 0 20px 0 0;} -.mage_grid_box .mep_event_grid_item:last-child, .mage_grid_box .blank_div:last-child{margin: 0 0 15px 0;} .mep_event_grid_item .mep_list_event_details, .mep_event_grid_item .mep_list_thumb{width: 100%} -.mep_event_grid_item .mep_list_thumb img{height: 160px;} .mep_event_grid_item .mep_list_event_details{margin: 0;} .mep_event_grid_item .mep-list-header{padding: 0 0 0 10px;} .mep_event_grid_item .mep-list-footer { padding: 10px 0 0 10px;} -.mep_event_grid_item .mep_list_event_details{padding: 0 10px 20px 0;} +.mep_event_grid_item .mep_list_event_details{padding: 15px;} @@ -555,7 +559,7 @@ ul.event-custom-price li ul { color: #fff; width: auto; text-align: center; - padding: 0px 10px; + padding: 0 10px; position: absolute; top: 0; bottom: auto; @@ -650,7 +654,7 @@ position: relative; position: relative; } ul.mep-more-date-lists { - margin: 0px; + margin: 0; } button.mep-cat-control { background: #fa6630; @@ -798,12 +802,26 @@ div.mep_event_minimal_list{display:-webkit-flex;display:flex;} .mep-list-header{padding: 0 0 7px 20px;} div.mep_event_native_list .mep_list_thumb, div.mep_event_native_list .mep_list_event_details{min-height:auto;} +div.column_style{ + display:-webkit-flex;display:flex; + -webkit-flex-direction:column;flex-direction:column; +} +div.column_style .mep_list_thumb img{height:160px;} @media only screen and (max-width: 650px){ .mep_list_thumb, .mep_list_event_details{width:100%;min-height:100px;} div.one_column{-webkit-flex-direction:column;flex-direction:column;} } /******Style added by sumon*******/ +div.mep_event_list div.mage_grid_box{-webkit-flex-wrap: wrap;flex-wrap: wrap;} +div.two_column{width:calc(50% - 18px);margin: 0 15px 15px 0;} + +div.four_column{width:calc(25% - 18px);margin: 0 15px 15px 0;} + +div.item_hover_effect{position:absolute;left:0;top:0;right:0;bottom:0;background-color:#0009;display:none;-webkit-justify-content: center;justify-content: center;-webkit-align-items: center;align-items: center;} +.mep-event-list-loop:hover div.item_hover_effect{display: -webkit-flex;display: flex;} +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;} /******Responsive*******/ @media only screen and (max-width: 1199px) { /********Default Theme***********/ @@ -862,17 +880,19 @@ div.mep_event_native_list .mep_list_event_details{min-height:auto;} /********frinklin*********/ .mep-default-sidrbar-events-schedule h3{font-size: 15px;} /************Related***********/ - h2.mep_list_title{font-size: 15px;} + h2.mep_list_title{font-size: 15px !important;} h3.mep_list_date, - .mep-list-footer ul li h6{font-size: 13px;} - .mep-list-footer ul li h5{font-size: 12px;} + .mep-list-footer ul li h6{font-size: 13px !important;} + .mep-list-footer ul li h5{font-size: 12px !important;} + div.item_hover_effect a{font-size:16px;padding:10px 20px;} + + div.column_style{min-width: calc(33.333333% - 14px) !important;} } @media only screen and (max-width: 767px) { div.mep_flex.default_theme, div.franklin_divided, div.bristol_divided, - .mep_event_list .mep_event_list_sec div.mep_event_list_item, - div.mep_event_list div.mage_grid_box{display: block;} + .mep_event_list .mep_event_list_sec div.mep_event_list_item{display: block;} .mep-default-content, .mep-default-sidebar{width: 100%;margin: 0;padding: 0;} div.mep-related-events-sec div.mep_event_list_sec{display: block;} @@ -894,17 +914,16 @@ div.mep_event_native_list .mep_list_event_details{min-height:auto;} .mep_event_list .mep_event_list_sec div.mep_event_list_item .mep_list_event_details{margin: 0} .mep_event_list .mep_event_list_sec div.mep_event_list_item img, div.mep_event_list div.mage_grid_box img{min-height: auto;} - .mage_grid_box>div, - .mage_grid_box .mep_event_grid_item:last-child{margin: 0 0 15px 0;} .mage_grid_box{margin: 0;} .mep-events-wrapper input.extra-qty-box{width: 30px;} .mep-events-wrapper .mage_input_group{max-width: 90px;} - .mep_event_list_item .mep-list-header:before, .mep_event_grid_item .mep-list-header:before { border-color: transparent!important;} .mep_event_minimal_list .mep-ev-start-date {top: -5px;} span.mep_minimal_list_location{margin-left:0;display:block;} + div.column_style{min-width: calc(50% - 14px) !important;} + } @media only screen and (max-width: 500px) { .mep-default-content div.mep-default-feature-date-location{display: block;margin: 10px 0;} @@ -938,22 +957,13 @@ div.mep_event_native_list .mep_list_event_details{min-height:auto;} .bristol .mep-default-sidrbar-calender-btn{margin: 0;padding: 20px 0;border-top: 1px solid #ddd;} .bristol ul#mep_add_calender_links{width: 200px;} - .mep_event_list_item .mep-list-header:before, .mep_event_grid_item .mep-list-header:before { border-color: transparent!important;} .mep_event_native_list .mep_list_thumb {} .mep_event_native_list .mep-list-header {padding: 0;} .mep_event_native_list .mep_more_date_btn { width: 100%;position: relative;} .mep_event_minimal_list .mep-ev-start-date {top: -5px;} } -div.mep_event_list div.mage_grid_box{-webkit-flex-wrap: wrap;flex-wrap: wrap;} -div.two_column{width:calc(50% - 18px);margin: 0 15px 15px 0;} -div.four_column{width:calc(25% - 18px);margin: 0 15px 15px 0;} - -div.item_hover_effect{position:absolute;left:0;top:0;right:0;bottom:0;background-color:#0009;display:none;-webkit-justify-content: center;justify-content: center;-webkit-align-items: center;align-items: center;} -.mep-event-list-loop:hover div.item_hover_effect{display: -webkit-flex;display: flex;} -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;} @media only screen and (max-width: 800px) { div.two_column{width:calc(50% - 15px);margin: 0 15px 15px 0;} @@ -964,4 +974,5 @@ div.item_hover_effect a:hover{color:#346B80;background-color:#fff;border:1px sol div.two_column, div.three_column, div.four_column{width:100%;margin: 0 0 15px 0;} + div.column_style{min-width: calc(100% - 14px) !important;} } \ No newline at end of file diff --git a/inc/admin_setting_panel.php b/inc/admin_setting_panel.php index 74d6780..3bad0b0 100644 --- a/inc/admin_setting_panel.php +++ b/inc/admin_setting_panel.php @@ -411,7 +411,26 @@ if (!class_exists('MAGE_Events_Setting_Controls')) : 'yes' => 'Yes', 'no' => 'No' ) - ) + ), + array( + 'name' => 'mep_hide_event_hover_btn', + 'label' => __( 'Hide / Visible Event Hover Book Now Button ?', 'mage-eventpress' ), + 'desc' => __( 'If you want to Hide / Visible Event Hover Book Now Button , Please select Yes. By default is: No.', 'mage-eventpress' ), + 'type' => 'select', + 'default' => 'no', + 'options' => array( + 'yes' => 'Yes', + 'no' => 'No' + ) + ), + array( + 'name' => 'mep_hide_event_hover_btn_text', + 'label' => __( 'Event Hover Book Now Button Text ?', 'mage-eventpress' ), + 'desc' => __( 'Pleaase Type Event Hover Book Now Button Text . OtherWise It will be Book Now.', 'mage-eventpress' ), + 'type' => 'text', + 'default' => 'Book Now', + 'placeholder'=>'Book Now' + ) ) ), diff --git a/inc/mep_event_fw_meta.php b/inc/mep_event_fw_meta.php index 0ed96bd..6bf821c 100644 --- a/inc/mep_event_fw_meta.php +++ b/inc/mep_event_fw_meta.php @@ -127,6 +127,51 @@ function mep_fw_meta_boxs() + $list_thumb_meta_boxs = array( + 'page_nav' => __('Event List Thumbnail', 'mage-eventpress-gq'), + 'priority' => 10, + 'sections' => array( + 'section_2' => array( + 'title' => __('', 'mage-eventpress-gq'), + 'description' => __('', 'mage-eventpress-gq'), + 'options' => array( + + array( + 'id' => 'mep_list_thumbnail', + 'title' => __('Thumbmnail ','text-domain'), + 'details' => __('Please upload image for event list','text-domain'), + 'placeholder' => 'https://via.placeholder.com/1000x500', + 'type' => 'media', + ) + + + ) + ), + + ), + ); + $list_thumb_meta_args = array( + 'meta_box_id' => 'mep_event_list_thumbnail_meta_boxes', + 'meta_box_title' => __('Event List Thumbnail', 'mage-eventpress'), + //'callback' => '_meta_box_callback', + 'screen' => array('mep_events'), + 'context' => 'side', // 'normal', 'side', and 'advanced' + 'priority' => 'low', // 'high', 'low' + 'callback_args' => array(), + 'nav_position' => 'none', // right, top, left, none + 'item_name' => "MagePeople", + 'item_version' => "2.0", + 'panels' => array( + 'speakers_meta_boxs' => $list_thumb_meta_boxs + ), + ); + + new AddMetaBox( $list_thumb_meta_args ); + + + + + diff --git a/inc/mep_functions.php b/inc/mep_functions.php index 39c136d..630a0db 100755 --- a/inc/mep_functions.php +++ b/inc/mep_functions.php @@ -3349,4 +3349,22 @@ $args = array( $loop = new WP_Query($args); $count = $loop->post_count; return $count; +} + +function mep_get_list_thumbnail($event_id){ + + $thumbnail_id = get_post_meta($event_id,'mep_list_thumbnail',true) ? get_post_meta($event_id,'mep_list_thumbnail',true) : 0; + + +if($thumbnail_id > 0){ + // echo $thumbnail_id; + $thumbnail = wp_get_attachment_image_src($thumbnail_id,'full'); + + + ?> + + have_posts()) { $loop->the_post(); - if ($style == 'grid') { - if ($column == 2) { - $columnNumber = 'two_column'; - } elseif ($column == 3) { - $columnNumber = 'three_column'; - } elseif ($column == 4) { - $columnNumber = 'four_column'; - } else { - $columnNumber = 'two_column'; - } + if ($style == 'grid' && (int)$column>0) { + $columnNumber='column_style'; + $width=100/(int)$column; } else { $columnNumber = 'one_column'; + $width=100; } /** * This is the hook where Event Loop List fired from inc/template-parts/event_loop_list.php File */ - do_action('mep_event_list_shortcode', get_the_id(), $columnNumber, $style,$unq_id); + do_action('mep_event_list_shortcode', get_the_id(), $columnNumber, $style,$width,$unq_id); } wp_reset_postdata(); echo $time_line_div_end; @@ -305,23 +299,17 @@ function mep_expire_event_list($atts, $content = null) echo '