Change row inputs to readonly when checkbox is checked

This commit is contained in:
Takumi
2013-07-30 00:39:32 +10:00
parent a7873b7673
commit e91952f8c5
2 changed files with 6 additions and 1 deletions

View File

@@ -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 ): ?>

View File

@@ -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(){