diff --git a/addons/web/controllers/main.html b/addons/web/controllers/main.html new file mode 100644 index 00000000000..fd0be5ba349 --- /dev/null +++ b/addons/web/controllers/main.html @@ -0,0 +1,21 @@ + + + + + OpenERP + + %(css)s + %(js)s + + + + + + \ No newline at end of file diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index a514cafb6c8..2af7ac115d8 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -84,24 +84,9 @@ def concat_files(file_list, reader=None, intersperse=""): files_concat = intersperse.join(files_content) return files_concat,files_timestamp -html_template = """ - - - - OpenERP - - %(css)s - %(js)s - - - - -""" +html_template = None +with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "main.html")) as html_file: + html_template = html_file.read() class WebClient(openerpweb.Controller): _cp_path = "/web/webclient" @@ -207,7 +192,6 @@ class WebClient(openerpweb.Controller): 'js': js, 'css': css, 'modules': simplejson.dumps(self.server_wide_modules(req)), - 'init': 'new s.web.WebClient().start();', } return r diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 8b9a0d4efc6..6a9e860aadc 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1064,7 +1064,6 @@ openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClie }, start: function() { var self = this; - this.$element = $(document.body); if (jQuery.param != undefined && jQuery.deparam(jQuery.param.querystring()).kitten != undefined) { this.$element.addClass("kitten-mode-activated"); this.$element.delegate('img.oe-record-edit-link-img', 'hover', function(e) {