Commit 45cac3c5 authored by Yusei Tahara's avatar Yusei Tahara

Revert "[erp5_web_renderjs_ui] Use absolute wallpaper image URL to support firefox."

URL convertion has to be done by javascript so that the code become useable for officejs.

This reverts commit 9f8dd82c.
parent 9f8dd82c
import json
import re
import urlparse
if REQUEST is None:
REQUEST = context.REQUEST
......@@ -74,10 +73,6 @@ wallpaper_url = web_section.getLayoutProperty("configuration_wallpaper_url", def
if wallpaper_url is None:
mapping_dict["extra_css_full_link_tag"] = ''
else:
if not urlparse.urlparse(wallpaper_url).scheme:
wallpaper_absolute_url = urlparse.urljoin(root_website_url+'/', wallpaper_url);
else:
wallpaper_absolute_url = wallpaper_url
from base64 import urlsafe_b64encode
mapping_dict["extra_css_full_link_tag"] = '<link rel="stylesheet" href="data:text/css;base64,%s">' % urlsafe_b64encode("""
html::after {
......@@ -94,6 +89,6 @@ else:
background-attachment: fixed;
background-image: url("%s");
}
""" % wallpaper_absolute_url);
""" % wallpaper_url);
return view_as_web_method(mapping_dict=mapping_dict)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment