Skip to content

Commit

Permalink
joomla 4
Browse files Browse the repository at this point in the history
  • Loading branch information
diddipoeler committed Mar 24, 2023
1 parent f1aad40 commit 163e56a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
40 changes: 39 additions & 1 deletion admin/views/clubs/tmpl/default_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,43 @@
}
}
?>
<script>
var last_value;
var current_value;
var attribute_cbnummer;
var id_cbnummer;

jQuery(document).on("click","select",function(){
last_value = $(this).val();
attribute_cbnummer = $(this).attr('cbnummer');
id_cbnummer = $(this).attr('id');

}).on("change","select",function(){
current_value = $(this).val();

console.log('last value - '+last_value);
console.log('current value - '+current_value);
console.log('attribute_cbnummer - '+attribute_cbnummer);
console.log('id_cbnummer - '+id_cbnummer);

if ( last_value != current_value )
{
console.log('geändert');
//jQuery("." + attribute_cbnummer).prop('checked', true);
//attribute_cbnummer.prop('checked', true);
//document.getElementById(attribute_cbnummer).checked = true;
jQuery( "#"+ attribute_cbnummer ).prop( "checked", true );
}
else
{
console.log('keine änderung');
}
});

</script>



<div class="table-responsive" id="editcell">
<table class="<?php echo $this->table_data_class; ?>" id="<?php echo $this->view; ?>list">
<thead>
Expand Down Expand Up @@ -319,7 +356,8 @@
</td>
<td class="center">
<?php
$append = ' onchange="document.getElementById(\'cb' . $this->count_i . '\').checked=true" style="background-color:#bbffff"';
//$append = ' onchange="document.getElementById(\'cb' . $this->count_i . '\').checked=true" style="background-color:#bbffff"';
$append = ' style="background-color:#bbffff"';
echo HTMLHelper::_(
'select.genericlist', $this->lists['nation'], 'country' . $this->item->id,
'class="form-control form-control-inline" size="1"' . $append, 'value', 'text', $this->item->country
Expand Down
8 changes: 7 additions & 1 deletion admin/views/players/tmpl/default_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,28 @@
var last_value;
var current_value;
var attribute_cbnummer;
var id_cbnummer;

jQuery(document).on("click","select",function(){
last_value = $(this).val();
attribute_cbnummer = $(this).attr('cbnummer');
id_cbnummer = $(this).attr('id');

}).on("change","select",function(){
current_value = $(this).val();

console.log('last value - '+last_value);
console.log('current value - '+current_value);
console.log('attribute_cbnummer - '+attribute_cbnummer);
console.log('id_cbnummer - '+id_cbnummer);

if ( last_value != current_value )
{
console.log('geändert');

//jQuery("." + attribute_cbnummer).prop('checked', true);
//attribute_cbnummer.prop('checked', true);
//document.getElementById(attribute_cbnummer).checked = true;
jQuery( "#"+ attribute_cbnummer ).prop( "checked", true );
}
else
{
Expand Down

0 comments on commit 163e56a

Please sign in to comment.