Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Frederic Thoma
erp5
Commits
4ea070d9
Commit
4ea070d9
authored
Jun 28, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_js_style: factorize default css definition
parent
7d2df410
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/dialog_main.zpt
...ateItem/portal_skins/erp5_web_js_style_ui/dialog_main.zpt
+4
-2
bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/jsstyle.js.js
...plateItem/portal_skins/erp5_web_js_style_ui/jsstyle.js.js
+3
-2
bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/view_main.zpt
...plateItem/portal_skins/erp5_web_js_style_ui/view_main.zpt
+4
-2
No files found.
bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/dialog_main.zpt
View file @
4ea070d9
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
web_site python: here.getWebSiteValue();
web_site python: here.getWebSiteValue();
web_section python: here.getWebSectionValue();
web_section python: here.getWebSectionValue();
no_style_gadget_url python: web_section.getLayoutProperty('configuration_style_gadget_url', default='');
no_style_gadget_url python: web_section.getLayoutProperty('configuration_style_gadget_url', default='');
no_style_css_url python: 'jsstyle.css';
favicon_url python: web_section.getLayoutProperty('configuration_favicon_url', default='');
favicon_url python: web_section.getLayoutProperty('configuration_favicon_url', default='');
global_definitions_macros here/global_definitions/macros;"
>
global_definitions_macros here/global_definitions/macros;"
>
<tal:block
metal:use-macro=
"global_definitions_macros/header_definitions"
/>
<tal:block
metal:use-macro=
"global_definitions_macros/header_definitions"
/>
...
@@ -20,7 +21,7 @@
...
@@ -20,7 +21,7 @@
<meta
name=
"viewport"
content=
"width=device-width,height=device-height,initial-scale=1"
/>
<meta
name=
"viewport"
content=
"width=device-width,height=device-height,initial-scale=1"
/>
<title
tal:content=
"python: here.getTranslatedTitle() or web_section.getTranslatedTitle()"
></title>
<title
tal:content=
"python: here.getTranslatedTitle() or web_section.getTranslatedTitle()"
></title>
<noscript>
<noscript>
<link
rel=
"stylesheet"
href=
"jsstyle.css
"
>
<link
rel=
"stylesheet"
tal-attributes=
"href no_style_css_url
"
>
</noscript>
</noscript>
<tal:block
tal:condition=
"favicon_url"
>
<tal:block
tal:condition=
"favicon_url"
>
<link
rel=
"icon"
tal:attributes=
"href favicon_url"
/>
<link
rel=
"icon"
tal:attributes=
"href favicon_url"
/>
...
@@ -33,7 +34,8 @@
...
@@ -33,7 +34,8 @@
<link
rel=
"prerender"
tal:attributes=
"href no_style_gadget_url"
>
<link
rel=
"prerender"
tal:attributes=
"href no_style_gadget_url"
>
</tal:block>
</tal:block>
</head>
</head>
<body
tal:attributes=
"data-nostyle-gadget-url no_style_gadget_url"
>
<body
tal:attributes=
"data-nostyle-gadget-url no_style_gadget_url;
data-nostyle-css-url no_style_css_url"
>
<tal:block
tal:content=
"structure python: web_site.WebSite_generateNavigationHTML()"
></tal:block>
<tal:block
tal:content=
"structure python: web_site.WebSite_generateNavigationHTML()"
></tal:block>
<main>
<main>
...
...
bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/jsstyle.js.js
View file @
4ea070d9
...
@@ -297,11 +297,12 @@
...
@@ -297,11 +297,12 @@
style_gadget
,
style_gadget
,
body
=
gadget
.
element
,
body
=
gadget
.
element
,
style_gadget_url
=
body
.
getAttribute
(
"
data-nostyle-gadget-url
"
),
style_gadget_url
=
body
.
getAttribute
(
"
data-nostyle-gadget-url
"
),
style_css_url
=
body
.
getAttribute
(
"
data-nostyle-css-url
"
),
parsed_content
;
parsed_content
;
if
(
!
style_gadget_url
)
{
if
(
!
style_gadget_url
)
{
// No style configured, use backend only rendering
// No style configured, use backend only rendering
return
rJS
.
declareCSS
(
"
jsstyle.css
"
,
document
.
head
);
return
rJS
.
declareCSS
(
style_css_url
,
document
.
head
);
}
}
parsed_content
=
parsePageContent
(
gadget
.
element
);
parsed_content
=
parsePageContent
(
gadget
.
element
);
...
@@ -329,7 +330,7 @@
...
@@ -329,7 +330,7 @@
});
});
},
function
(
error
)
{
},
function
(
error
)
{
console
.
warn
(
'
Cant load the style gadget
'
,
error
);
console
.
warn
(
'
Cant load the style gadget
'
,
error
);
return
new
RSVP
.
Queue
(
rJS
.
declareCSS
(
"
jsstyle.css
"
,
document
.
head
))
return
new
RSVP
.
Queue
(
rJS
.
declareCSS
(
style_css_url
,
document
.
head
))
.
push
(
function
()
{
.
push
(
function
()
{
// Set again the page content after the css is loaded
// Set again the page content after the css is loaded
// to prevent ugly rendering
// to prevent ugly rendering
...
...
bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/view_main.zpt
View file @
4ea070d9
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
web_site python: here.getWebSiteValue();
web_site python: here.getWebSiteValue();
web_section python: here.getWebSectionValue();
web_section python: here.getWebSectionValue();
no_style_gadget_url python: web_section.getLayoutProperty('configuration_style_gadget_url', default='');
no_style_gadget_url python: web_section.getLayoutProperty('configuration_style_gadget_url', default='');
no_style_css_url python: 'jsstyle.css';
favicon_url python: web_section.getLayoutProperty('configuration_favicon_url', default='');
favicon_url python: web_section.getLayoutProperty('configuration_favicon_url', default='');
global_definitions_macros here/global_definitions/macros;"
>
global_definitions_macros here/global_definitions/macros;"
>
<tal:block
metal:use-macro=
"global_definitions_macros/header_definitions"
/>
<tal:block
metal:use-macro=
"global_definitions_macros/header_definitions"
/>
...
@@ -19,7 +20,7 @@
...
@@ -19,7 +20,7 @@
<meta
name=
"viewport"
content=
"width=device-width,height=device-height,initial-scale=1"
/>
<meta
name=
"viewport"
content=
"width=device-width,height=device-height,initial-scale=1"
/>
<title
tal:content=
"python: here.getTranslatedTitle() or web_section.getTranslatedTitle()"
></title>
<title
tal:content=
"python: here.getTranslatedTitle() or web_section.getTranslatedTitle()"
></title>
<noscript>
<noscript>
<link
rel=
"stylesheet"
href=
"jsstyle.css
"
>
<link
rel=
"stylesheet"
tal-attributes=
"href no_style_css_url
"
>
</noscript>
</noscript>
<tal:block
tal:condition=
"favicon_url"
>
<tal:block
tal:condition=
"favicon_url"
>
<link
rel=
"icon"
tal:attributes=
"href favicon_url"
/>
<link
rel=
"icon"
tal:attributes=
"href favicon_url"
/>
...
@@ -32,7 +33,8 @@
...
@@ -32,7 +33,8 @@
<link
rel=
"prerender"
tal:attributes=
"href no_style_gadget_url"
>
<link
rel=
"prerender"
tal:attributes=
"href no_style_gadget_url"
>
</tal:block>
</tal:block>
</head>
</head>
<body
tal:attributes=
"data-nostyle-gadget-url no_style_gadget_url"
>
<body
tal:attributes=
"data-nostyle-gadget-url no_style_gadget_url;
data-nostyle-css-url no_style_css_url"
>
<tal:block
tal:content=
"structure python: web_site.WebSite_generateNavigationHTML()"
></tal:block>
<tal:block
tal:content=
"structure python: web_site.WebSite_generateNavigationHTML()"
></tal:block>
<p
tal:content=
"request/portal_status_message | nothing"
id=
"portal_status_message"
/>
<p
tal:content=
"request/portal_status_message | nothing"
id=
"portal_status_message"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment