";
return initHtml;
}
/**
* Report an error to the user
* @param text Basic error text
* @param exception Exception or null
* @param solution Text for solution or null
* @returns
*/
function reportErrorForUser(text, exception, solution, addStacktrace) {
var stacktrace = null;
if (addStacktrace) {
stacktrace = new Error();
}
setTimeout(function() {
var message = text;
var details = "";
if (exception != null) {
details += "\n\nSystem error message: \"" + exception + "\"";
}
if (solution != null) {
details += "\n\n" + solution;
}
if (stacktrace != null) {
details += "\n\nError details:\n" + stacktrace.stack;
}
if (typeof java != UNDEFINED) {
java.reportError(message, details);
} else {
console.log(message + details);
alert(message + details);
}
}, 0);
}
/**
* Inform user about failure to load content
*/
function reportLoadFailedForUser(text, exception, solution, addStacktrace) {
var stacktrace = null;
if (addStacktrace) {
stacktrace = new Error();
}
setTimeout(function() {
var stacktraceText = null;
if (stacktrace != null) {
stacktraceText = stacktrace.stack;
}
applyLoadFailedForUser(text, exception, solution, stacktraceText);
}, 0);
}
/**
* private
*
* Show information message to user
*/
function applyLoadFailedForUser(text, exception, solution, stacktraceText) {
var dialog = $(".appErrorInfoDialog");
if (dialog == null || dialog.length == 0) {
var html = "
";
// Title Bar
html += "
"+ L_ERROR_LOAD_CONTENT +"
";
// Infotext
html += "
"+ L_ERROR_LOAD_CONTENT_INFO +"
";
// Errormessage
html += "
";
// Options
html += "
";
// Reload Page
html += "";
html += "
";
// Main
html += "
";
$("body").append(html);
}
var errorText = L_ERROR + ": ";
if (text != null) {
errorText += text;
errorText += " | ";
}
if (exception != null) {
errorText += exception;
}
if (stacktraceText != null) {
errorText += " | Callstack: ";
errorText += stacktraceText;
}
var messageElem = $(".appErrorInfoDialogErrormessage");
messageElem.text(errorText);
}
/* ____ User Rights ____ */
var USER_WRITE_TYPE = true;
/* _______ JS-Variables ________ */
var PAGE_HEADER_VISIBLE = true;
var _DECIMAL_SEPARATOR = ".";
var _GROUPS_SEPARATOR = ",";
var _TIME_SEPARATOR = ":";
-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|