1(function (CRM) { 2 /** 3 * Override the core CRM alert to use sweetalert if the notification 4 * container is not present 5 */ 6 7 // backup the core function 8 CRM._alert = CRM.alert; 9 10 CRM.alert = function (text, title, type, options) { 11 if (CRM.$('#crm-notification-container').length) { 12 CRM._alert(text, title, type, options); 13 } 14 else { 15 Swal.fire({ 16 icon: type, 17 html: text || '', 18 title: title || '', 19 theme: CRM.vars.sweetalert.darkMode, 20 }); 21 } 22 }; 23})(CRM);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.