Disable error dialog on editor to avoid unnecesary errors.

This commit is contained in:
Paulo Gustavo Veiga 2012-08-28 09:07:06 -03:00
parent a442c487e4
commit d85dfcba02

View File

@ -28,6 +28,7 @@ function buildDesigner(options) {
designer.addEvent('loadSuccess', function () { designer.addEvent('loadSuccess', function () {
window.waitDialog.close.delay(1000, window.waitDialog); window.waitDialog.close.delay(1000, window.waitDialog);
window.waitDialog = null; window.waitDialog = null;
window.mindmapLoadReady = true;
}); });
window.onerror = function (message, url, lineNo) { window.onerror = function (message, url, lineNo) {
@ -37,6 +38,7 @@ function buildDesigner(options) {
window.waitDialog.close.delay(1000, window.waitDialog); window.waitDialog.close.delay(1000, window.waitDialog);
window.waitDialog = null; window.waitDialog = null;
} }
var req = new Request({ var req = new Request({
method:'post', method:'post',
url:"/service/logger/editor", url:"/service/logger/editor",
@ -49,7 +51,11 @@ function buildDesigner(options) {
userAgent:navigator.userAgent, userAgent:navigator.userAgent,
mapId:options.mapId})); mapId:options.mapId}));
// Open error dialog only in case of mindmap loading errors. The rest of the error are reported but not display the dialog.
// Remove this in the near future.
if (!window.mindmapLoadReady) {
errorDialog.show(); errorDialog.show();
}
}; };
// Configure default persistence manager ... // Configure default persistence manager ...