38 lines
995 B
HTML
38 lines
995 B
HTML
<f:asset.script identifier="loadspieltage">
|
|
|
|
function ladeSpieltage(){
|
|
$.ajax({
|
|
url: "../index.php",
|
|
type: "GET",
|
|
data: {
|
|
application: "loadspieltage",
|
|
tournament: $( "#tournament" ).val()
|
|
},
|
|
dataType : "json"
|
|
})
|
|
.done(function( response ) {
|
|
$("#grid_ergebnisse").jsGrid({ data: '' });
|
|
$("#grid_punkte").jsGrid({ data: '' });
|
|
$('#story_text').html('');
|
|
|
|
|
|
myChart.data = [];
|
|
myChart.update();
|
|
|
|
var $select = $('#spieltagselect');
|
|
$select.find('option').remove();
|
|
$.each(response, function(key, value) {
|
|
$select.append(`<option value="${value.id}">${value.name}</option>`);
|
|
});
|
|
})
|
|
}
|
|
</f:asset.script>
|
|
|
|
<f:form.select id="tournament"
|
|
name="tournament"
|
|
options="{tournaments}"
|
|
optionValueField="id"
|
|
optionLabelField="name"
|
|
additionalAttributes="{onchange: 'ladeSpieltage();'}"
|
|
value="{active_tournaments}" />
|