DTC in WebUI now handled via Websocket
This commit is contained in:
@@ -75,11 +75,11 @@
|
||||
</p>
|
||||
<!-- Div Group current Mode -->
|
||||
<!-- Div Group DTC Table -->
|
||||
<div %SHOW_DTC_TABLE%>
|
||||
<div id="dtc_container" hidden>
|
||||
<hr />
|
||||
<p>
|
||||
<h4>Fehlercodes</h4>
|
||||
<table class="table">
|
||||
<table class="table" id="dtc_table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="col-6" scope="col">Zeitstempel</th>
|
||||
@@ -87,7 +87,6 @@
|
||||
<th class="col-2" scope="col">Schwere</th>
|
||||
<th class="col-2" scope="col">Aktiv</th>
|
||||
</tr>
|
||||
%DTC_TABLE%
|
||||
</tbody>
|
||||
</table>
|
||||
</p>
|
||||
@@ -803,18 +802,10 @@
|
||||
nextSibling.innerText = fileName
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$("tr[data-dtc]").each(function (i) {
|
||||
$(this).attr('data-toggle', "modal");
|
||||
$(this).attr('data-target', "#dtcModal");
|
||||
});
|
||||
});
|
||||
|
||||
$('#dtcModal').on('show.bs.modal', function (event) {
|
||||
var dtctr = $(event.relatedTarget)
|
||||
var dtc = dtctr.data('dtc')
|
||||
var debugval = dtctr.data('debugval')
|
||||
var modal = $(this)
|
||||
$('table').on('click', 'tr[data-dtc]', function () {
|
||||
var dtc = $(this).data('dtc');
|
||||
var debugval = $(this).data('debugval');
|
||||
var modal = $('#dtcModal');
|
||||
|
||||
getDescriptionForDTCNumber(dtc, function (error, title, description) {
|
||||
if (error)
|
||||
@@ -837,6 +828,8 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
// Modal anzeigen
|
||||
modal.modal('show');
|
||||
});
|
||||
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user