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
Léo-Paul Géneau
erp5
Commits
fd5a9d60
Commit
fd5a9d60
authored
Oct 25, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_js_style: publish the page current language
parent
78cf1c94
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
296 additions
and
5 deletions
+296
-5
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
+1
-1
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
+7
-3
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
+1
-1
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleRelativeLinkHandling.zpt
..._tests/js_style_zuite/testJsStyleRelativeLinkHandling.zpt
+5
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionForm.zpt
...portal_tests/js_style_zuite/testJsStyleWebSectionForm.zpt
+15
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionNavigateBaseLink.zpt
.../js_style_zuite/testJsStyleWebSectionNavigateBaseLink.zpt
+20
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionNavigateByReference.zpt
..._style_zuite/testJsStyleWebSectionNavigateByReference.zpt
+30
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionWithLanguageBaseUrl.zpt
..._style_zuite/testJsStyleWebSectionWithLanguageBaseUrl.zpt
+10
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionWithWebSiteBaseUrl.zpt
...s_style_zuite/testJsStyleWebSectionWithWebSiteBaseUrl.zpt
+10
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteBrowseSitemap.zpt
..._tests/js_style_zuite/testJsStyleWebSiteBrowseSitemap.zpt
+30
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteBrowseSitemapWithLanguageBaseUrl.zpt
...te/testJsStyleWebSiteBrowseSitemapWithLanguageBaseUrl.zpt
+30
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteChangeLanguage.zpt
...tests/js_style_zuite/testJsStyleWebSiteChangeLanguage.zpt
+20
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteChangeLanguageWithLanguageBaseUrl.zpt
...e/testJsStyleWebSiteChangeLanguageWithLanguageBaseUrl.zpt
+20
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteChangeLanguageWithWebSiteBaseUrl.zpt
...te/testJsStyleWebSiteChangeLanguageWithWebSiteBaseUrl.zpt
+20
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteEmptySitemap.zpt
...l_tests/js_style_zuite/testJsStyleWebSiteEmptySitemap.zpt
+5
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteForm.zpt
...em/portal_tests/js_style_zuite/testJsStyleWebSiteForm.zpt
+15
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteNavigateBaseLink.zpt
...sts/js_style_zuite/testJsStyleWebSiteNavigateBaseLink.zpt
+20
-0
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteNavigateByReference.zpt
.../js_style_zuite/testJsStyleWebSiteNavigateByReference.zpt
+30
-0
bt5/erp5_web_js_style_test/SkinTemplateItem/portal_skins/erp5_web_js_style_test/jsstyle_demo.html.html
...ortal_skins/erp5_web_js_style_test/jsstyle_demo.html.html
+1
-0
bt5/erp5_web_js_style_test/SkinTemplateItem/portal_skins/erp5_web_js_style_test/jsstyle_demo.js.js
...em/portal_skins/erp5_web_js_style_test/jsstyle_demo.js.js
+6
-0
No files found.
bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/dialog_main.zpt
View file @
fd5a9d60
...
...
@@ -25,7 +25,7 @@
current_language python: web_site.getPortalObject().Localizer.get_selected_language();
global_definitions_macros here/global_definitions/macros;"
>
<tal:block
metal:use-macro=
"global_definitions_macros/header_definitions"
/>
<html>
<html
tal:attributes=
"lang current_language"
>
<head>
<base
tal:attributes=
"href python: '%s/' % web_section.absolute_url()"
/>
<meta
name=
"viewport"
content=
"width=device-width,height=device-height,initial-scale=1"
/>
...
...
bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/jsstyle.js.js
View file @
fd5a9d60
...
...
@@ -145,7 +145,7 @@
return
result
;
}
function
parsePageContent
(
body_element
,
base_uri
)
{
function
parsePageContent
(
body_element
,
language
,
base_uri
)
{
var
i
,
element
,
element_list
,
...
...
@@ -174,6 +174,7 @@
return
{
original_content
:
body_element
.
innerHTML
,
html_content
:
body_element
.
querySelector
(
'
main
'
).
innerHTML
,
language
:
language
,
language_list
:
parseLanguageElement
(
body_element
.
querySelector
(
'
nav#language
'
)
),
...
...
@@ -215,7 +216,9 @@
// consider this must be reloaded
throw
new
Error
(
'
Trigger an error to force reload
'
);
}
parsed_content
=
parsePageContent
(
dom_parser
.
body
,
dom_parser
.
baseURI
);
parsed_content
=
parsePageContent
(
dom_parser
.
body
,
dom_parser
.
documentElement
.
lang
,
dom_parser
.
baseURI
);
gadget
.
parsed_content
=
parsed_content
;
parsed_content
.
page_title
=
dom_parser
.
title
;
return
result_dict
.
style_gadget
.
render
(
parsed_content
.
html_content
,
...
...
@@ -312,7 +315,8 @@
return
rJS
.
declareCSS
(
style_css_url
,
document
.
head
);
}
parsed_content
=
parsePageContent
(
gadget
.
element
);
parsed_content
=
parsePageContent
(
gadget
.
element
,
document
.
documentElement
.
lang
);
gadget
.
parsed_content
=
parsed_content
;
parsed_content
.
page_title
=
document
.
title
;
gadget
.
style_gadget_url
=
...
...
bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/view_main.zpt
View file @
fd5a9d60
...
...
@@ -24,7 +24,7 @@
current_language python: web_site.getPortalObject().Localizer.get_selected_language();
global_definitions_macros here/global_definitions/macros;"
>
<tal:block
metal:use-macro=
"global_definitions_macros/header_definitions"
/>
<html>
<html
tal:attributes=
"lang current_language"
>
<head>
<base
tal:attributes=
"href python: '%s/' % web_section.absolute_url()"
/>
<meta
name=
"viewport"
content=
"width=device-width,height=device-height,initial-scale=1"
/>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleRelativeLinkHandling.zpt
View file @
fd5a9d60
...
...
@@ -50,6 +50,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionForm.zpt
View file @
fd5a9d60
...
...
@@ -55,6 +55,11 @@
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/erp5_web_js_style_test_section_form/jsstyle_demo.html')]
</td>
...
...
@@ -121,6 +126,11 @@
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/erp5_web_js_style_test_section_form/jsstyle_demo.html')]
</td>
...
...
@@ -188,6 +198,11 @@
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/erp5_web_js_style_test_section_form/jsstyle_demo.html')]
</td>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionNavigateBaseLink.zpt
View file @
fd5a9d60
...
...
@@ -50,6 +50,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/erp5_web_js_style_test_section_1/jsstyle_demo.html')]
</td>
...
...
@@ -79,6 +84,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/erp5_web_js_style_test_section_1/jsstyle_demo.html')]
</td>
...
...
@@ -117,6 +127,11 @@
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'fr')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/fr/erp5_web_js_style_test_section_1/jsstyle_demo.html')]
</td>
...
...
@@ -146,6 +161,11 @@
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'fr')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/fr/erp5_web_js_style_test_section_1/jsstyle_demo.html')]
</td>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionNavigateByReference.zpt
View file @
fd5a9d60
...
...
@@ -50,6 +50,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/erp5_web_js_style_test_section_1/jsstyle_demo.html')]
</td>
...
...
@@ -79,6 +84,11 @@
<td>
//main//p[text()='Subpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/erp5_web_js_style_test_section_1/jsstyle_demo.html')]
</td>
...
...
@@ -108,6 +118,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/erp5_web_js_style_test_section_1/jsstyle_demo.html')]
</td>
...
...
@@ -146,6 +161,11 @@
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'fr')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/fr/erp5_web_js_style_test_section_1/jsstyle_demo.html')]
</td>
...
...
@@ -175,6 +195,11 @@
<td>
//main//p[text()='Contenu de la sous page']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'fr')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/fr/erp5_web_js_style_test_section_1/jsstyle_demo.html')]
</td>
...
...
@@ -204,6 +229,11 @@
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'fr')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/fr/erp5_web_js_style_test_section_1/jsstyle_demo.html')]
</td>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionWithLanguageBaseUrl.zpt
View file @
fd5a9d60
...
...
@@ -50,6 +50,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
@@ -90,6 +95,11 @@
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'fr')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/fr/jsstyle_demo.html')]
</td>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSectionWithWebSiteBaseUrl.zpt
View file @
fd5a9d60
...
...
@@ -50,6 +50,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
@@ -90,6 +95,11 @@
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'fr')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteBrowseSitemap.zpt
View file @
fd5a9d60
...
...
@@ -50,6 +50,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
@@ -88,6 +93,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/erp5_web_js_style_test_section_1/jsstyle_demo.html')]
</td>
...
...
@@ -126,6 +136,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/erp5_web_js_style_test_section_1/erp5_web_js_style_test_section_11/jsstyle_demo.html')]
</td>
...
...
@@ -164,6 +179,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/erp5_web_js_style_test_section_1/jsstyle_demo.html')]
</td>
...
...
@@ -202,6 +222,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/erp5_web_js_style_test_section_2/jsstyle_demo.html')]
</td>
...
...
@@ -240,6 +265,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteBrowseSitemapWithLanguageBaseUrl.zpt
View file @
fd5a9d60
...
...
@@ -50,6 +50,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
@@ -83,6 +88,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
@@ -116,6 +126,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
@@ -149,6 +164,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
@@ -182,6 +202,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
@@ -215,6 +240,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteChangeLanguage.zpt
View file @
fd5a9d60
...
...
@@ -45,6 +45,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//p[text()='Frontpage content']
</td>
...
...
@@ -83,6 +88,11 @@
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'fr')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
...
...
@@ -121,6 +131,11 @@
<td>
//main//p[text()="主页内容"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'zh')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//p[text()="主页内容"]
</td>
...
...
@@ -159,6 +174,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//p[text()='Frontpage content']
</td>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteChangeLanguageWithLanguageBaseUrl.zpt
View file @
fd5a9d60
...
...
@@ -45,6 +45,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//p[text()='Frontpage content']
</td>
...
...
@@ -83,6 +88,11 @@
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'fr')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
...
...
@@ -121,6 +131,11 @@
<td>
//main//p[text()="主页内容"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'zh')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//p[text()="主页内容"]
</td>
...
...
@@ -159,6 +174,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//p[text()='Frontpage content']
</td>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteChangeLanguageWithWebSiteBaseUrl.zpt
View file @
fd5a9d60
...
...
@@ -45,6 +45,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//p[text()='Frontpage content']
</td>
...
...
@@ -78,6 +83,11 @@
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'fr')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
...
...
@@ -111,6 +121,11 @@
<td>
//main//p[text()="主页内容"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'zh')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//p[text()="主页内容"]
</td>
...
...
@@ -144,6 +159,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//main//p[text()='Frontpage content']
</td>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteEmptySitemap.zpt
View file @
fd5a9d60
...
...
@@ -50,6 +50,11 @@
<td>
//main[text()='Empty Sitemap']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteForm.zpt
View file @
fd5a9d60
...
...
@@ -55,6 +55,11 @@
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
@@ -121,6 +126,11 @@
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
@@ -188,6 +198,11 @@
<td>
//main//form
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteNavigateBaseLink.zpt
View file @
fd5a9d60
...
...
@@ -50,6 +50,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
@@ -79,6 +84,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
@@ -117,6 +127,11 @@
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'fr')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/fr/jsstyle_demo.html')]
</td>
...
...
@@ -146,6 +161,11 @@
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'fr')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/fr/jsstyle_demo.html')]
</td>
...
...
bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteNavigateByReference.zpt
View file @
fd5a9d60
...
...
@@ -50,6 +50,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
@@ -79,6 +84,11 @@
<td>
//main//p[text()='Subpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
@@ -108,6 +118,11 @@
<td>
//main//p[text()='Frontpage content']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'en')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/jsstyle_demo.html')]
</td>
...
...
@@ -146,6 +161,11 @@
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'fr')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/fr/jsstyle_demo.html')]
</td>
...
...
@@ -175,6 +195,11 @@
<td>
//main//p[text()='Contenu de la sous page']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'fr')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/fr/jsstyle_demo.html')]
</td>
...
...
@@ -204,6 +229,11 @@
<td>
//main//p[text()="Contenu de la page d'accueil"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='current_language'][contains(text(), 'fr')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//p[@id='gadget_style_url'][contains(text(), 'erp5_web_js_style_test_site/fr/jsstyle_demo.html')]
</td>
...
...
bt5/erp5_web_js_style_test/SkinTemplateItem/portal_skins/erp5_web_js_style_test/jsstyle_demo.html.html
View file @
fd5a9d60
...
...
@@ -11,6 +11,7 @@
<p
id=
"gadget_style_url"
></p>
<p
id=
"render_count"
></p>
<p
id=
"portal_status_message"
></p>
<p
id=
"current_language"
></p>
<nav
id=
"language"
></nav>
<nav
id=
"sitemap"
></nav>
<aside
id=
"document_list"
></aside>
...
...
bt5/erp5_web_js_style_test/SkinTemplateItem/portal_skins/erp5_web_js_style_test/jsstyle_demo.js.js
View file @
fd5a9d60
...
...
@@ -36,6 +36,7 @@
.
declareMethod
(
"
render
"
,
function
(
html_content
,
parsed_content
)
{
var
state
=
{
document_list
:
JSON
.
stringify
(
parsed_content
.
document_list
||
[]),
current_language
:
parsed_content
.
language
||
""
,
language_list
:
JSON
.
stringify
(
parsed_content
.
language_list
||
[]),
sitemap
:
JSON
.
stringify
(
parsed_content
.
sitemap
||
{}),
page_title
:
parsed_content
.
page_title
||
""
,
...
...
@@ -87,6 +88,11 @@
text
:
'
render count:
'
+
gadget
.
state
.
render_count
});
}
if
(
modification_dict
.
hasOwnProperty
(
'
current_language
'
))
{
domsugar
(
gadget
.
element
.
querySelector
(
'
p#current_language
'
),
{
text
:
gadget
.
state
.
current_language
});
}
if
(
modification_dict
.
hasOwnProperty
(
'
language_list
'
))
{
language_list
=
JSON
.
parse
(
gadget
.
state
.
language_list
);
child_list
=
[];
...
...
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