diff --git a/src/scripts/tutti/10_tasks.js b/src/scripts/tutti/10_tasks.js index 9f71a02..4816b68 100644 --- a/src/scripts/tutti/10_tasks.js +++ b/src/scripts/tutti/10_tasks.js @@ -45,7 +45,14 @@ function item_open(item_id, item_type, pushState) console.log('Error fetching task', item_id, 'from', item_url); console.log('XHR:', xhr); } - $('#item-details').html(xhr.responseText); + $('#status-bar').text('Opening ' + item_type + ' failed.'); + if (xhr.status) { + $('#item-details').html(xhr.responseText); + } else { + $('#item-details').html('
Opening ' + item_type + ' failed. There possibly was ' + + 'an error connecting to the server. Please check your network connection and ' + + 'try again.
'); + } }); // Determine whether we should push the new state or not.