3.0.2 .Net8
This commit is contained in:
@@ -386,9 +386,19 @@
|
||||
{
|
||||
if (!ajax.noWaitIcon) sbm.hidePleaseWait();
|
||||
ajax.status = status;
|
||||
if (response.notification)
|
||||
sbm.showNotification(response.notification.title, response.notification.message, ajax.selNotifyParent);
|
||||
if (response.message)
|
||||
ajax.$msgs?.hide().empty();
|
||||
const notifyMsg = response.notifyMesage;
|
||||
if (notifyMsg)
|
||||
sbm.showNotification(notifyMsg.title, notifyMsg.message, ajax.selNotifyParent);
|
||||
let popupMsg = response.popupMessage;
|
||||
const inlineMsg = response.inlineMessage;
|
||||
if (inlineMsg)
|
||||
{
|
||||
console.log(ajax.$msgs, inlineMsg);
|
||||
if (ajax.$msgs?.length) ajax.$msgs.append($(`<div class="sbm-message sbm-${inlineMsg.error ? 'error' : inlineMsg.warning ? 'warn' : 'info'}">'${inlineMsg.text.replace('\n', '<br>')}</div>`)).fadeIn(500);
|
||||
else if (!popupMsg) popupMsg = { title: inlineMsg.error ? 'Error' : inlineMsg.warning ? 'Warning' : 'Info', text: inlineMsg.text };
|
||||
}
|
||||
if (popupMsg)
|
||||
{
|
||||
var fnCloseAlert = function ()
|
||||
{
|
||||
@@ -396,7 +406,7 @@
|
||||
if (response.goHome) return sbm.redirectHome();
|
||||
if (ajax.callbackFn) ajax.callbackFn(response);
|
||||
}
|
||||
sbm.doAlert(response.message.title, response.message.text, function () { fnCloseAlert(); });
|
||||
sbm.doAlert(popupMsg.title, popupMsg.text, function () { fnCloseAlert(); });
|
||||
}
|
||||
else if (response.sessionExpired)
|
||||
return sbm.redirectHomeExp();
|
||||
@@ -409,6 +419,7 @@
|
||||
{
|
||||
if (!ajax.noWaitIcon) sbm.hidePleaseWait();
|
||||
ajax.status = status;
|
||||
ajax.$msgs?.hide().empty();
|
||||
if (status == "abort") return;
|
||||
sbm.doAlert(sbm.dlg.title.alert, sbm.msg.somethingGoneWrong, sbm.redirectHome);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user