mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-18 20:39:13 +02:00
Etemplate: If long task response is an object, stringify the object so we can see what it says
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user