Skip to content
Snippets Groups Projects
Commit ac1a34c7 authored by Moritz Strohm's avatar Moritz Strohm
Browse files

fixed error when deleting booking interval from a booking with repetitions, closes #704

Closes #704

Merge request studip/studip!886
parent 54eeb33b
No related branches found
No related tags found
No related merge requests found
...@@ -561,9 +561,7 @@ ...@@ -561,9 +561,7 @@
<? endif ?> <? endif ?>
</td> </td>
<td class="booking-list-interval-actions"> <td class="booking-list-interval-actions">
<a class="takes-place-delete takes-place-status-toggle <button class="takes-place-delete takes-place-status-toggle <?= $interval->takes_place ? '' : ' invisible'; ?>"
<?= $interval->takes_place ? '' : ' invisible'; ?>
"
data-interval_id="<?= htmlReady($interval->id) ?>"> data-interval_id="<?= htmlReady($interval->id) ?>">
<?= Icon::create('trash')->asImg( <?= Icon::create('trash')->asImg(
[ [
...@@ -571,11 +569,9 @@ ...@@ -571,11 +569,9 @@
'title' => _('löschen') 'title' => _('löschen')
] ]
) ?> ) ?>
</a> </button>
<a class="takes-place-revive takes-place-status-toggle <button class="takes-place-revive takes-place-status-toggle <?= $interval->takes_place ? ' invisible' : ''; ?>"
<?= $interval->takes_place ? ' invisible' : ''; ?>
"
data-interval_id="<?= htmlReady($interval->id) ?>"> data-interval_id="<?= htmlReady($interval->id) ?>">
<?= Icon::create('refresh')->asImg( <?= Icon::create('refresh')->asImg(
[ [
...@@ -583,7 +579,7 @@ ...@@ -583,7 +579,7 @@
'title' => _('wiederherstellen') 'title' => _('wiederherstellen')
] ]
) ?> ) ?>
</a> </button>
</td> </td>
</tr> </tr>
<? endforeach ?> <? endforeach ?>
......
...@@ -81,12 +81,6 @@ STUDIP.ready(function () { ...@@ -81,12 +81,6 @@ STUDIP.ready(function () {
} }
} }
jQuery(document).on(
'click',
'.booking-list-interval .takes-place-status-toggle',
STUDIP.Resources.toggleBookingIntervalStatus
);
jQuery(document).on( jQuery(document).on(
'click', 'click',
'.resource-category-properties-table .add-action', '.resource-category-properties-table .add-action',
...@@ -879,6 +873,12 @@ STUDIP.ready(function () { ...@@ -879,6 +873,12 @@ STUDIP.ready(function () {
STUDIP.domReady(function() { STUDIP.domReady(function() {
jQuery(document).on(
'click',
'.booking-list-interval .takes-place-status-toggle',
STUDIP.Resources.toggleBookingIntervalStatus
);
jQuery(document).on( jQuery(document).on(
'click', 'click',
'.room-clipboard-group-action', '.room-clipboard-group-action',
......
...@@ -485,6 +485,7 @@ class Resources ...@@ -485,6 +485,7 @@ class Resources
static toggleBookingIntervalStatus(event) static toggleBookingIntervalStatus(event)
{ {
event.preventDefault();
var li = jQuery(event.target).parents('tr')[0]; var li = jQuery(event.target).parents('tr')[0];
if (!li) { if (!li) {
//Something is wrong with the HTML. //Something is wrong with the HTML.
......
...@@ -521,3 +521,9 @@ form#resolve-request, form#decline-request { ...@@ -521,3 +521,9 @@ form#resolve-request, form#decline-request {
padding-bottom: 10px; padding-bottom: 10px;
} }
} }
button.takes-place-status-toggle {
border: none;
background: none;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment