forked from MarseyWorld/MarseyWorld
button1 button2
parent
3b86227872
commit
df1eedc8d9
|
@ -37,7 +37,7 @@ function showToast(success, message, isToastTwo=false) {
|
|||
bootstrap.Toast.getOrCreateInstance(document.getElementById(element)).show();
|
||||
}
|
||||
|
||||
function postToastLoad(xhr, className, extraActionsOnSuccess, extraActionsOnError) {
|
||||
function postToastLoad(xhr, className, button1, button2, extraActionsOnSuccess, extraActionsOnError) {
|
||||
let data
|
||||
try {
|
||||
data = JSON.parse(xhr.response)
|
||||
|
@ -87,7 +87,7 @@ function postToast(t, url, button1, button2, className, extraActions, extraActio
|
|||
prePostToastNonShopActions(t, url, button1, button2, className);
|
||||
const xhr = createXhrWithFormKey(url);
|
||||
xhr[0].onload = function() {
|
||||
postToastLoad(xhr[0], className, extraActions, extraActionsError)
|
||||
postToastLoad(xhr[0], className, button1, button2, extraActions, extraActionsError)
|
||||
postPostToastNonShopActions(t, url, button1, button2, className)
|
||||
};
|
||||
xhr[0].send(xhr[1]);
|
||||
|
@ -369,4 +369,4 @@ function areyousure(t) {
|
|||
|
||||
if (t.dataset.dismiss)
|
||||
t.setAttribute("data-bs-dismiss", t.dataset.dismiss);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue