increased click area for checkin

This commit is contained in:
Daniel Friesel 2022-07-14 21:05:07 +02:00
parent 7a34f64eba
commit f01f108f94
No known key found for this signature in database
GPG key ID: 100D5BFB5166E005
3 changed files with 16 additions and 10 deletions

View file

@ -65,7 +65,13 @@ function odelay(sched, rt) {
function tvly_run(link, req, err_callback) {
var error_icon = '<i class="material-icons">error</i>';
var progressbar = $('<div class="progress"><div class="indeterminate"></div></div>');
var progressbar;
if (link.data('tr')) {
progressbar = $('<tr><td colspan="' + link.data('tr') + '"><div class="progress"><div class="indeterminate"></div></div></td></tr>');
}
else {
progressbar = $('<div class="progress"><div class="indeterminate"></div></div>');
}
link.hide();
link.after(progressbar);
$.post('/action', req, function(data) {

View file

@ -7,10 +7,10 @@
% $td_class = 'cancelled';
% $link_class = 'action-cancelled-from';
% }
<tr>
<tr class="<%= $link_class %>" data-station="<%= $train->station_uic %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>">
<td class="<%= $td_class %>">
% if ($checkin_from) {
<a class="<%= $link_class %>" data-station="<%= $train->station_uic %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $train->line %></a>
<a><%= $train->line %></a>
% }
% else {
%= $train->line
@ -18,7 +18,7 @@
</td>
<td class="<%= $td_class %>">
% if ($checkin_from) {
<a class="<%= $link_class %>" data-station="<%= $train->station_uic %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $via %></a>
<a><%= $via %></a>
% }
% else {
%= $via
@ -70,10 +70,10 @@
% $td_class = 'cancelled';
% $link_class = 'action-cancelled-from';
% }
<tr>
<tr class="<%= $link_class %>" data-station="<%= $train->station_uic %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>" data-tr="4">
<td class="<%= $td_class %>">
% if ($checkin_from) {
<a class="<%= $link_class %>" data-station="<%= $train->station_uic %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $train->line %></a>
<a><%= $train->line %></a>
% }
% else {
%= $train->line
@ -81,7 +81,7 @@
</td>
<td class="<%= $td_class %>">
% if ($checkin_from) {
<a class="<%= $link_class %>" data-station="<%= $train->station_uic %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $via %></a>
<a><%= $via %></a>
% }
% else {
%= $via

View file

@ -86,14 +86,14 @@
</td>
</tr>
% }
<tr>
<tr class="<%= $link_class %>" data-station="<%= $result->station_uic %>" data-train="<%= $result->train_id %>" data-tr="3">
<td>
<a class="<%= $link_class %>" data-station="<%= $result->station_uic %>" data-train="<%= $result->train_id %>">
<a>
<%= $result->line %>
</a>
</td>
<td class="<%= $td_class %>">
<a class="<%= $link_class %>" data-station="<%= $result->station_uic %>" data-train="<%= $result->train_id %>">
<a>
<%= $result->destination %>
</a>
</td>