From 47d7045f76ea2767d54835b79ec0a264d1e82e0f Mon Sep 17 00:00:00 2001 From: Kersten Jeremy Date: Fri, 7 Mar 2014 18:44:11 +0100 Subject: [PATCH] [FIX] Move bootstrap.css outside from the single css file generate. Without that, OpenERP become unusable in IE due to the follows limitations: - All style tags after the first 31 style tags are not applied. - All style rules after the first 4,095 rules are not applied. - On pages that uses the @import rule to continously import external style sheets that import other style sheets, style sheets that are more than three levels deep are ignored. (http://support.microsoft.com/kb/262161/en) bzr revid: jke@openerp.com-20140307174411-hejt3x324nlv6tjr --- addons/web/controllers/main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index b84efc72e14..f57ed91070a 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -356,7 +356,13 @@ def manifest_glob(extension, addons=None, db=None, include_remotes=False): r.append((None, pattern)) else: for path in glob.glob(os.path.normpath(os.path.join(addons_path, addon, pattern))): - r.append((path, fs2web(path[len(addons_path):]))) + # Hack for IE, who limit 288Ko, 4095 rules, 31 sheets + # http://support.microsoft.com/kb/262161/en + if pattern == "static/lib/bootstrap/css/bootstrap.css": + if include_remotes: + r.insert(0, (None, fs2web(path[len(addons_path):]))) + else: + r.append((path, fs2web(path[len(addons_path):]))) return r def manifest_list(extension, mods=None, db=None, debug=False):