mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-13 08:50:07 +01:00
Etemplate: If long task response is an object, stringify the object so we can see what it says
This commit is contained in:
parent
b057f95a5a
commit
57d03110e4
@ -638,12 +638,17 @@ var et2_dialog = /** @class */ (function (_super) {
|
|||||||
// Early exit
|
// Early exit
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
if (response) {
|
if (response && typeof response === "string") {
|
||||||
totals.success++;
|
totals.success++;
|
||||||
jQuery("<div class='message'></div>")
|
jQuery("<div class='message'></div>")
|
||||||
.text(response)
|
.text(response)
|
||||||
.appendTo(log);
|
.appendTo(log);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
jQuery("<div class='message error'></div>")
|
||||||
|
.text(JSON.stringify(response))
|
||||||
|
.appendTo(log);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Scroll to bottom
|
// Scroll to bottom
|
||||||
var height = log[0].scrollHeight;
|
var height = log[0].scrollHeight;
|
||||||
|
@ -788,12 +788,18 @@ export class et2_dialog extends et2_widget {
|
|||||||
// Early exit
|
// Early exit
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
if (response) {
|
if (response && typeof response === "string") {
|
||||||
totals.success++;
|
totals.success++;
|
||||||
jQuery("<div class='message'></div>")
|
jQuery("<div class='message'></div>")
|
||||||
.text(response)
|
.text(response)
|
||||||
.appendTo(log);
|
.appendTo(log);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
jQuery("<div class='message error'></div>")
|
||||||
|
.text(JSON.stringify(response))
|
||||||
|
.appendTo(log);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Scroll to bottom
|
// Scroll to bottom
|
||||||
let height = log[0].scrollHeight;
|
let height = log[0].scrollHeight;
|
||||||
|
Loading…
Reference in New Issue
Block a user