Skip to content

Commit

Permalink
Fix: Deprecated .click()
Browse files Browse the repository at this point in the history
  • Loading branch information
Dernerd committed Dec 24, 2023
1 parent a1e590b commit 3712ef5
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 14 deletions.
8 changes: 4 additions & 4 deletions includes/admin/ui/js/admin-product.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,15 @@ jQuery(document).ready(function($) {
//$( '.mp-admin-overlay' ).show();
$('#save-post').removeAttr('disabled');
//$( '#save-post' ).prop( 'disabled', false );
$('#save-post').click();
$('#save-post').trigger("click");
//mp_variation_message();
} else {

//$( '.mp-admin-overlay' ).show();
if (caller_id == 'mp_make_combinations') {
$('#publish').removeAttr('disabled');
//$( '#publish' ).prop( 'disabled', false );
$('#publish').click();
$('#publish').trigger("click");
}
//mp_variation_message();
}
Expand All @@ -249,7 +249,7 @@ jQuery(document).ready(function($) {

});

$('.mp-add-new-variation').click();
$('.mp-add-new-variation').trigger("click");

});
/* INLINE EDIT */
Expand Down Expand Up @@ -648,7 +648,7 @@ jQuery(document).ready(function($) {
save_inline_post_data($('[name="post_ID"]').val(), 'delete_variations', '', '');
setInterval(function() {
$('#publish').removeAttr('disabled');
$('#publish').click();
$('#publish').trigger("click");
}, 500);
}
return false;
Expand Down
4 changes: 2 additions & 2 deletions includes/admin/ui/js/mp-dashboard-widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ jQuery( document ).ready( function( $ ) {
if ( $( '#original_publish' ).val( ) == 'Publish' ) {
$( '#save-post' ).removeAttr( 'dasabled' );
//alert('published click!');
$( '#save-post' ).click( );
$( '#save-post' ).trigger("click");
}

if ( $( '#original_publish' ).val( ) == 'Update' ) {
$( '#publish' ).removeAttr( 'dasabled' );
$( '#publish' ).click( );
$( '#publish' ).trigger("click");
}
}

Expand Down
2 changes: 1 addition & 1 deletion includes/psource-metaboxes/ui/select2/select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ the specific language governing permissions and limitations under the Apache Lic

// some validation frameworks ignore the change event and listen instead to keyup, click for selects
// so here we trigger the click event manually
this.opts.element.click();
this.opts.element.trigger("click");

// ValidationEngine ignores the change event and listens instead to blur
// so here we trigger the blur event manually if so desired
Expand Down
2 changes: 1 addition & 1 deletion includes/psource-metaboxes/ui/select2/select2.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Halte Dich mit unserem [Newsletter](https://n3rds.work/webmasterservice-n3rdswor
* Fix: Deprecated .select()
* Fix: Deprecated .resize()
* Fix: Deprecated .hover()
* Fix: Deprecated .click()

= 3.5.6 =

Expand Down
2 changes: 1 addition & 1 deletion ui/colorpicker/js/jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -5438,7 +5438,7 @@ jQuery.event = {
// For checkbox, fire native event so checked state will be right
trigger: function() {
if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
this.click();
this.trigger("click");
return false;
}
},
Expand Down
4 changes: 2 additions & 2 deletions ui/js/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ var psecommerce = { };

$( 'body' ).on( 'click', '.mp_product_meta a.more-link', function( e ) {
e.preventDefault( );
// $( '#mp-single-product a.mp_product_tab_label_link.mp-product-overview' ).click( );
$( '.mp-single-product a.mp_product_tab_label_link.mp-product-overview' ).click( );
// $( '#mp-single-product a.mp_product_tab_label_link.mp-product-overview' ).trigger("click");
$( '.mp-single-product a.mp_product_tab_label_link.mp-product-overview' ).trigger("click");
$( 'html, body' ).animate( {
scrollTop: $( "a.mp_product_tab_label_link.mp-product-overview" ).offset( ).top - 30
}, 500 );
Expand Down
2 changes: 1 addition & 1 deletion ui/js/jquery.colorbox-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ui/select2/select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ the specific language governing permissions and limitations under the Apache Lic

// some validation frameworks ignore the change event and listen instead to keyup, click for selects
// so here we trigger the click event manually
this.opts.element.click();
this.opts.element.trigger("click");

// ValidationEngine ignores the change event and listens instead to blur
// so here we trigger the blur event manually if so desired
Expand Down
2 changes: 1 addition & 1 deletion ui/select2/select2.min.js

Large diffs are not rendered by default.

0 comments on commit 3712ef5

Please sign in to comment.