Files
dotter_t3/packages/watten/Resources/Private/Partials/GridErgebnisse.html
T
2026-10-18 17:49:22 +02:00

99 lines
5.1 KiB
HTML

<style>
#grid_ergebnisse td,
#grid_ergebnisse th {
width: 100px !important
}
</style>
<f:asset.script identifier="watterergebnisse">
var bum1 = '<td><img src="typo3conf/ext/watten/Resources/Public/Icons/Bum.svg" class="iconsizesm"></td>';
var bum2 = '<td><img src="typo3conf/ext/watten/Resources/Public/Icons/Bum.svg" class="iconsizesm"><img src="typo3conf/ext/watten/Resources/Public/Icons/Bum.svg" class="iconsizesm"></td>';
var bum4 = '<td><img src="typo3conf/ext/watten/Resources/Public/Icons/Bum.svg" class="iconsizesm"><img src="typo3conf/ext/watten/Resources/Public/Icons/Bum.svg" class="iconsizesm"><img src="typo3conf/ext/watten/Resources/Public/Icons/Bum.svg" class="iconsizesm"><img src="typo3conf/ext/watten/Resources/Public/Icons/Bum.svg" class="iconsizesm"></td>';
function markName(classname) {
$('.athlet ').css('color', '#ddd');
$('.athlet ').css('font-weight', 'normal');
$('td.'+classname).css('color', '#CC7B2E');
$('td.'+classname).css('font-weight', 'bold');
}
$("#grid_ergebnisse").jsGrid({
height: "auto",
width: "100%",
heading: true,
filtering: false,
inserting: false,
editing: false,
selecting: true,
sorting: true,
paging: false,
pageLoading: false,
noDataContent: '&nbsp;Spieltag wählen&nbsp;',
loadIndication: true,
loadIndicationDelay: 500,
loadMessage: "&nbsp;Bitte, warten...&nbsp;",
loadShading: true,
fields: [
{ title: '<img src="typo3conf/ext/watten/Resources/Public/Icons/Hashtag.svg" class="iconsize"><div class="xsmall">Spiel Nummer</div>', name: "uid", type: "text" },
{ title: '<img src="typo3conf/ext/watten/Resources/Public/Icons/Thump-up.svg" class="iconsize"><div class="xsmall">Sieger</div>', name: "s1", type: "text", css:"pointer", cellRenderer: function (item, value) { let v = value.s1; return '<td class="athlet ' + v + '" onClick="markName(\'' + v + '\')">' + v + '</td>'; }},
{ title: '<img src="typo3conf/ext/watten/Resources/Public/Icons/Thump-up.svg" class="iconsize"><div class="xsmall">Sieger</div>', name: "s2", type: "text", css:"pointer", cellRenderer: function (item, value) { let v = value.s2; return '<td class="athlet ' + v + '" onClick="markName(\'' + v + '\')">' + v + '</td>'; }},
{ title: '<img src="typo3conf/ext/watten/Resources/Public/Icons/Thump-down.svg" class="iconsize"><div class="xsmall">Verlierer</div>', name: "v1", type: "text", css:"pointer", cellRenderer: function (item, value) { let v = value.v1; return '<td class="athlet ' + v + '" onClick="markName(\'' + v + '\')">' + v + '</td>'; }},
{ title: '<img src="typo3conf/ext/watten/Resources/Public/Icons/Thump-down.svg" class="iconsize"><div class="xsmall">Verlierer</div>', name: "v2", type: "text", css:"pointer", cellRenderer: function (item, value) { let v = value.v2; return '<td class="athlet ' + v + '" onClick="markName(\'' + v + '\')">' + v + '</td>'; }},
{ title: '<img src="typo3conf/ext/watten/Resources/Public/Icons/Bold.svg" class="iconsize"><div class="xsmall">Bummale</div>', name: "bumid", type: "text", cellRenderer: function(item, value){ if(item==1) return bum1; else if(item==2) return bum2; else return bum4; }},
{ title: '<img src="typo3conf/ext/watten/Resources/Public/Icons/Gstrichen.svg" class="iconsize"><div class="xsmall">Gstr/Gstr</div>', name: "gs", type: "text"}
]
});
$("#grid_punkte").jsGrid({
height: "auto",
width: "50%",
heading: true,
filtering: false,
inserting: false,
editing: false,
selecting: true,
sorting: true,
paging: false,
pageLoading: false,
noDataContent: '&nbsp;Spieltag wählen&nbsp;',
loadIndication: true,
loadIndicationDelay: 500,
loadMessage: "&nbsp;Bitte, warten...&nbsp;",
loadShading: true,
fields: [
{ title: '<img src="typo3conf/ext/watten/Resources/Public/Icons/Rank.svg" class="iconsize"><div class="xsmall">Platzierung</div>', name: "rang", type: "text", width: "100" },
{ title: '<img src="typo3conf/ext/watten/Resources/Public/Icons/User.svg" class="iconsize"><div class="xsmall">Athlet</div>', name: "name", type: "text", width: "200" },
{ title: '<img src="typo3conf/ext/watten/Resources/Public/Icons/Hashtag.svg" class="iconsize"><div class="xsmall">Punkte</div>', name: "punkte", type: "text", width: "100" },
]
});
$(function() {
$.ajax({
url: "../index.php",
type: "GET",
data: {
application: "loadspieltag",
event_id: $( "#spieltagselect" ).val()
},
dataType : "json"
})
.done(function( response ) {
$('#story_text').html(response.story);
$("#grid_ergebnisse").jsGrid({ data: response.data });
$("#grid_punkte").jsGrid({ data: response.punkte });
})
});
</f:asset.script>
<div id="story_text" style="padding:1rem 5rem;"></div>
<div id="grid_ergebnisse" class="pure-table"></div>
<br><br>
<h1 class="element-header text-center"><span>Punkte Spieltag</span></h1>
<div id="grid_punkte" class="pure-table" style="margin:auto;"></div>