From d54a689ace1458d0fd373495159b33bb9d76ead2 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 29 Aug 2012 00:48:27 -0300 Subject: [PATCH] Bug message: this._container is null, line:4594, :http://app.wisemapping.com/js/mindplot-min2.js --- .../main/javascript/widget/ToolbarNotifier.js | 38 ++++++++++--------- wise-editor/src/main/webapp/samples/issue.xml | 0 .../src/main/webapp/samples/sample4.xml | 0 3 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 wise-editor/src/main/webapp/samples/issue.xml create mode 100644 wise-editor/src/main/webapp/samples/sample4.xml diff --git a/mindplot/src/main/javascript/widget/ToolbarNotifier.js b/mindplot/src/main/javascript/widget/ToolbarNotifier.js index f03486da..9e84591a 100644 --- a/mindplot/src/main/javascript/widget/ToolbarNotifier.js +++ b/mindplot/src/main/javascript/widget/ToolbarNotifier.js @@ -18,45 +18,47 @@ mindplot.widget.ToolbarNotifier = new Class({ - initialize : function() { - this._container = $('headerNotifier'); - this._effect = new Fx.Elements(this._container, { - onComplete: function() { - this._container.setStyle('display', 'none'); + initialize:function () { + var container = $('headerNotifier'); + this._effect = new Fx.Elements(container, { + onComplete:function () { + container.setStyle('display', 'none'); }.bind(this), link:'cancel', duration:8000, - transition: Fx.Transitions.Expo.easeInOut + transition:Fx.Transitions.Expo.easeInOut }); }, - logError : function(userMsg) { + logError:function (userMsg) { this.logMessage(userMsg, mindplot.widget.ToolbarNotifier.MsgKind.ERROR); }, - hide:function() { + hide:function () { }, - logMessage : function(msg, fade) { + logMessage:function (msg, fade) { $assert(msg, 'msg can not be null'); - this._container.set('text', msg); - this._container.setStyle('display', 'block'); - this._container.position({ - relativeTo: $('header'), - position: 'upperCenter', - edge: 'centerTop' + + var container = $('headerNotifier'); + container.set('text', msg); + container.setStyle('display', 'block'); + container.position({ + relativeTo:$('header'), + position:'upperCenter', + edge:'centerTop' }); if (!$defined(fade) || fade) { this._effect.start({ - 0: { - opacity: [1,0] + 0:{ + opacity:[1, 0] } }); } else { - this._container.setStyle('opacity', '1'); + container.setStyle('opacity', '1'); this._effect.pause(); } } diff --git a/wise-editor/src/main/webapp/samples/issue.xml b/wise-editor/src/main/webapp/samples/issue.xml new file mode 100644 index 00000000..e69de29b diff --git a/wise-editor/src/main/webapp/samples/sample4.xml b/wise-editor/src/main/webapp/samples/sample4.xml new file mode 100644 index 00000000..e69de29b