Index: lams_monitoring/web/includes/javascript/monitorLesson5.js =================================================================== diff -u -r1a86d65e1c3e0253797a97185a97a93be476340e -r10196b1af5f81615329dbf0de64e0ee91bf9ca94 --- lams_monitoring/web/includes/javascript/monitorLesson5.js (.../monitorLesson5.js) (revision 1a86d65e1c3e0253797a97185a97a93be476340e) +++ lams_monitoring/web/includes/javascript/monitorLesson5.js (.../monitorLesson5.js) (revision 10196b1af5f81615329dbf0de64e0ee91bf9ca94) @@ -102,11 +102,11 @@ // updatePresenceAvailableCount(); if (checked) { $('#imButtonWrapper').show(); - alert(LABELS.LESSON_PRESENCE_ENABLE_ALERT); + showToast(LABELS.LESSON_PRESENCE_ENABLE_ALERT); } else { $('#imButtonWrapper, #openImButton').hide(); $('#imButton').prop('checked', false); - alert(LABELS.LESSON_PRESENCE_DISABLE_ALERT); + showToast(LABELS.LESSON_PRESENCE_DISABLE_ALERT); } } }); @@ -129,10 +129,10 @@ if (checked) { $('#openImButton').show(); $('#openImButton').prop('disabled', false); - alert(LABELS.LESSON_IM_ENABLE_ALERT); + showToast(LABELS.LESSON_IM_ENABLE_ALERT); } else { $('#openImButton').hide(); - alert(LABELS.LESSON_IM_DISABLE_ALERT); + showToast(LABELS.LESSON_IM_DISABLE_ALERT); } } }); @@ -261,9 +261,9 @@ data : data, success : function() { if (checked) { - alert(LABELS.LESSON_ACTIVITY_SCORES_ENABLE_ALERT); + showToast(LABELS.LESSON_ACTIVITY_SCORES_ENABLE_ALERT); } else { - alert(LABELS.LESSON_ACTIVITY_SCORES_DISABLE_ALERT); + showToast(LABELS.LESSON_ACTIVITY_SCORES_DISABLE_ALERT); } } }); @@ -2654,6 +2654,13 @@ } } +function showToast(text) { + let toast = $('#toast-template').clone().attr('id', null).appendTo('#toast-container'); + toast.find('.toast-body', toast).text(text); + toast = new bootstrap.Toast(toast[0]); + toast.show(); +} + /** * Works as dblclick for mobile devices. */ Index: lams_monitoring/web/monitor5.jsp =================================================================== diff -u -r1a86d65e1c3e0253797a97185a97a93be476340e -r10196b1af5f81615329dbf0de64e0ee91bf9ca94 --- lams_monitoring/web/monitor5.jsp (.../monitor5.jsp) (revision 1a86d65e1c3e0253797a97185a97a93be476340e) +++ lams_monitoring/web/monitor5.jsp (.../monitor5.jsp) (revision 10196b1af5f81615329dbf0de64e0ee91bf9ca94) @@ -618,5 +618,15 @@ + +