From 8720b6bb7eb0a8ea54c1d23dc48e0c6779c9495a Mon Sep 17 00:00:00 2001 From: Jonas Cuyvers Date: Tue, 27 Feb 2024 17:12:53 +0100 Subject: [PATCH] #3424112: Fix add, remove and copy of timeslot --- js/office_hours.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/js/office_hours.js b/js/office_hours.js index e9a6604..516f1d6 100644 --- a/js/office_hours.js +++ b/js/office_hours.js @@ -221,17 +221,16 @@ // Attach a function to each add-link to show the next slot if clicked upon. // Show the Add-link, except if the next time slot is hidden. - $('[id$=add]').bind('click', addTimeSlot); - - $('[id$=add]').each(showAddLink); + $('[data-drupal-selector$=add]').bind('click', addTimeSlot); + $('[data-drupal-selector$=add]').each(showAddLink); // Attach a function to each clear-link, to clear the slot if clicked upon. - $('[id$=clear]').bind('click', clearTimeSlot); + $('[data-drupal-selector$=clear]').bind('click', clearTimeSlot); // Attach a function to each copy-link, to copy the slot values // from previous day, when user clicks "Copy previous day". // @todo This works for Table widget, not yet for List Widget. - $('[id$=copy]').bind('click', copyPreviousDay); + $('[data-drupal-selector$=copy]').bind('click', copyPreviousDay); }); }, }; -- GitLab