///////////////////////////////////////////////////////////////// // Sircl 2.x - Toastr extension // www.getsircl.com // Copyright (c) 2019-2023 Rudi Breedenraedt // Sircl is released under the MIT license, see sircl-license.txt ///////////////////////////////////////////////////////////////// /* tslint:disabled */ // Initialize sircl lib: if (typeof sircl === "undefined") console.warn("The 'sircl-toastr' component should be registered after the 'sircl' component. Please review order of script files."); if (typeof toastr === "undefined") console.warn("The 'sircl-toastr' component requires the 'toastr.js' component. See https://github.com/CodeSeven/toastr"); if (typeof jQuery !== "undefined" && $.isFunction($.fn.fadeIn) == false) console.warn("The 'sircl-toastr' component requires the full edition of jQuery. The slim edition is not sufficient."); // Disables Toasts if "slim" edition of jQuery is loaded: if ($.fn.fadeIn) { // X-Sircl-Toastr response header support: sircl.addRequestHandler("afterSend", function sircl_toastr_afterSend_requestHandler(req) { if (req.allResponseHeaders != null) { req.allResponseHeaders.forEach(function sircl_toastr_afterSend_requestHandler_each(rh) { if (rh[0] == "x-sircl-toastr") { if (rh.length > 1 && rh[1].indexOf("|") > 1) { var toastrHeaderParts = rh[1].split("|"); var toastrType = toastrHeaderParts[0]; toastrHeaderParts.splice(0, 1); toastr[toastrType].apply(null, toastrHeaderParts); } } }); } // Move to next handler: this.next(req); }); // .onload-showtoastr shows toasts based on following definition: //