Skip to content

Commit

Permalink
Merge pull request #169 from codersaiful/3.0.8.0
Browse files Browse the repository at this point in the history
3.0.8.0
  • Loading branch information
codersaiful authored Dec 7, 2021
2 parents 0b33343 + 3d97fb8 commit 18c9705
Show file tree
Hide file tree
Showing 8 changed files with 177 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ on:
push:
branches:
- staging
name: 🚀 Deploy website on push
name: 🚀 Deploy when pusth to Staging branch
jobs:
web-deploy:
name: 🎉 Deploy
Expand Down
10 changes: 5 additions & 5 deletions admin/action-hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* and I have added a filter wpto_import_data to do something
* for import data
*
* @param type $wpt_imported_data
* @param type $post_id
* @param String $wpt_imported_data
* @param Int $post_id
*/
function wpt_importing_data( $wpt_imported_data, $post_id ){
$serialized_data = base64_decode( $wpt_imported_data );
Expand Down Expand Up @@ -176,13 +176,13 @@ function wpt_configure_basic_part( $settings,$current_config_value,$field_name )

<tr>
<th>
<label class="wpt_label wpt_user_rating_notice" for="wpt_table_head_enable"><?php esc_html_e( 'Disable Rating Notice', 'wpt_pro' );?></label>
<label class="wpt_label wpt_user_rating_notice" for="wpt_table_head_enable"><?php esc_html_e( 'Rating Notice', 'wpt_pro' );?></label>
</th>
<td>
<label class="switch">
<label class="switch switch-reverse">
<input name="data[disable_rating_notice]" type="checkbox" id="wpt_user_rating_notice" <?php echo isset( $current_config_value['disable_rating_notice'] ) ? 'checked="checked"' : ''; ?>>
<div class="slider round"><!--ADDED HTML -->
<span class="on">On</span><span class="off">Off</span><!--END-->
<span class="on">Disable</span><span class="off">Enable</span><!--END-->
</div>
</label>
<?php if( isset( $current_config_value['disable_rating_notice'] ) ){
Expand Down
2 changes: 1 addition & 1 deletion admin/configuration_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function ($field){
?>

<div class="section ultraaddons-button-wrapper ultraaddons-panel no-background">
<button type="submit" name="configure_submit" class="button-primary button-primary primary button"><?php esc_html_e( 'Save Change', 'wpt_pro' );?></button>
<button type="submit" name="configure_submit" class="button-primary button-primary primary button stick_on_scroll"><?php esc_html_e( 'Save Change', 'wpt_pro' );?></button>
<button type="submit" name="reset_button"
class="button button-default"
onclick="return confirm( 'If you continue with this action, you will reset all options in this page.\nAre you sure?' );"
Expand Down
33 changes: 0 additions & 33 deletions assets/css/admin-common.css
Original file line number Diff line number Diff line change
Expand Up @@ -400,39 +400,6 @@ h1.with-background.dark-background {}
font-size: 120%;
}

.wpt-export-import-wrapper {
padding: 0 18px 20px;
}

.wpt-export-import-wrapper label {
margin: 10px 0;
font-weight: 500;
display: inline-block;
font-size: 16px;
}

.wpt-export-button-wrapper button.wpt-import-button {
background-color: #007694;
font-size: 11px;
text-transform: uppercase;
font-weight: 700;
margin-top: 10px;
float: right;
}
.wpt-export-button-wrapper button.wpt-import-button:hover {
background-color: #375f6b;
}

.wpt-export-button-wrapper:before,
.wpt-export-button-wrapper:after {
content: "";
display: block;
clear: both;
}
body.wpt_admin_body .ultraaddons .warning {
color: #dd5500;
}

/* Responsive Design Starts */
@media screen and (max-width: 782px){
.ultraaddons .fieldwrap,
Expand Down
83 changes: 83 additions & 0 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -1369,4 +1369,87 @@ tr.user_can_not_edit:before {
content: "";
display: block;
clear: both;
}

/* For import export button*/

.wpt-export-import-wrapper {
padding: 0 18px 20px;
}

.wpt-export-import-wrapper label {
margin: 10px 0;
font-weight: 500;
display: inline-block;
font-size: 16px;
}

.wpt-export-button-wrapper button.wpt-import-button {
background-color: #007694;
font-size: 11px;
text-transform: uppercase;
font-weight: 700;
margin-top: 10px;
float: right;
}
.wpt-export-button-wrapper button.wpt-import-button:hover {
background-color: #375f6b;
}

.wpt-export-button-wrapper:before,
.wpt-export-button-wrapper:after {
content: "";
display: block;
clear: both;
}
body.wpt_admin_body .ultraaddons .warning {
color: #dd5500;
}



.ultraaddons .switch.switch-reverse .slider {
background: #2ab934a6;
border: 1px solid #2ab934 !important;
}
.ultraaddons .switch.switch-reverse .slider span.off {
color: white;
font-weight: normal;
}
.ultraaddons .switch.switch-reverse input:checked + .slider {
background-color: #c5c5c5a6!important;
border: 1px solid #a8b9a9!important;
}
.ultraaddons .switch.switch-reverse input:checked+ .slider .on {
display: block;
color: black;
font-weight: bold;
}
.ultraaddons .switch.switch-reverse .on, .ultraaddons .switch.switch-reverse .off {
transform: translate(-71%,-50%);
}

.stick_on_scroll#stick_on_scroll-on,.stick_on_scroll-on,#stick_on_scroll-on{
position: fixed;
bottom: 33px;
right: 50px;
box-shadow: 0px 10px 30px 0 #00000061;
padding: 18px 55px;
font-size: 22px;
font-weight: normal;
border-radius: 3px 12px 72px 12px;
/* background: #4caf50; */
/* border: 1px solid #3f9b43; */
z-index: 99999;
}

body.post-type-wpt_product_table .stick_on_scroll#stick_on_scroll-on,
body.post-type-wpt_product_table .stick_on_scroll-on,
body.post-type-wpt_product_table #stick_on_scroll-on {
bottom: 10px;
right: 10px;
padding: 6px 24px;
font-size: 17px;
font-weight: normal;
border-radius: 3px 8px 24px 7px;
}
42 changes: 42 additions & 0 deletions assets/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -813,4 +813,46 @@
},
});
}

var myHtml = '<div class="wrapper_wpt_ajax_update ultraaddons-button-wrapper">';
myHtml += '<button type="submit" name="wpt_post_submit" data-title="hello" class="stick_on_scroll button-primary button-primary primary button wpt_ajax_update">Save Change</button>';
myHtml += '</div>';
var colSetsLen = $('#column_settings').length;
if( colSetsLen > 0){
$('#wpt_configuration_form').append(myHtml);
}
$(window).on('scroll',function(){

let targetElement = $('.stick_on_scroll');


let bodyHeight = $('#wpbody').height();
let scrollTop = $(this).scrollTop();
let screenHeight = $(this).height();

let configFormElement = $('#wpt_configuration_form');
if(configFormElement.length < 1) return;

let conPass = bodyHeight - screenHeight - 300 - targetElement.height();
let leftWill = configFormElement.width() - targetElement.width() - 20;


targetElement.css({
left: leftWill,
right: 'unset'
});
if(scrollTop < conPass){
targetElement.attr('id','stick_on_scroll-on');
}else{
targetElement.removeAttr('id');
}

if(scrollTop > 100 && colSetsLen > 0){
targetElement.attr('id','stick_on_scroll-on');
}else if(colSetsLen > 0){
targetElement.removeAttr('id');
}


});
})(jQuery);
45 changes: 43 additions & 2 deletions includes/items/quoterequest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,48 @@
<?php

if( defined( 'YITH_YWRAQ_PREMIUM' ) ){
echo do_shortcode( '[yith_ywraq_button_quote product="' . $id . '"]' );
if( defined( 'YITH_YWRAQ_PREMIUM' ) && function_exists( 'yith_ywraq_render_button' ) ){

if ( ! wp_script_is( 'enqueued', 'yith_ywraq_frontend' ) ) {
wp_enqueue_style( 'yith_ywraq_frontend' );
}
$atts = array( 'product' => $id );
$args = shortcode_atts(
array(
'product' => false,
'label' => get_option( 'ywraq_show_btn_link_text', __( 'Add to quote', 'yith-woocommerce-request-a-quote' ) ),
'style' => ( get_option( 'ywraq_show_btn_link' ) === 'button' ) ? 'button' : 'ywraq-link',
'colors' => get_option(
'ywraq_add_to_quote_button_color',
array(
'bg_color' => '#0066b4',
'bg_color_hover' => '#044a80',
'color' => '#ffffff',
'color_hover' => '#ffffff',
)
),
'icon' => 0,

),
$atts
);

if ( 'button' === $args['style'] ) {
if ( isset( $atts['bg_color'] ) ) {
$args['colors']['bg_color'] = $atts['bg_color'];
}
if ( isset( $atts['bg_color_hover'] ) ) {
$args['colors']['bg_color_hover'] = $atts['bg_color_hover'];
}
if ( isset( $atts['color'] ) ) {
$args['colors']['color'] = $atts['color'];
}

if ( isset( $atts['color_hover'] ) ) {
$args['colors']['color_hover'] = $atts['color_hover'];
}
}
yith_ywraq_render_button( $args['product'], $args );

return;
}
$wpt_nonce = wp_create_nonce( 'add-request-quote-' . $data['id'] );
Expand Down
4 changes: 2 additions & 2 deletions woo-product-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
}

if( !defined( 'WPT_PLUGIN' ) ){
define( 'WPT_PLUGIN', 'woo-product-table/woo-product-table.php' );
define( 'WPT_PLUGIN', plugin_basename( __FILE__ ) ); //'woo-product-table/woo-product-table.php'
}


if( !defined( 'WPT_PLUGIN_BASE_FILE' ) ){
define( 'WPT_PLUGIN_BASE_FILE', plugin_basename( __FILE__ ) );
define( 'WPT_PLUGIN_BASE_FILE', plugin_basename( __FILE__ ) ); //'woo-product-table/woo-product-table.php' )
}

if( !defined( 'WPT_BASE_URL' ) ){
Expand Down

0 comments on commit 18c9705

Please sign in to comment.