[FIX] revert html_template is used by other modules. commit 2012 revid:nicolas.vanhoren@openerp.com-20120118161735-2yuxisndfq92ctoi
bzr revid: al@openerp.com-20120122233202-moq81q35qddjtlw8
This commit is contained in:
parent
5e293f04ae
commit
7d22e1eb8c
3
Makefile
3
Makefile
|
@ -29,3 +29,6 @@ doc:
|
||||||
cloc:
|
cloc:
|
||||||
cloc addons/*/common/*.py addons/*/controllers/*.py addons/*/static/src/*.js addons/*/static/src/js/*.js addons/*/static/src/css/*.css addons/*/static/src/xml/*.xml
|
cloc addons/*/common/*.py addons/*/controllers/*.py addons/*/static/src/*.js addons/*/static/src/js/*.js addons/*/static/src/css/*.css addons/*/static/src/xml/*.xml
|
||||||
|
|
||||||
|
blamestat:
|
||||||
|
echo addons/*/common/*.py addons/*/controllers/*.py addons/*/static/src/js/*.js addons/*/static/src/css/*.css addons/*/static/src/xml/*.xml | xargs -t -n 1 bzr blame -v --long --all | awk '{print $2}' | sort | uniq -c | sort -n
|
||||||
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html style="height: 100%%">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
<title>OpenERP</title>
|
|
||||||
<link rel="shortcut icon" href="/web/static/src/img/favicon.ico" type="image/x-icon"/>
|
|
||||||
%(css)s
|
|
||||||
%(js)s
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(function() {
|
|
||||||
var s = new openerp.init(%(modules)s);
|
|
||||||
var webclient = new s.web.WebClient();
|
|
||||||
webclient.$element = $(document.body);
|
|
||||||
webclient.start();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body class="openerp" id="oe">
|
|
||||||
<!-- should add a loading message? -->
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -84,9 +84,24 @@ def concat_files(file_list, reader=None, intersperse=""):
|
||||||
files_concat = intersperse.join(files_content)
|
files_concat = intersperse.join(files_content)
|
||||||
return files_concat,files_timestamp
|
return files_concat,files_timestamp
|
||||||
|
|
||||||
html_template = None
|
html_template = """<!DOCTYPE html>
|
||||||
with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "main.html")) as html_file:
|
<html style="height: 100%%">
|
||||||
html_template = html_file.read()
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
|
<title>OpenERP</title>
|
||||||
|
<link rel="shortcut icon" href="/web/static/src/img/favicon.ico" type="image/x-icon"/>
|
||||||
|
%(css)s
|
||||||
|
%(js)s
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
var s = new openerp.init(%(modules)s);
|
||||||
|
%(init)s
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body class="openerp" id="oe"></body>
|
||||||
|
</html>
|
||||||
|
"""
|
||||||
|
|
||||||
class WebClient(openerpweb.Controller):
|
class WebClient(openerpweb.Controller):
|
||||||
_cp_path = "/web/webclient"
|
_cp_path = "/web/webclient"
|
||||||
|
@ -192,6 +207,7 @@ class WebClient(openerpweb.Controller):
|
||||||
'js': js,
|
'js': js,
|
||||||
'css': css,
|
'css': css,
|
||||||
'modules': simplejson.dumps(self.server_wide_modules(req)),
|
'modules': simplejson.dumps(self.server_wide_modules(req)),
|
||||||
|
'init': 'new s.web.WebClient().start();',
|
||||||
}
|
}
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
|
@ -1061,6 +1061,7 @@ openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClie
|
||||||
},
|
},
|
||||||
start: function() {
|
start: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
this.$element = $(document.body);
|
||||||
if (jQuery.param != undefined && jQuery.deparam(jQuery.param.querystring()).kitten != undefined) {
|
if (jQuery.param != undefined && jQuery.deparam(jQuery.param.querystring()).kitten != undefined) {
|
||||||
this.$element.addClass("kitten-mode-activated");
|
this.$element.addClass("kitten-mode-activated");
|
||||||
this.$element.delegate('img.oe-record-edit-link-img', 'hover', function(e) {
|
this.$element.delegate('img.oe-record-edit-link-img', 'hover', function(e) {
|
||||||
|
|
Loading…
Reference in New Issue