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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
db817eac
Commit
db817eac
authored
Jun 29, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preference / language
parent
c4e9b944
Changes
26
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
2227 additions
and
173 deletions
+2227
-173
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
...rtal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
+20
-1
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_appcache.xml
...teItem/web_page_module/gadget_supportrequest_appcache.xml
+5
-5
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_html.html
...ge_module/gadget_supportrequest_page_preference_html.html
+32
-0
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_html.xml
...age_module/gadget_supportrequest_page_preference_html.xml
+324
-0
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_js.js
...b_page_module/gadget_supportrequest_page_preference_js.js
+137
-0
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_js.xml
..._page_module/gadget_supportrequest_page_preference_js.xml
+320
-0
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_panel_js.js
...ateItem/web_page_module/gadget_supportrequest_panel_js.js
+1
-1
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_panel_js.xml
...teItem/web_page_module/gadget_supportrequest_panel_js.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_html.html
...lateItem/web_page_module/rjs_gadget_erp5_header_html.html
+2
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_html.xml
...plateItem/web_page_module/rjs_gadget_erp5_header_html.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.js
...TemplateItem/web_page_module/rjs_gadget_erp5_header_js.js
+9
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.xml
...emplateItem/web_page_module/rjs_gadget_erp5_header_js.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.js
...plateItem/web_page_module/rjs_gadget_erp5_page_form_js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.xml
...lateItem/web_page_module/rjs_gadget_erp5_page_form_js.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_language_html.html
...tem/web_page_module/rjs_gadget_erp5_pt_language_html.html
+36
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_language_html.xml
...Item/web_page_module/rjs_gadget_erp5_pt_language_html.xml
+324
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_language_js.js
...ateItem/web_page_module/rjs_gadget_erp5_pt_language_js.js
+151
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_language_js.xml
...teItem/web_page_module/rjs_gadget_erp5_pt_language_js.xml
+320
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_html.html
...b_page_module/rjs_gadget_erp5_pt_preferencepage_html.html
+0
-12
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_html.xml
...eb_page_module/rjs_gadget_erp5_pt_preferencepage_html.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_js.js
...m/web_page_module/rjs_gadget_erp5_pt_preferencepage_js.js
+17
-130
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_js.xml
.../web_page_module/rjs_gadget_erp5_pt_preferencepage_js.xml
+4
-4
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPagePreferenceEdit.xml
...l_tests/renderjs_ui_page_zuite/testPagePreferenceEdit.xml
+58
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPagePreferenceEdit.zpt
...l_tests/renderjs_ui_page_zuite/testPagePreferenceEdit.zpt
+132
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testPageLanguage.xml
...al_tests/renderjs_ui_translate_zuite/testPageLanguage.xml
+1
-1
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testPageLanguage.zpt
...al_tests/renderjs_ui_translate_zuite/testPageLanguage.zpt
+318
-0
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
View file @
db817eac
...
@@ -464,6 +464,7 @@ url_template_dict = {
...
@@ -464,6 +464,7 @@ url_template_dict = {
"search_template"
:
"%(root_url)s/%(script_id)s?mode=search"
+
\
"search_template"
:
"%(root_url)s/%(script_id)s?mode=search"
+
\
"{&query,select_list*,limit*,sort_on*,local_roles*,selection_domain*}"
,
"{&query,select_list*,limit*,sort_on*,local_roles*,selection_domain*}"
,
"worklist_template"
:
"%(root_url)s/%(script_id)s?mode=worklist"
,
"worklist_template"
:
"%(root_url)s/%(script_id)s?mode=worklist"
,
"preferences_template"
:
"%(root_url)s/%(script_id)s?mode=preferences"
,
# Custom search comes with Listboxes where "list_method" is specified. We pass even listbox's
# Custom search comes with Listboxes where "list_method" is specified. We pass even listbox's
# own URL so the search can resolve template fields for proper rendering/formatting/editability
# own URL so the search can resolve template fields for proper rendering/formatting/editability
# of the results (because they will be backed up with real documents).
# of the results (because they will be backed up with real documents).
...
@@ -1608,6 +1609,13 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
...
@@ -1608,6 +1609,13 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
"script_id"
:
script
.
id
"script_id"
:
script
.
id
}
}
}
}
elif
relative_url
==
'portal_preferences'
:
result_dict
[
'_links'
][
'action_preferences'
]
=
{
"href"
:
url_template_dict
[
'preferences_template'
]
%
{
"root_url"
:
site_root
.
absolute_url
(),
"script_id"
:
script
.
id
}
}
elif
relative_url
==
'acl_users'
:
elif
relative_url
==
'acl_users'
:
logout_relative_url
=
site_root
.
getLayoutProperty
(
"configuration_logout"
,
default
=
""
)
logout_relative_url
=
site_root
.
getLayoutProperty
(
"configuration_logout"
,
default
=
""
)
if
(
logout_relative_url
):
if
(
logout_relative_url
):
...
@@ -2102,7 +2110,18 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
...
@@ -2102,7 +2110,18 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
response
.
setStatus
(
405
)
response
.
setStatus
(
405
)
return
""
return
""
result_dict
[
"result_list"
]
=
[
calculateHateoas
(
mode
=
"traverse"
,
**
x
)
for
x
in
byteify
(
json
.
loads
(
bulk_list
))]
result_dict
[
"result_list"
]
=
[
calculateHateoas
(
mode
=
"traverse"
,
**
x
)
for
x
in
byteify
(
json
.
loads
(
bulk_list
))]
elif
mode
==
'preferences'
:
if
REQUEST
.
other
[
'method'
]
!=
"GET"
:
response
.
setStatus
(
405
)
return
""
preference_tool
=
portal
.
portal_preferences
preference
=
preference_tool
.
getActiveUserPreference
()
if
preference
:
result_dict
[
"preference"
]
=
preference
.
getRelativeUrl
()
result_dict
[
"preferred_user_interface_language_list"
]
=
preference_tool
.
getPreference
(
'preferred_user_interface_language_list'
,
None
)
else
:
result_dict
[
"preference"
]
=
preference_tool
.
getRelativeUrl
()
elif
mode
==
'worklist'
:
elif
mode
==
'worklist'
:
#################################################
#################################################
# Return all worklist jio urls
# Return all worklist jio urls
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_appcache.xml
View file @
db817eac
...
@@ -155,8 +155,8 @@ gadget_erp5_page_homepage.html\n
...
@@ -155,8 +155,8 @@ gadget_erp5_page_homepage.html\n
gadget_erp5_page_homepage.js\n
gadget_erp5_page_homepage.js\n
gadget_erp5_page_list.html\n
gadget_erp5_page_list.html\n
gadget_erp5_page_list.js\n
gadget_erp5_page_list.js\n
gadget_erp5_page_preference.html\n
gadget_erp5_page_
supportrequest_
preference.html\n
gadget_erp5_page_preference.js\n
gadget_erp5_page_
supportrequest_
preference.js\n
gadget_erp5_page_support_request_fast_view_dialog.html\n
gadget_erp5_page_support_request_fast_view_dialog.html\n
gadget_erp5_page_support_request_fast_view_dialog.js\n
gadget_erp5_page_support_request_fast_view_dialog.js\n
gadget_erp5_panel.png?format=png\n
gadget_erp5_panel.png?format=png\n
...
@@ -343,7 +343,7 @@ NETWORK:\n
...
@@ -343,7 +343,7 @@ NETWORK:\n
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.24350.22363.64716
</string>
</value>
<value>
<string>
96
6.44322.37377.38894
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -361,8 +361,8 @@ NETWORK:\n
...
@@ -361,8 +361,8 @@ NETWORK:\n
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
06522160.66
</float>
<float>
15
23022776.2
</float>
<string>
UTC
</string>
<string>
GMT+2
</string>
</tuple>
</tuple>
</state>
</state>
</object>
</object>
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_html.html
0 → 100644
View file @
db817eac
<!DOCTYPE html>
<html>
<!--
data-i18n=User
data-i18n=Language
-->
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
<title>
ERP5 Support Request Page Preferences
</title>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"gadget_erp5_page_supportrequest_preference.js"
type=
"text/javascript"
></script>
</head>
<body>
<form
class=
"preference"
>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"
></button>
<div
data-gadget-url=
"gadget_erp5_form.html"
data-gadget-scope=
"erp5_form"
data-gadget-sandbox=
"public"
>
</div>
</form>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_html.xml
0 → 100644
View file @
db817eac
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_js.js
0 → 100644
View file @
db817eac
/*global window, rJS, RSVP */
/*jslint indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
)
{
"
use strict
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// handle acquisition
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
"
notifySubmitted
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
,
user
=
"
Who are you?
"
,
header_dict
=
{
page_title
:
'
Preferences
'
,
page_icon
:
'
sliders
'
,
save_action
:
true
};
return
gadget
.
getUrlFor
({
command
:
'
display
'
})
.
push
(
function
(
front_url
)
{
header_dict
.
front_url
=
front_url
;
return
gadget
.
updateHeader
(
header_dict
);
})
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
erp5_form
"
);
})
.
push
(
function
(
erp5_form
)
{
gadget
.
state
.
erp5_form
=
erp5_form
;
return
gadget
.
getSetting
(
'
me
'
);
})
.
push
(
function
(
me
)
{
if
(
me
!==
undefined
)
{
return
gadget
.
jio_allDocs
({
query
:
'
relative_url:"
'
+
me
+
'
"
'
,
select_list
:
[
'
title
'
]
})
.
push
(
function
(
result
)
{
user
=
result
.
data
.
rows
[
0
].
value
.
title
;
});
}
})
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getSetting
(
"
language_map
"
),
gadget
.
getSetting
(
"
selected_language
"
),
gadget
.
getSetting
(
"
default_selected_language
"
),
gadget
.
translate
(
"
User
"
),
gadget
.
translate
(
"
Language
"
)
]);
})
.
push
(
function
(
results
)
{
var
selected_language
=
results
[
1
]
||
results
[
2
],
key
,
list_item
=
[],
options
=
JSON
.
parse
(
results
[
0
]);
gadget
.
state
.
old_selected_lang
=
selected_language
;
for
(
key
in
options
)
{
if
(
options
.
hasOwnProperty
(
key
))
{
list_item
.
push
([
options
[
key
],
key
]);
}
}
return
gadget
.
state
.
erp5_form
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
'
User
'
:
{
"
default
"
:
user
,
"
editable
"
:
0
,
"
key
"
:
"
field_user
"
,
"
title
"
:
results
[
3
],
"
type
"
:
"
StringField
"
},
'
Language
'
:
{
"
default
"
:
selected_language
,
"
editable
"
:
1
,
"
items
"
:
list_item
,
"
key
"
:
"
field_language
"
,
"
title
"
:
results
[
4
],
"
type
"
:
"
ListField
"
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
[[
"
left
"
,
[[
"
User
"
],
[
"
Language
"
]]
]]
}
});
});
})
.
declareMethod
(
'
triggerSubmit
'
,
function
()
{
this
.
element
.
querySelector
(
'
button
'
).
click
();
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
,
selected_lang
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
state
.
erp5_form
.
getContent
();
})
.
push
(
function
(
data
)
{
selected_lang
=
data
.
field_language
;
return
gadget
.
setSetting
(
"
selected_language
"
,
selected_lang
);
})
.
push
(
function
()
{
if
(
gadget
.
state
.
old_selected_lang
!==
selected_lang
)
{
return
gadget
.
redirect
({
command
:
'
change_language
'
,
options
:
{
language
:
selected_lang
}
});
}
return
gadget
.
notifySubmitted
();
});
});
}(
window
,
rJS
,
RSVP
));
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_js.xml
0 → 100644
View file @
db817eac
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_panel_js.js
View file @
db817eac
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
queue
queue
.
push
(
function
()
{
.
push
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
preference
"
}}),
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
supportrequest_
preference
"
}}),
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
logout
"
}}),
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
logout
"
}}),
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
search
"
}}),
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
search
"
}}),
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
jio_key
:
"
support_request_module
"
,
page
:
"
list
"
}})
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
jio_key
:
"
support_request_module
"
,
page
:
"
list
"
}})
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_panel_js.xml
View file @
db817eac
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.11319.31770.36949
</string>
</value>
<value>
<string>
96
6.44322.37377.38894
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,8 +252,8 @@
...
@@ -252,8 +252,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
05740406.52
</float>
<float>
15
23022102.41
</float>
<string>
UTC
</string>
<string>
GMT+2
</string>
</tuple>
</tuple>
</state>
</state>
</object>
</object>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_html.html
View file @
db817eac
...
@@ -24,6 +24,8 @@
...
@@ -24,6 +24,8 @@
data-i18n=Next
data-i18n=Next
data-i18n=Loading
data-i18n=Loading
data-i18n=Fast Input
data-i18n=Fast Input
data-i18n=Language
-->
-->
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_html.xml
View file @
db817eac
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
3.11788.48702.26146
</string>
</value>
<value>
<string>
96
6.42886.30648.44305
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,8 +252,8 @@
...
@@ -252,8 +252,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
17586466.87
</float>
<float>
15
23261836.15
</float>
<string>
UTC
</string>
<string>
GMT+2
</string>
</tuple>
</tuple>
</state>
</state>
</object>
</object>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.js
View file @
db817eac
...
@@ -39,7 +39,8 @@
...
@@ -39,7 +39,8 @@
possible_right_link_list
=
[
possible_right_link_list
=
[
[
'
edit_url
'
,
'
Editable
'
,
'
pencil
'
],
[
'
edit_url
'
,
'
Editable
'
,
'
pencil
'
],
[
'
view_url
'
,
'
Viewable
'
,
'
eye
'
],
[
'
view_url
'
,
'
Viewable
'
,
'
eye
'
],
[
'
right_url
'
,
'
New
'
,
'
plus
'
]
[
'
right_url
'
,
'
New
'
,
'
plus
'
],
[
'
language_url
'
,
'
Language
'
,
'
language
'
]
],
],
possible_right_button_list
=
[
possible_right_button_list
=
[
[
'
save_action
'
,
'
Save
'
,
'
check
'
,
'
submit
'
],
[
'
save_action
'
,
'
Save
'
,
'
check
'
,
'
submit
'
],
...
@@ -191,9 +192,14 @@
...
@@ -191,9 +192,14 @@
// Handle right link
// Handle right link
for
(
i
=
0
;
i
<
possible_right_link_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
possible_right_link_list
.
length
;
i
+=
1
)
{
if
(
options
.
hasOwnProperty
(
possible_right_link_list
[
i
][
0
]))
{
if
(
options
.
hasOwnProperty
(
possible_right_link_list
[
i
][
0
]))
{
klass
=
""
;
if
(
options
.
extra_class
&&
options
.
extra_class
.
hasOwnProperty
(
possible_right_link_list
[
i
][
0
]))
{
klass
=
options
.
extra_class
[
possible_right_link_list
[
i
][
0
]];
}
else
{
klass
=
""
;
}
if
(
!
options
[
possible_right_link_list
[
i
][
0
]])
{
if
(
!
options
[
possible_right_link_list
[
i
][
0
]])
{
klass
=
"
ui-disabled
"
;
klass
+=
"
ui-disabled
"
;
}
}
state
.
right_link_title
=
possible_right_link_list
[
i
][
1
];
state
.
right_link_title
=
possible_right_link_list
[
i
][
1
];
state
.
right_link_icon
=
possible_right_link_list
[
i
][
2
];
state
.
right_link_icon
=
possible_right_link_list
[
i
][
2
];
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.xml
View file @
db817eac
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
7.34935.2317.153
</string>
</value>
<value>
<string>
96
6.43132.8191.41489
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,8 +248,8 @@
...
@@ -248,8 +248,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
152
6656854.64
</float>
<float>
152
2999676.93
</float>
<string>
UTC
</string>
<string>
GMT+2
</string>
</tuple>
</tuple>
</state>
</state>
</object>
</object>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.js
View file @
db817eac
...
@@ -230,7 +230,7 @@ and handling data send&receive.
...
@@ -230,7 +230,7 @@ and handling data send&receive.
.
push
(
function
()
{
.
push
(
function
()
{
var
jio_key
=
gadget
.
state
.
options
.
jio_key
;
var
jio_key
=
gadget
.
state
.
options
.
jio_key
;
/*jslint regexp: true*/
/*jslint regexp: true*/
if
(
/^
[^\/]
+_module
\/
.+$/
.
test
(
jio_key
))
{
if
(
(
/^
[^\/]
+_module
\/
.+$/
.
test
(
jio_key
))
||
(
/^portal_.*
\/
.+$/
.
test
(
jio_key
)
))
{
/*jslint regexp: false*/
/*jslint regexp: false*/
return
gadget
.
updatePanel
({
return
gadget
.
updatePanel
({
erp5_document
:
erp5_document
,
erp5_document
:
erp5_document
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.xml
View file @
db817eac
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
7.46234.55453.1182
7
</string>
</value>
<value>
<string>
96
6.9690.7007.3899
7
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,8 +248,8 @@
...
@@ -248,8 +248,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
152
7598665.68
</float>
<float>
152
0945628.31
</float>
<string>
UTC
</string>
<string>
GMT+1
</string>
</tuple>
</tuple>
</state>
</state>
</object>
</object>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_language_html.html
0 → 100644
View file @
db817eac
<!DOCTYPE html>
<html>
<!--
data-i18n=User
-->
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
<title>
ERP5 Page Language
</title>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"handlebars.js"
type=
"text/javascript"
></script>
<script
id=
"dialog-button-template"
type=
"text/x-handlebars-template"
>
<
button
name
=
"
action_update
"
type
=
"
submit
"
data
-
i18n
=
"
Update
"
>
Update
<
/button
>
</script>
<script
src=
"gadget_erp5_page_language.js"
type=
"text/javascript"
></script>
</head>
<body>
<form
class=
"preference"
>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"
></button>
<div
data-gadget-url=
"gadget_erp5_form.html"
data-gadget-scope=
"erp5_form"
data-gadget-sandbox=
"public"
>
</div>
<div
class=
"dialog_button_container"
>
</div>
</form>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_language_html.xml
0 → 100644
View file @
db817eac
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_language_js.js
0 → 100644
View file @
db817eac
/*global window, rJS, RSVP, Handlebars */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
dialog_button_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
dialog-button-template
"
)
.
innerHTML
,
dialog_button_template
=
Handlebars
.
compile
(
dialog_button_source
);
gadget_klass
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
"
notifySubmitted
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
,
user
=
"
Who are you?
"
,
header_dict
=
{
page_title
:
'
Language
'
};
return
gadget
.
getUrlFor
({
command
:
'
history_previous
'
})
.
push
(
function
(
result
)
{
header_dict
.
front_url
=
result
;
return
RSVP
.
all
([
gadget
.
updateHeader
(
header_dict
),
gadget
.
getSetting
(
'
me
'
)
]);
})
.
push
(
function
(
result_list
)
{
var
me
=
result_list
[
0
];
if
(
me
!==
undefined
)
{
return
gadget
.
jio_allDocs
({
query
:
'
relative_url:"
'
+
me
+
'
"
'
,
select_list
:
[
'
title
'
]
})
.
push
(
function
(
result
)
{
user
=
result
.
data
.
rows
[
0
].
value
.
title
;
});
}
})
.
push
(
function
()
{
return
gadget
.
jio_getAttachment
(
'
portal_preferences
'
,
'
links
'
);
})
.
push
(
function
(
result
)
{
return
RSVP
.
all
([
gadget
.
getDeclaredGadget
(
"
erp5_form
"
),
gadget
.
jio_getAttachment
(
'
portal_preferences
'
,
result
.
_links
.
action_preferences
.
href
),
gadget
.
getSetting
(
"
language_map
"
),
gadget
.
getSetting
(
"
selected_language
"
),
gadget
.
getSetting
(
"
default_selected_language
"
),
gadget
.
translate
(
"
Language
"
),
gadget
.
translate
(
"
User
"
)
]);
})
.
push
(
function
(
result_list
)
{
var
selected_language
=
result_list
[
3
]
||
result_list
[
4
],
key
,
list_item
=
[],
options
=
JSON
.
parse
(
result_list
[
2
]);
gadget
.
state
.
erp5_form
=
result_list
[
0
];
gadget
.
state
.
old_selected_lang
=
selected_language
;
for
(
key
in
options
)
{
if
(
options
.
hasOwnProperty
(
key
))
{
if
(
!
result_list
[
1
].
preferred_user_interface_language_list
||
result_list
[
1
].
preferred_user_interface_language_list
.
indexOf
(
key
)
!==
-
1
)
{
list_item
.
push
([
options
[
key
],
key
]);
}
}
}
return
gadget
.
state
.
erp5_form
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
'
User
'
:
{
"
default
"
:
user
,
"
editable
"
:
0
,
"
key
"
:
"
field_user
"
,
"
title
"
:
result_list
[
6
],
"
type
"
:
"
StringField
"
},
'
Language
'
:
{
"
default
"
:
selected_language
,
"
editable
"
:
1
,
"
items
"
:
list_item
,
"
key
"
:
"
field_language
"
,
"
title
"
:
result_list
[
5
],
"
type
"
:
"
ListField
"
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
[[
"
left
"
,
[[
"
User
"
],
[
"
Language
"
]]
]]
}
});
})
.
push
(
function
()
{
return
gadget
.
translateHtml
(
dialog_button_template
());
})
.
push
(
function
(
result
)
{
gadget
.
element
.
querySelector
(
'
.dialog_button_container
'
)
.
innerHTML
=
result
;
});
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
,
selected_lang
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
state
.
erp5_form
.
getContent
();
})
.
push
(
function
(
data
)
{
selected_lang
=
data
.
field_language
;
return
gadget
.
setSetting
(
"
selected_language
"
,
selected_lang
);
})
.
push
(
function
()
{
if
(
gadget
.
state
.
old_selected_lang
!==
selected_lang
)
{
return
gadget
.
redirect
({
command
:
'
change_language
'
,
options
:
{
language
:
selected_lang
}
});
}
return
gadget
.
notifySubmitted
();
});
});
}(
window
,
rJS
,
RSVP
,
Handlebars
));
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_language_js.xml
0 → 100644
View file @
db817eac
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_html.html
View file @
db817eac
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<!--
data-i18n=User
data-i18n=Language
-->
<head>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
...
@@ -20,13 +16,5 @@
...
@@ -20,13 +16,5 @@
</head>
</head>
<body>
<body>
<form
class=
"preference"
>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"
></button>
<div
data-gadget-url=
"gadget_erp5_form.html"
data-gadget-scope=
"erp5_form"
data-gadget-sandbox=
"public"
>
</div>
</form>
</body>
</body>
</html>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_html.xml
View file @
db817eac
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
55.51162.4768.3512
3
</string>
</value>
<value>
<string>
9
66.31479.61249.4408
3
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,8 +252,8 @@
...
@@ -252,8 +252,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
482760603.42
</float>
<float>
1
522246564.53
</float>
<string>
UTC
</string>
<string>
GMT+2
</string>
</tuple>
</tuple>
</state>
</state>
</object>
</object>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_js.js
View file @
db817eac
/*global window, rJS
, RSVP
*/
/*global window, rJS */
/*jslint indent: 2, maxerr: 3 */
/*jslint
nomen: true,
indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
)
{
(
function
(
window
,
rJS
)
{
"
use strict
"
;
"
use strict
"
;
rJS
(
window
)
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// handle acquisition
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
"
notifySubmitted
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
()
{
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
,
var
gadget
=
this
;
user
=
"
Who are you?
"
,
return
gadget
.
jio_getAttachment
(
header_dict
=
{
'
portal_preferences
'
,
page_title
:
'
Preferences
'
,
'
links
'
page_icon
:
'
sliders
'
,
)
save_action
:
true
.
push
(
function
(
result
)
{
};
return
gadget
.
jio_getAttachment
(
'
portal_preferences
'
,
return
gadget
.
getUrlFor
({
command
:
'
display
'
})
result
.
_links
.
action_preferences
.
href
.
push
(
function
(
front_url
)
{
);
header_dict
.
front_url
=
front_url
;
return
gadget
.
updateHeader
(
header_dict
);
})
})
.
push
(
function
()
{
.
push
(
function
(
result
)
{
return
gadget
.
getDeclaredGadget
(
"
erp5_form
"
);
return
gadget
.
redirect
({
command
:
'
display
'
,
options
:
{
jio_key
:
result
.
preference
}});
})
.
push
(
function
(
erp5_form
)
{
gadget
.
state
.
erp5_form
=
erp5_form
;
return
gadget
.
getSetting
(
'
me
'
);
})
.
push
(
function
(
me
)
{
if
(
me
!==
undefined
)
{
return
gadget
.
jio_allDocs
({
query
:
'
relative_url:"
'
+
me
+
'
"
'
,
select_list
:
[
'
title
'
]
})
.
push
(
function
(
result
)
{
user
=
result
.
data
.
rows
[
0
].
value
.
title
;
});
}
})
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getSetting
(
"
language_map
"
),
gadget
.
getSetting
(
"
selected_language
"
),
gadget
.
getSetting
(
"
default_selected_language
"
),
gadget
.
translate
(
"
User
"
),
gadget
.
translate
(
"
Language
"
)
]);
})
.
push
(
function
(
results
)
{
var
selected_language
=
results
[
1
]
||
results
[
2
],
key
,
list_item
=
[],
options
=
JSON
.
parse
(
results
[
0
]);
gadget
.
state
.
old_selected_lang
=
selected_language
;
for
(
key
in
options
)
{
if
(
options
.
hasOwnProperty
(
key
))
{
list_item
.
push
([
options
[
key
],
key
]);
}
}
return
gadget
.
state
.
erp5_form
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
'
User
'
:
{
"
default
"
:
user
,
"
editable
"
:
0
,
"
key
"
:
"
field_user
"
,
"
title
"
:
results
[
3
],
"
type
"
:
"
StringField
"
},
'
Language
'
:
{
"
default
"
:
selected_language
,
"
editable
"
:
1
,
"
items
"
:
list_item
,
"
key
"
:
"
field_language
"
,
"
title
"
:
results
[
4
],
"
type
"
:
"
ListField
"
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
[[
"
left
"
,
[[
"
User
"
],
[
"
Language
"
]]
]]
}
});
});
})
.
declareMethod
(
'
triggerSubmit
'
,
function
()
{
this
.
element
.
querySelector
(
'
button
'
).
click
();
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
,
selected_lang
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
state
.
erp5_form
.
getContent
();
})
.
push
(
function
(
data
)
{
selected_lang
=
data
.
field_language
;
return
gadget
.
setSetting
(
"
selected_language
"
,
selected_lang
);
})
.
push
(
function
()
{
if
(
gadget
.
state
.
old_selected_lang
!==
selected_lang
)
{
return
gadget
.
redirect
({
command
:
'
change_language
'
,
options
:
{
language
:
selected_lang
}
});
}
return
gadget
.
notifySubmitted
();
});
});
});
});
}(
window
,
rJS
,
RSVP
));
}(
window
,
rJS
));
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_js.xml
View file @
db817eac
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
<value>
<string>
Gadget ERP5 Preference JS
</string>
</value>
<value>
<string>
Gadget ERP5 P
age P
reference JS
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
version
</string>
</key>
<key>
<string>
version
</string>
</key>
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
5.31910.8218.62941
</string>
</value>
<value>
<string>
96
6.44381.32112.11520
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,8 +248,8 @@
...
@@ -248,8 +248,8 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
18599460.13
</float>
<float>
15
23020654.88
</float>
<string>
UTC
</string>
<string>
GMT+2
</string>
</tuple>
</tuple>
</state>
</state>
</object>
</object>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPagePreferenceEdit.xml
0 → 100644
View file @
db817eac
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testPagePreferenceEdit
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPagePreferenceEdit.zpt
0 → 100644
View file @
db817eac
<html
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test Form View Back Link
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test preference main link
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/?page=preference
</td>
<td></td>
</tr>
<!-- Wait for gadget to be loaded -->
<tr>
<td>
waitForTextPresent
</td>
<td>
Active
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/toggle_editable_mode"
/>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@name='field_my_description']
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
//textarea[@name='field_my_description']
</td>
<td>
test
</td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='User Interface']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='User Interface']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//input[@id='field_my_preferred_html_style_developper_mode']
</td>
<td></td>
</tr>
<tr>
<td>
check
</td>
<td>
//input[@id='field_my_preferred_html_style_developper_mode']
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='View']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='View']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@name='field_my_description']
</td>
<td></td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//textarea[@name='field_my_description']
</td>
<td>
test
</td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='User Interface']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='User Interface']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//input[@id='field_my_preferred_html_style_developper_mode']
</td>
<td></td>
</tr>
<tr>
<td>
assertChecked
</td>
<td>
//input[@id='field_my_preferred_html_style_developper_mode']
</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testPage
Preferenc
e.xml
→
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testPage
Languag
e.xml
View file @
db817eac
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
testPage
Preferenc
e
</string>
</value>
<value>
<string>
testPage
Languag
e
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<key>
<string>
output_encoding
</string>
</key>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testPage
Preferenc
e.zpt
→
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testPage
Languag
e.zpt
View file @
db817eac
...
@@ -16,7 +16,183 @@
...
@@ -16,7 +16,183 @@
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/wo/#/?page=preference
</td>
<td>
${base_url}/web_site_module/renderjs_runner/wo/#/?page=home
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Language']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Language']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//select[@id='field_language']
</td>
<td></td>
</tr>
<!-- default has two language -->
<tr>
<td>
waitForElementPresent
</td>
<td>
//option[@data-i18n='Wolof']
</td>
<td></td>
</tr>
<tr>
<td>
verifyElementPresent
</td>
<td>
//option[@data-i18n='English']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Preferences']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Preferences']
</td>
<td></td>
</tr>
<tr>
<td>
waitForTextPresent
</td>
<td>
Active
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/toggle_editable_mode"
/>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@name='field_my_description']
</td>
<td></td>
</tr>
<tr>
<td>
uncheck
</td>
<td>
//span[@data-gadget-scope='wo']//input
</td>
<td></td>
</tr>
<tr>
<td>
check
</td>
<td>
//span[@data-gadget-scope='en']//input
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Home']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Language']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Language']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//select[@id='field_language']
</td>
<td></td>
</tr>
<!-- wo is disabled -->
<tr>
<td>
waitForElementPresent
</td>
<td>
//option[@data-i18n='English']
</td>
<td></td>
</tr>
<tr>
<td>
verifyElementNotPresent
</td>
<td>
//option[@data-i18n='Wolof']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Preferences']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Preferences']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@name='field_my_description']
</td>
<td></td>
</tr>
<tr>
<td>
check
</td>
<td>
//span[@data-gadget-scope='wo']//input
</td>
<td></td>
</tr>
<tr>
<td>
check
</td>
<td>
//span[@data-gadget-scope='en']//input
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Home']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Language']
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Language']
</td>
<td></td>
<td></td>
</tr>
</tr>
...
@@ -43,7 +219,7 @@
...
@@ -43,7 +219,7 @@
<tr>
<tr>
<td>
click
</td>
<td>
click
</td>
<td>
//button[@data-i18n='
Sav
e']
</td>
<td>
//button[@data-i18n='
Updat
e']
</td>
<td></td>
<td></td>
</tr>
</tr>
...
@@ -105,7 +281,7 @@
...
@@ -105,7 +281,7 @@
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
<td>
//button[@data-i18n='
Sav
e']
</td>
<td>
//button[@data-i18n='
Updat
e']
</td>
<td></td>
<td></td>
</tr>
</tr>
...
@@ -126,7 +302,7 @@
...
@@ -126,7 +302,7 @@
<tr>
<tr>
<td>
click
</td>
<td>
click
</td>
<td>
//button[@data-i18n='
Sav
e']
</td>
<td>
//button[@data-i18n='
Updat
e']
</td>
<td></td>
<td></td>
</tr>
</tr>
...
...
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