From d85dfcba02d28e77e8b3d3035e64c3ee18f5c232 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 28 Aug 2012 09:07:06 -0300 Subject: [PATCH] Disable error dialog on editor to avoid unnecesary errors. --- wise-editor/src/main/webapp/js/editor.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wise-editor/src/main/webapp/js/editor.js b/wise-editor/src/main/webapp/js/editor.js index 6e7675c0..2a486d16 100644 --- a/wise-editor/src/main/webapp/js/editor.js +++ b/wise-editor/src/main/webapp/js/editor.js @@ -28,6 +28,7 @@ function buildDesigner(options) { designer.addEvent('loadSuccess', function () { window.waitDialog.close.delay(1000, window.waitDialog); window.waitDialog = null; + window.mindmapLoadReady = true; }); window.onerror = function (message, url, lineNo) { @@ -37,6 +38,7 @@ function buildDesigner(options) { window.waitDialog.close.delay(1000, window.waitDialog); window.waitDialog = null; } + var req = new Request({ method:'post', url:"/service/logger/editor", @@ -49,7 +51,11 @@ function buildDesigner(options) { userAgent:navigator.userAgent, mapId:options.mapId})); - errorDialog.show(); + // 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(); + } }; // Configure default persistence manager ...