diff --git a/app/views/resources/booking/_add_edit_form.php b/app/views/resources/booking/_add_edit_form.php index bd02f0a60635df6b6c96037593e730c9c02336fd..0c87272ca2e0ab4d5d07cb4383c103e2923458af 100644 --- a/app/views/resources/booking/_add_edit_form.php +++ b/app/views/resources/booking/_add_edit_form.php @@ -561,29 +561,25 @@ <? endif ?> </td> <td class="booking-list-interval-actions"> - <a class="takes-place-delete takes-place-status-toggle - <?= $interval->takes_place ? '' : ' invisible'; ?> - " - data-interval_id="<?= htmlReady($interval->id) ?>"> + <button class="takes-place-delete takes-place-status-toggle <?= $interval->takes_place ? '' : ' invisible'; ?>" + data-interval_id="<?= htmlReady($interval->id) ?>"> <?= Icon::create('trash')->asImg( [ 'class' => 'text-bottom', 'title' => _('löschen') ] ) ?> - </a> + </button> - <a class="takes-place-revive takes-place-status-toggle - <?= $interval->takes_place ? ' invisible' : ''; ?> - " - data-interval_id="<?= htmlReady($interval->id) ?>"> + <button class="takes-place-revive takes-place-status-toggle <?= $interval->takes_place ? ' invisible' : ''; ?>" + data-interval_id="<?= htmlReady($interval->id) ?>"> <?= Icon::create('trash+decline')->asImg( [ 'class' => 'text-bottom', 'title' => _('wiederherstellen') ] ) ?> - </a> + </button> </td> </tr> <? endforeach ?> diff --git a/resources/assets/javascripts/bootstrap/resources.js b/resources/assets/javascripts/bootstrap/resources.js index 33749287830774519b97b4cd348c4fe63d3f7070..ebbc9c389a4d69606e51d79cb8cbb6d65b6b79c7 100644 --- a/resources/assets/javascripts/bootstrap/resources.js +++ b/resources/assets/javascripts/bootstrap/resources.js @@ -81,12 +81,6 @@ STUDIP.ready(function () { } } - jQuery(document).on( - 'click', - '.booking-list-interval .takes-place-status-toggle', - STUDIP.Resources.toggleBookingIntervalStatus - ); - jQuery(document).on( 'click', '.resource-category-properties-table .add-action', @@ -879,6 +873,12 @@ STUDIP.ready(function () { STUDIP.domReady(function() { + jQuery(document).on( + 'click', + '.booking-list-interval .takes-place-status-toggle', + STUDIP.Resources.toggleBookingIntervalStatus + ); + jQuery(document).on( 'click', '.room-clipboard-group-action', diff --git a/resources/assets/javascripts/lib/resources.js b/resources/assets/javascripts/lib/resources.js index 78b913b549966203258237d0e15d0ee9db4b11f4..fd40b21705a110cfcf26df30156afdc88a5d8ee4 100644 --- a/resources/assets/javascripts/lib/resources.js +++ b/resources/assets/javascripts/lib/resources.js @@ -485,6 +485,7 @@ class Resources static toggleBookingIntervalStatus(event) { + event.preventDefault(); var li = jQuery(event.target).parents('tr')[0]; if (!li) { //Something is wrong with the HTML. diff --git a/resources/assets/stylesheets/scss/resources.scss b/resources/assets/stylesheets/scss/resources.scss index c7e5d4bae792f72f2ce64d9f245ab542c1cff8e6..5fa6df5ee6efebf6b26e6a4f8f7be97443ba1f31 100644 --- a/resources/assets/stylesheets/scss/resources.scss +++ b/resources/assets/stylesheets/scss/resources.scss @@ -521,3 +521,9 @@ form#resolve-request, form#decline-request { padding-bottom: 10px; } } + + +button.takes-place-status-toggle { + border: none; + background: none; +}