gfdgsd
This commit is contained in:
@@ -2820,18 +2820,10 @@ window.initUploadForm = (selector) => {
|
||||
}
|
||||
};
|
||||
|
||||
// Skip redirect if every item was a background URL job
|
||||
// Inject item into grid without redirecting
|
||||
const allPending = lastData?.pending && selectedFiles.every(i => i.type === 'url');
|
||||
if (!allPending) {
|
||||
const targetUrl = (lastData && (lastData.visibility > 0 || lastData.redirect || lastData.slug))
|
||||
? (lastData.redirect || `/${lastData.slug || lastData.itemid}`)
|
||||
: '/';
|
||||
if (typeof window.loadPageAjax === 'function') {
|
||||
await window.loadPageAjax(targetUrl, true, { bypassCache: true });
|
||||
if (targetUrl === '/') injectNewItem();
|
||||
} else {
|
||||
window.location.href = targetUrl;
|
||||
}
|
||||
injectNewItem();
|
||||
}
|
||||
} else {
|
||||
restoreBtn();
|
||||
|
||||
Reference in New Issue
Block a user