misc: fix display of "no timeslot" for static data sources (#73969)
This commit is contained in:
parent
a10c3d2335
commit
7ee68eefbe
|
@ -63,10 +63,12 @@
|
|||
var current_offset = null;
|
||||
var alignment_offset = null;
|
||||
var nb_days = 0;
|
||||
var has_timeslots = false;
|
||||
|
||||
for (var i=0; i<options.length; i++) {
|
||||
var $option = $(options[i]);
|
||||
if ($option.attr('value') == '') continue;
|
||||
has_timeslots = true;
|
||||
var option_date = $option.data('date');
|
||||
if (option_date !== current_date) {
|
||||
var day_label = $option.text().split(' ', 3).join(' ');
|
||||
|
@ -103,7 +105,7 @@
|
|||
} else if (current_offset === null) {
|
||||
current_offset = 0;
|
||||
}
|
||||
if (data.items.length == 0) {
|
||||
if (! has_timeslots) {
|
||||
$('<p class="timetable-widget--nothing">{% trans "No available timeslots." %}</p>').appendTo($table);
|
||||
}
|
||||
var go_prev = $('<button class="prev" title="{% trans "Previous week" %}">←</button>');
|
||||
|
|
Loading…
Reference in New Issue