| 315 | | 315 | |
| 316 | // Configure toast library: | 316 | // Configure toast library: |
| 317 | toastr.options = { | 317 | toastr.options = { |
| 318 | 'closeButton': false, | 318 | closeButton: false, |
| 319 | 'progressBar': false, | 319 | progressBar: false, |
| 320 | 'showDuration': 250, | 320 | showDuration: 250, |
| 321 | 'hideDuration': 250, | 321 | hideDuration: 250, |
| 322 | 'timeOut': 4000, | 322 | timeOut: 4000, |
| 323 | 'extendedTimeOut': 10000, | 323 | extendedTimeOut: 10000, |
| 324 | 'showEasing': 'linear', | 324 | showEasing: 'linear', |
| 325 | 'hideEasing': 'linear', | 325 | hideEasing: 'linear', |
| 326 | 'showMethod': 'fadeIn', | 326 | showMethod: 'fadeIn', |
| 327 | 'hideMethod': 'fadeOut', | 327 | hideMethod: 'fadeOut', |
| 328 | 'escapeHtml': true, | 328 | escapeHtml: true, |
| 329 | }; | 329 | onHidden: function () { |
| 330 | | 330 | // If we have any dialog still open, the last "hidden" toastr will remove the toastr-container. We need to keep it alive inside the dialog though |
| 331 | | 331 | // so the toasts still show up inside there. |
| 332 | toastr.options.onHidden = () => { | 332 | fixToastrForDialogs(); |
| 333 | // If we have any dialog still open, the last "hidden" toastr will remove the toastr-container. We need to keep it alive inside the dialog though | 333 | }, |
| 334 | // so the toasts still show up inside there. | 334 | onShown: function () { |
| 335 | fixToastrForDialogs(); | 335 | // Set tooltip to the notification message |
| 336 | }; | 336 | $(this).attr('title', t`Tap to close`); |
| 337 | | 337 | }, |
| 338 | toastr.options.onShown = function () { | | |
| 339 | const $toast = $(this); // 'this' refers to the toast element | | |
| 340 | const message = 'Click/Tap to close'; | | |
| 341 | $toast.attr('title', message); // Set tooltip to the notification message | | |
| 342 | }; | 338 | }; |
| 343 | | 339 | |
| 344 | // Allow target="_blank" in links | 340 | // Allow target="_blank" in links |