function showWarnings(response) { if (isc.isAn.Object(response)) { var warnings = response.warnings; //isc.logEcho(response, "Is an Object"); if (isc.isAn.Array(warnings)) { isc.logWarn("Is an Array: " + warnings); // Trying to show multiple warning dialogs doesn't work because only the last one is shown to the user // TODO: Use a sole dialog to present all warnings and errors to the user! // for (var i = 0; i < warnings.length; i++) { // isc.warn(warnings[i]); // } // Show only the first warning to the user! if (warnings.length > 0) { isc.logWarn("Length > 0"); isc.warn(warnings[0], {title:ge.message("warnung")}); } } } } function showErrors(response, data, request) { if (response.status == RPCResponse.STATUS_FAILURE) { if (isc.isAn.Array(data)) { isc.logWarn("Is an Array: " + data); var errorMessage = ""; for (var i = 0; i < data.length; i++) { var error = data[i]; errorMessage += "
" + error.message + "
"; } isc.warn(errorMessage, {title:ge.message("error")}); return true; } } return false; } function askBeforeLeave(thisValue){ if(typeof formChanged == "function"){ formChanged(thisValue); return false; }else{ return true; } } // same dialog in 'metadata.jsp' (bookplanAskingDialog), if this one is changed dont forget to change there too // same dialog in 'metadata.jsp' (editPage), if this one is changed dont forget to change there too function callAskingDialog(thisValue){ /** isc.ask(ge.message("es.haben.sich.daten.veraendert"), { ID:"askBeforeLeaveWindow", title:ge.message("hinweis"), showCloseButton: false, buttons: [ {title:ge.message("smartclient.YES_BUTTON_TITLE"), width: 120, height: 28, icon: "/img/icons/choose.png", iconSize: 16, iconAlign: "left", click:"askBeforeLeaveWindow.closeClick();return false" }, {title:ge.message("smartclient.NO_BUTTON_TITLE"), width: 120, height: 28, icon: "/img/icons/cancel.png", iconSize: 16, iconAlign: "left", click: function(){ if(thisValue){ window.location.href = thisValue.href; } } } ] } ); return false; //*/ window.location.href = thisValue.href; }