laipower/wp-content/plugins/gp-premium/inc/legacy/assets/dashboard.js

49 lines
1.2 KiB
JavaScript
Raw Normal View History

jQuery( function( $ ) {
$( '#generate-select-all' ).on( 'click', function() {
2020-04-07 13:03:04 +00:00
if ( this.checked ) {
$( '.addon-checkbox:not(:disabled)' ).each( function() {
this.checked = true;
} );
2020-04-07 13:03:04 +00:00
} else {
$( '.addon-checkbox' ).each( function() {
this.checked = false;
} );
2020-04-07 13:03:04 +00:00
}
} );
$( '#generate_license_key_gp_premium' ).on( 'input', function() {
if ( '' !== $.trim( this.value ) ) {
$( '.beta-testing-container' ).show();
} else {
$( '.beta-testing-container' ).hide();
}
} );
$( 'input[name="generate_package_hooks_deactivate_package"]' ).on( 'click', function() {
// eslint-disable-next-line no-alert
2020-04-07 13:03:04 +00:00
var check = confirm( dashboard.deprecated_module );
if ( ! check ) {
return false;
}
} );
$( 'input[name="generate_package_page_header_deactivate_package"]' ).on( 'click', function() {
// eslint-disable-next-line no-alert
2020-04-07 13:03:04 +00:00
var check = confirm( dashboard.deprecated_module );
if ( ! check ) {
return false;
}
} );
$( 'input[name="generate_package_sections_deactivate_package"]' ).on( 'click', function() {
// eslint-disable-next-line no-alert
var check = confirm( dashboard.deprecated_module );
if ( ! check ) {
return false;
}
} );
} );