Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.2.3.1 #233

Merged
merged 14 commits into from
Aug 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion admin/tabs/query.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@
</td>
</tr>

<tr>
<tr id="wpt_meta_value_wrapper">
<th>
<label class="wpt_label" for="wpt_product_meta_value_sort"><?php echo sprintf( esc_html__( 'Meta Value for [Custom Meta Value] of %s Custom Meta Value %s', 'wpt_pro' ),'<b>','</b>' ); ?></label>
</th>
Expand Down
2 changes: 1 addition & 1 deletion assets/css/admin-common.css
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ h1.with-background.dark-background {}
.ultraaddons-panel table tr th label{font-weight: 400;text-shadow: -1px 0 0px #0572a982;font-size: 17px;}
.ultraaddons-panel table tr th,
.ultraaddons-panel table tr td{
padding: 6px 0 16px 0;
padding: 7px 10px;
vertical-align: text-bottom;
}

Expand Down
34 changes: 29 additions & 5 deletions assets/css/universal.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ div.wpt_product_table_wrapper input[type=radio]:disabled+label:before {
}

div.wpt_product_table_wrapper input[type=radio]:checked+label:after {
content: '';
content: '●';
color: #fff;
top: 0px;
font-size: 20px;
Expand Down Expand Up @@ -1063,7 +1063,8 @@ div.wpt-footer-cart-wrapper.always_hide{display: none;}
text-align: center;
width: 100%;
display: block;
padding-top: 35%;
padding-top: calc(50% - 8px);
height: 100%;
}
.wpt-footer-cart-wrapper > a:after {
content: "";
Expand Down Expand Up @@ -1824,10 +1825,10 @@ input[type="submit"].loading::after,
.added_to_cart.loading::after {
-webkit-font-smoothing: antialiased;
font-style: normal;
font-family: "Font Awesome 5 Free";

font-weight: 900;
vertical-align: baseline;
content: "";

height: 20px;
width: 20px;
line-height: 20px;
Expand Down Expand Up @@ -1985,4 +1986,27 @@ select.search_select.cascade-filtering {
margin-left: 0px !important;
margin-bottom: 10px;
}

span.preview_info {
position: relative;
display: inline-block;
padding: 10px;
color: #fff;
background: #0a7f9c;
padding-left: 30px;
}
span.preview_info:before{
font-family:dashicons;
content: "\f14c";
position:absolute;
left: 7px;
}
.wpt_edit_table > a {
position: relative;
padding-left: 30px;
}
.wpt_edit_table > a::before {
font-family:dashicons;
content: "\f464";
position:absolute;
left: 7px;
}
11 changes: 7 additions & 4 deletions assets/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,25 +317,28 @@ jQuery.fn.extend({
/**************Admin Panel's Setting Tab End Here****************/

/*********Columns , meta sorting orders and mobile checkbox controlling start here************/
/**
/**
* If chose Custom Meta value than
* Custom meta value's input field will be visible
* Otherise, By default, It stay hidden
*/
$("#wpt_meta_value_wrapper").hide();
$('body.wpt_admin_body').on('change','#wpt_table_sort_order_by',function(){
var current_val = $(this).val();
if(current_val === 'meta_value' || current_val === 'meta_value_num'){
$("#wpt_meta_value_wrapper").fadeIn();
$("#wpt_meta_value_wrapper").css('background','#f0f0f1');
$("#wpt_meta_value_wrapper").show('slow');

}else{
$("#wpt_meta_value_wrapper").fadeOut();
$("#wpt_meta_value_wrapper").hide('slow');
}
});

var wpt_table_sort_order_by = $('#wpt_table_sort_order_by').val();
if(wpt_table_sort_order_by === 'meta_value' || wpt_table_sort_order_by === 'meta_value_num'){
$("#wpt_meta_value_wrapper").fadeIn();
}

/**
* On of Element based on Selected Value for Select Tag
* Add an Attribute data-on="yes|.wpt_snf_on_off" or
Expand Down
108 changes: 32 additions & 76 deletions assets/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,7 @@ jQuery(function($) {
*/
function WPT_MiniCart(){
var minicart_type = $('div.tables_cart_message_box').attr('data-type');
if(typeof minicart_type === 'undefined'){
return;
}

$.ajax({
type: 'POST',
url: ajax_url,
Expand All @@ -335,6 +333,9 @@ jQuery(function($) {
success: function(response){

setFragmentsRefresh( response );
if(typeof minicart_type === 'undefined'){
return;
}
if(typeof minicart_type !== 'undefined'){
var cart_hash = response.cart_hash;
var fragments = response.fragments;
Expand Down Expand Up @@ -508,7 +509,7 @@ jQuery(function($) {
e.preventDefault();
var temp_number = $(this).closest( '.wpt_action' ).data('temp_number');
config_json = getConfig_json( temp_number );
alert(config_json.sorry_out_of_stock);
showAlert(config_json.sorry_out_of_stock);
return false;
});

Expand Down Expand Up @@ -687,11 +688,21 @@ jQuery(function($) {
});
});

function showAlert(alertMessage){
if(typeof alertMessage == 'string'){
var tempMsg = alertMessage.trim();
if(tempMsg.length !== 0){
alert(alertMessage);
}
}else{
console.log("You have inserted " + typeof alertMessage + " Variable. But should be a String.");
}
}
$('body').on('click', 'a.wpt_variation_product.single_add_to_cart_button.button.disabled,a.disabled.yith_add_to_quote_request.button', function(e) {
e.preventDefault();
var temp_number = $(this).closest( '.wpt_action' ).data('temp_number');
config_json = getConfig_json( temp_number );
alert(config_json.no_right_combination);
showAlert(config_json.no_right_combination);
return false;

});
Expand All @@ -701,7 +712,7 @@ jQuery(function($) {
e.preventDefault();
var temp_number = $(this).closest( '.wpt_action' ).data('temp_number');
config_json = getConfig_json( temp_number ); //Added vat V5.0
alert(config_json.adding_in_progress);
showAlert(config_json.adding_in_progress);
return false;

});
Expand Down Expand Up @@ -1090,7 +1101,7 @@ jQuery(function($) {
e.preventDefault();
var temp_number = $(this).data('temp_number');
config_json = getConfig_json( temp_number ); //Added vat V5.0
alert(config_json.sorry_plz_right_combination);
showAlert(config_json.sorry_plz_right_combination);
return false;
});

Expand Down Expand Up @@ -1169,7 +1180,7 @@ jQuery(function($) {
currentAllSelectedButtonSelector.removeClass('disabled');
currentAllSelectedButtonSelector.removeClass('loading');
tableWrapperTag.removeClass('loading-table');
alert(config_json.please_choose_items);
showAlert(config_json.please_choose_items);
return false;
}

Expand Down Expand Up @@ -1587,7 +1598,7 @@ jQuery(function($) {
}else{
$('#wpt_load_more_wrapper_' + temp_number).remove();
targetTable.removeClass('wpt_overflow_hiddent');
alert(config_json.no_more_query_message);//"There is no more products based on current Query."
showAlert(config_json.no_more_query_message);//"There is no more products based on current Query."
}

}
Expand Down Expand Up @@ -1663,11 +1674,11 @@ jQuery(function($) {
thisPagiWrappers.html(paginate_data);
changeSpanToAPagi();
var newjsonData = $('#table_id_' + temp_number + ' mypagi').attr('myjson');
var thisNewPagiWrappers = $('#table_id_' + temp_number + ' .wpt_table_pagination').attr('data-whole_data');
thisNewPagiWrappers = JSON.parse(thisNewPagiWrappers);
thisNewPagiWrappers = thisNewPagiWrappers.targetTableArgs;
// console.log('newjsonData',JSON.parse(newjsonData));
// console.log('thisNewPagiWrappers',thisNewPagiWrappers);
// var thisNewPagiWrappers = $('#table_id_' + temp_number + ' .wpt_table_pagination').attr('data-whole_data');

// thisNewPagiWrappers = JSON.parse(thisNewPagiWrappers);
// thisNewPagiWrappers = thisNewPagiWrappers.targetTableArgs;

targetTable.attr( 'data-data_json', newjsonData );
thisPagiWrappers.removeClass('pagination_loading');
}
Expand Down Expand Up @@ -1985,7 +1996,7 @@ jQuery(function($) {
var type = $(this).closest('tr.wpt_row').data('type')

if(type !== 'variable' && response_msg !== ''){
alert(response_msg);
showAlert(response_msg);
$('.' + selector).html(msg.added);
return false;
}
Expand Down Expand Up @@ -2046,17 +2057,15 @@ jQuery(function($) {
//}
$('.' + selector).attr('data-response_msg',response.message);
var html;
//$('.wpt_quoterequest img').remove();
//$('.' + selector + '+.yith_ywraq_add_item_browse_message').remove();
//$('.' + selector + '+.yith_ywraq_add_item_response_message').remove();

html = '<div class="yith_ywraq_add_item_response_message">' + response.message + '</div>';
html += '<a class="yith_browse_link" href="'+response.rqa_url+'" target="_blank">' + yith_browse_list + '</a>';

$('.' + selector).parent().append( html ).show(); //response.label_browse
}else{
$('.' + selector).html(msg.added);
}
//thisButton.parent().show(); //New added at 4.0.19

}
});
});
Expand Down Expand Up @@ -2101,12 +2110,10 @@ jQuery(function($) {

if(config_json.sort_mini_filter === 'ASC'){
taxArray.sort();
//taxArray.sort(function(a,b){return a-b});

}else if(config_json.sort_mini_filter === 'DESC'){
taxArray.sort();
taxArray.reverse();

//taxArray.sort(function(a,b){return b-a});
}

var html = '<option value="">' + label + '</option>';
Expand Down Expand Up @@ -2153,13 +2160,6 @@ jQuery(function($) {
var thisColObject = $(this);
var status = false;
var disableClass = [
// '.wpt_product_id',
// '.wpt_thumbnails',
// '.wpt_quick',
// '.wpt_message',
// '.wpt_serial_number',
// '.wpt_quoterequest',
// '.wpt_action',
'.wpt_quantity',
'.wpt_check',
];
Expand Down Expand Up @@ -2282,23 +2282,7 @@ jQuery(function($) {
}
}
// Removing link feature End here */


















/*
* Start code for Advance Version
* Version: 5.3
Expand Down Expand Up @@ -2492,7 +2476,6 @@ jQuery(function($) {
products: products_data,
},
complete: function(){
//alert('complete');
$( document ).trigger( 'wc_fragments_refreshed' );
},
success: function( response ) {
Expand Down Expand Up @@ -2548,7 +2531,7 @@ jQuery(function($) {
if (itemAmount < 1) {
currentAllSelectedButtonSelector.removeClass('disabled');
currentAllSelectedButtonSelector.removeClass('loading');
alert(config_json.please_choose_items);
showAlert(config_json.please_choose_items);
return false;
}
currentAllSelectedButtonSelector.removeClass('disabled');
Expand Down Expand Up @@ -2658,33 +2641,7 @@ jQuery(function($) {
targetThumbs.attr('data-variation_id', variation.variation_id);

});


//$(document).on('submit','table.advance_table.wpt_product_table form',function(e){ //div.advance_table_wrapper table.advance_table.wpt_product_table




/**
* Sticky Header Feature to be enable
$(".wpt_product_table").floatThead({
scrollingTop:50,
position: 'fixed',
zIndex: 989898989,
});
*/















$('.wpt_product_table_wrapper').each(function(){
Expand Down Expand Up @@ -2734,7 +2691,6 @@ jQuery(function($) {

htmlImg = ""; //wpt_for_thumbs_desc

//htmlDesc += "<div class='wpt_mobile_desc_part'>";
$(this).children('td.wpt_for_thumbs_desc').each(function(){
var attr = "";
$.each(this.attributes, function() {
Expand Down
1 change: 1 addition & 0 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1537,6 +1537,7 @@ function wpt_product_table_preview_template( $template_file ){
}
add_filter( 'template_include', 'wpt_product_table_preview_template' );


/**
* for action.php inside items
*
Expand Down
5 changes: 3 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ if( !function_exists( 'temp_file_for_new_shortcode' ) ){
return $file;
}
}
add_filter( 'wpto_template_loc_item_new_shortcode', 'temp_file_for_new_shortcode', 10 );
add_filter( 'wpto_template_loc_item_{new_shortcode}', 'temp_file_for_new_shortcode', 10 );
```
Here {new_shortcode} is column's keyword. it's dynamic and changeable based on your column name/keyword.

## Example File code(my_shortcode.php)
```php
Expand Down Expand Up @@ -111,4 +112,4 @@ function wpt_custom_extra_label_change( $label, $id ){
return $label;
}
add_filter( 'wpt_extra_label_text', 'wpt_custom_extra_label_change', 10, 2 );
```
```
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ You can easily show specific category products. While creating new table click o
= 3.2.4 =
* Bug Fixed: Pagination saving issue fixed
* Bug Fixed: Instance Search updated
* Changed: WPML area for Tab's String has transferred to Option Tab.


= 3.2.3 =
Expand Down
Loading