[fix] rollback 1873 & 1871 to correct bugs related to login page & dialogs

bzr revid: nicolas.vanhoren@openerp.com-20120104155329-tfk6gt4mjhme82od
This commit is contained in:
niv-openerp 2012-01-04 16:53:29 +01:00
parent 0e3809d8cc
commit 2f1dace76a
5 changed files with 8 additions and 9 deletions

View File

@ -89,7 +89,7 @@ html_template = """<!DOCTYPE html>
}); });
</script> </script>
</head> </head>
<body style="margin: 0;height: 100%%;"></body> <body></body>
</html> </html>
""" """
@ -197,7 +197,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().appendTo($("body"));', 'init': 'new s.web.WebClient().replace($("body"));',
} }
return r return r

View File

@ -1,5 +1,4 @@
body.openerp {
.openerp {
padding: 0; padding: 0;
margin: 0; margin: 0;
height: 100%; height: 100%;
@ -8,7 +7,7 @@
font-family: Ubuntu, Helvetica, sans-serif; font-family: Ubuntu, Helvetica, sans-serif;
} }
.openerp, .openerp textarea, .openerp input, .openerp select, .openerp option, .openerp button, .openerp .ui-widget { body.openerp, .openerp textarea, .openerp input, .openerp select, .openerp option, .openerp button, .openerp .ui-widget {
font-family: Ubuntu, Helvetica, sans-serif; font-family: Ubuntu, Helvetica, sans-serif;
font-size:85%; font-size:85%;
} }

View File

@ -1042,7 +1042,7 @@ openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClie
this._current_state = null; this._current_state = null;
}, },
render_element: function() { render_element: function() {
this.$element = $('<div/>'); this.$element = $('<body/>');
this.$element.attr("id", "oe"); this.$element.attr("id", "oe");
this.$element.addClass("openerp"); this.$element.addClass("openerp");
}, },

View File

@ -502,7 +502,7 @@ openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp.
.attr('action', ajax.url + '?' + $.param(data)) .attr('action', ajax.url + '?' + $.param(data))
.append($('<input type="hidden" name="r" />').attr('value', payload_str)) .append($('<input type="hidden" name="r" />').attr('value', payload_str))
.hide() .hide()
.appendTo($('.openerp')); .appendTo($('body'));
var cleanUp = function() { var cleanUp = function() {
if ($iframe) { if ($iframe) {
$iframe.unbind("load").attr("src", "javascript:false;").remove(); $iframe.unbind("load").attr("src", "javascript:false;").remove();

View File

@ -1544,7 +1544,7 @@ openerp.web.form.FieldText = openerp.web.form.Field.extend({
_.each('font-family,font-size,white-space'.split(','), function(style) { _.each('font-family,font-size,white-space'.split(','), function(style) {
$div.css(style, $input.css(style)); $div.css(style, $input.css(style));
}); });
$div.appendTo($(".openerp")); $div.appendTo($('body'));
new_height = $div.height(); new_height = $div.height();
if (new_height < 90) { if (new_height < 90) {
new_height = 90; new_height = 90;
@ -3155,7 +3155,7 @@ openerp.web.form.FieldStatus = openerp.web.form.Field.extend({
var div = $("<div></div>"); var div = $("<div></div>");
div.css("display", "none"); div.css("display", "none");
div.css("color", color); div.css("color", color);
div.appendTo($(".openerp")); div.appendTo($("body"));
var ncolor = div.css("color"); var ncolor = div.css("color");
div.remove(); div.remove();
var res = /^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/.exec(ncolor); var res = /^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/.exec(ncolor);