Change row inputs to readonly when checkbox is checked
This commit is contained in:
@@ -181,7 +181,7 @@ if ( ! function_exists( 'sp_data_table' ) ) {
|
||||
if ( !is_array( $data ) )
|
||||
$data = array();
|
||||
?>
|
||||
<table class="widefat">
|
||||
<table class="widefat sp-stats-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php foreach ( $columns as $column ): ?>
|
||||
|
||||
@@ -20,6 +20,11 @@ jQuery(document).ready(function($){
|
||||
// Activate tab filters
|
||||
$('.sp-tab-panel').siblings('.sp-tab-select').find('select').change();
|
||||
|
||||
// Stats table checkboxes
|
||||
$('.sp-stats-table tr input[type=checkbox]').change(function() {
|
||||
$(this).closest('tr').find('input[type=text], input[type=number]').prop('readonly', $(this).prop('checked'));
|
||||
})
|
||||
|
||||
// Change title
|
||||
$('.sp-title-generator select').change(function() {
|
||||
title = $('.sp-title-generator select[value!=0]').map(function(){
|
||||
|
||||
Reference in New Issue
Block a user