diff --git a/Layout/default/TimerecordingCar/Detail.php b/Layout/default/TimerecordingCar/Detail.php index 85f6974e4..ed15194c4 100644 --- a/Layout/default/TimerecordingCar/Detail.php +++ b/Layout/default/TimerecordingCar/Detail.php @@ -39,6 +39,19 @@ if ($timerecordingcar->mileage_now && $timerecordingcar->mileage_timestamp) { color: #218200; opacity: 0.7; } + .del-journal + { + cursor: pointer; + position: absolute; + right: 5px; + top: 5px; + z-index: 2000; + } + .del-mileage-history + { + cursor: pointer; + z-index: 2000; + }
@@ -178,8 +191,8 @@ if ($timerecordingcar->mileage_now && $timerecordingcar->mileage_timestamp) { mileage ?> KM - (mileage_timestamp) ?> - ) + (mileage_timestamp) ?>) + mileage_now && $timerecordingcar->mileage_timestamp) {
-
+ +
timestamp) ?> @@ -392,6 +406,36 @@ if ($timerecordingcar->mileage_now && $timerecordingcar->mileage_timestamp) { } }); + $('body').on('click', '.del-journal', function () { + var id = $(this).data("id"); + var thisis = $(this); + if (!confirm("Journaleintrag wirklich löschen?")) { + return false; + } + $.ajax({ + url: "'deleteJournal']) ?>", + type: "POST", + data: {id: id}, + success: function (data) { + thisis.closest("div").remove(); + } + }); + }); + $('body').on('click', '.del-mileage-history', function () { + var id = $(this).data("id"); + var thisis = $(this); + if (!confirm("Kilometerstand wirklich löschen?")) { + return false; + } + $.ajax({ + url: "'deleteMilageHistory']) ?>", + type: "POST", + data: {id: id}, + success: function (data) { + thisis.closest("tr").remove(); + } + }); + }); });