2026-01-08 22:49:48 -05:00
|
|
|
/**
|
2026-03-17 23:22:24 -04:00
|
|
|
* Deprecated: use lt.toast.* directly (from web_template/base.js).
|
|
|
|
|
* This shim maintains backwards compatibility while callers are migrated.
|
2026-01-08 22:49:48 -05:00
|
|
|
*/
|
|
|
|
|
|
2026-03-17 23:22:24 -04:00
|
|
|
// showToast() shim — used by inline view scripts
|
|
|
|
|
function showToast(message, type = 'info', duration = 3500) {
|
|
|
|
|
switch (type) {
|
|
|
|
|
case 'success': lt.toast.success(message, duration); break;
|
|
|
|
|
case 'error': lt.toast.error(message, duration); break;
|
|
|
|
|
case 'warning': lt.toast.warning(message, duration); break;
|
|
|
|
|
default: lt.toast.info(message, duration); break;
|
2026-01-08 22:49:48 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-17 23:22:24 -04:00
|
|
|
// window.toast.* shim — used by JS files
|
2026-01-08 22:49:48 -05:00
|
|
|
window.toast = {
|
2026-03-17 23:22:24 -04:00
|
|
|
success: (msg, dur) => lt.toast.success(msg, dur),
|
|
|
|
|
error: (msg, dur) => lt.toast.error(msg, dur),
|
|
|
|
|
warning: (msg, dur) => lt.toast.warning(msg, dur),
|
|
|
|
|
info: (msg, dur) => lt.toast.info(msg, dur),
|
2026-01-08 22:49:48 -05:00
|
|
|
};
|