[FIX] website: do not show webclient
authorChristophe Simonis <chs@openerp.com>
Tue, 2 Jul 2013 16:57:54 +0000 (18:57 +0200)
committerChristophe Simonis <chs@openerp.com>
Tue, 2 Jul 2013 16:57:54 +0000 (18:57 +0200)
bzr revid: chs@openerp.com-20130702165754-sj7qbv8ncsj4uy3m

addons/website/static/src/js/website_bootstrap.js

index 308c411..129bcba 100644 (file)
@@ -2,13 +2,11 @@ Aloha.ready(function() {
     // Init headless webclient
     // TODO: Webclient research : use iframe embedding mode
     //       Meanwhile, let's HACK !!!
-    var $web = $('<div style="display: none;"/>').appendTo('body');
-    var $web = $('<div style="display: none;"/>').appendTo($web);
     var s = new openerp.init(['web', 'website']);
-    s.web.WebClient.bind_hashchange = s.web.blockUI = s.web.unblockUI = function() {};
+    s.web.WebClient.bind_hashchange = s.web.WebClient.show_common = s.web.blockUI = s.web.unblockUI = function() {};
     s.web.WebClient.include({ do_push_state: function() {} });
     var wc = new s.web.WebClient();
-    wc.appendTo($web);
+    wc.start();
     var instance = openerp.instances[wc.session.name];
     // Another hack since we have no callback when webclient has loaded modules.
     instance.web.qweb.add_template('/website/static/src/xml/website.xml');