From 7b80bd155c948e2b009f4238aa88fe11d34d69cf Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 21 Sep 2011 10:16:51 +0200 Subject: [PATCH] [FIX] issues with missing window.console object in Firefox 3.6 when Firebug is not active bzr revid: xmo@openerp.com-20110921081651-a4usbx7flv91xko5 --- addons/web/static/src/js/chrome.js | 2 -- addons/web/static/src/js/core.js | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 8a8962fd27b..fd3ea690245 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -581,7 +581,6 @@ openerp.web.Header = openerp.web.Widget.extend(/** @lends openerp.web.Header# * this._super(parent); this.qs = "?" + jQuery.param.querystring(); this.$content = $(); - console.debug("initializing header with id", this.element_id); this.update_promise = $.Deferred().resolve(); }, start: function() { @@ -963,7 +962,6 @@ openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClie this.session.start(); this.login.start(); this.menu.start(); - console.debug("The openerp client has been initialized."); }, on_logged: function() { if(this.action_manager) diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index a33fca458d0..e26e01e5b29 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -1,7 +1,10 @@ /*--------------------------------------------------------- * OpenERP Web core *--------------------------------------------------------*/ - +var console; +if (!console) { + console = {log: function () {}}; +} if (!console.debug) { console.debug = console.log; } @@ -943,7 +946,6 @@ openerp.web.Widget = openerp.web.SessionAware.extend(/** @lends openerp.web.Widg * If that's not the case this method will simply return `false`. */ do_action: function(action, on_finished) { - console.log('Widget.do_action', action, on_finished); if (this.widget_parent) { return this.widget_parent.do_action(action, on_finished); }