mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
Customer portal : Improved user feedback on modal loading crashs
SVN:trunk[4183]
This commit is contained in:
@@ -327,7 +327,9 @@
|
|||||||
// Display a error message on modal if the content could not be loaded.
|
// Display a error message on modal if the content could not be loaded.
|
||||||
// Note : As of now, we can't display a more detailled message based on the response because Bootstrap doesn't pass response data with the loaded event.
|
// Note : As of now, we can't display a more detailled message based on the response because Bootstrap doesn't pass response data with the loaded event.
|
||||||
$('body').on('loaded.bs.modal', function (oEvent) {
|
$('body').on('loaded.bs.modal', function (oEvent) {
|
||||||
if($(oEvent.target).find('.modal-content').html().replace(/[\n\r\t]+/g, '') === contentLoaderTemplate)
|
var sModalContent = $(oEvent.target).find('.modal-content').html();
|
||||||
|
|
||||||
|
if( (sModalContent === '') || (sModalContent.replace(/[\n\r\t]+/g, '') === contentLoaderTemplate) )
|
||||||
{
|
{
|
||||||
$(oEvent.target).find('.modal-content').html($('#modal-for-alert .modal-content').html());
|
$(oEvent.target).find('.modal-content').html($('#modal-for-alert .modal-content').html());
|
||||||
$(oEvent.target).find('.modal-content .modal-header .modal-title').text('{{ 'Error:HTTP:500'|dict_s }}');
|
$(oEvent.target).find('.modal-content .modal-header .modal-title').text('{{ 'Error:HTTP:500'|dict_s }}');
|
||||||
|
|||||||
Reference in New Issue
Block a user