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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
07eea340
Commit
07eea340
authored
Oct 14, 2024
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Plain Diff
Renderjs: translation of the "Maximize" button (used in editors)
See merge request
nexedi/erp5!1988
parents
27a6dce4
1c364e1c
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
161 additions
and
12 deletions
+161
-12
bt5/erp5_l10n_fr/MessageTranslationTemplateItem/fr/erp5_ui/translation.po
.../MessageTranslationTemplateItem/fr/erp5_ui/translation.po
+3
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_babylonjs_gadget_js.js
...thTemplateItem/web_page_module/rjs_babylonjs_gadget_js.js
+3
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_babylonjs_gadget_js.xml
...hTemplateItem/web_page_module/rjs_babylonjs_gadget_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_maximize_html.html
...Item/web_page_module/rjs_gadget_button_maximize_html.html
+5
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_maximize_html.xml
...eItem/web_page_module/rjs_gadget_button_maximize_html.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_maximize_js.js
...lateItem/web_page_module/rjs_gadget_button_maximize_js.js
+21
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_maximize_js.xml
...ateItem/web_page_module/rjs_gadget_button_maximize_js.xml
+2
-2
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testEditor.xml
...m/portal_tests/renderjs_ui_translate_zuite/testEditor.xml
+62
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testEditor.zpt
...m/portal_tests/renderjs_ui_translate_zuite/testEditor.zpt
+56
-0
bt5/erp5_web_renderjs_ui_test_core/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test_core/Base_createBaseLanguage.py
...erp5_web_renderjs_ui_test_core/Base_createBaseLanguage.py
+2
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
...inTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
+2
-0
No files found.
bt5/erp5_l10n_fr/MessageTranslationTemplateItem/fr/erp5_ui/translation.po
View file @
07eea340
...
...
@@ -6901,6 +6901,9 @@ msgstr "Délai max. (jours)"
msgid "Max. delay (day)"
msgstr "Délai Max (jours)"
msgid "Maximize"
msgstr "Agrandir"
msgid "Maximum Date"
msgstr "Date maximale"
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_babylonjs_gadget_js.js
View file @
07eea340
...
...
@@ -335,6 +335,9 @@
scope
:
'
maximize
'
,
element
:
div_max
,
sandbox
:
'
public
'
})
.
push
(
function
(
button_maximize_gadget
)
{
return
button_maximize_gadget
.
render
();
});
})
.
declareMethod
(
'
getContent
'
,
function
getContent
()
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_babylonjs_gadget_js.xml
View file @
07eea340
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
10
09.27442.40137.15394
</string>
</value>
<value>
<string>
10
17.65217.22701.26760
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>
1
688063552.11
</float>
<float>
1
726209635.9
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_maximize_html.html
View file @
07eea340
...
...
@@ -6,15 +6,19 @@
<title>
ERP5 Button Maximize
</title>
<link
rel=
"http://www.renderjs.org/rel/interface"
href=
"interface_maximize_button.html"
>
<!--
data-i18n=Maximize
-->
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"domsugar.js"
></script>
<!-- custom script -->
<script
src=
"gadget_button_maximize.js"
type=
"text/javascript"
></script>
</head>
<body>
<button
class=
"ui-icon-expand ui-btn-icon-notext"
type=
"button"
>
Maximize
</button>
</body>
</html>
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_maximize_html.xml
View file @
07eea340
...
...
@@ -232,7 +232,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<
string>
zope
</string
>
</value>
<value>
<
unicode>
zope
</unicode
>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
968.5552.51560.44322
</string>
</value>
<value>
<string>
1019.49777.15867.23517
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>
1
536322858.1
</float>
<float>
1
728437604.68
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_maximize_js.js
View file @
07eea340
/*global window, rJS */
/*global window, rJS
, domsugar
*/
/*jslint indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
)
{
(
function
(
window
,
rJS
,
domsugar
)
{
"
use strict
"
;
rJS
(
window
)
.
declareAcquiredMethod
(
'
triggerMaximize
'
,
'
triggerMaximize
'
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareMethod
(
'
render
'
,
function
()
{
var
gadget
=
this
;
return
gadget
.
changeState
({
'
init
'
:
true
});
})
.
onStateChange
(
function
(
modification_dict
)
{
var
gadget
=
this
;
return
gadget
.
translate
(
"
Maximize
"
)
.
push
(
function
(
translation
)
{
return
gadget
.
element
.
appendChild
(
domsugar
(
"
button
"
,
{
"
class
"
:
"
ui-icon-expand ui-btn-icon-notext
"
,
"
type
"
:
"
button
"
,
"
text
"
:
translation
}));
});
})
.
onEvent
(
'
click
'
,
function
(
event
)
{
if
(
event
.
target
.
tagName
===
"
BUTTON
"
)
{
...
...
@@ -15,4 +33,4 @@
return
this
.
triggerMaximize
(
true
);
});
}(
window
,
rJS
));
\ No newline at end of file
}(
window
,
rJS
,
domsugar
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_button_maximize_js.xml
View file @
07eea340
...
...
@@ -244,7 +244,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
10
09.17156.6548.44731
</string>
</value>
<value>
<string>
10
19.59406.56317.53077
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>
1
687447620.32
</float>
<float>
1
728611478.5
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testEditor.xml
0 → 100644
View file @
07eea340
<?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=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</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>
testEditor
</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_translate_zuite/testEditor.zpt
0 → 100644
View file @
07eea340
<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 RenderJS UI
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test RenderJS UI
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/create_translation_data"
/>
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/wo/#/foo_module
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded"
/>
<tal:block
tal:define=
"click_configuration python: {'text': 'Title 1'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr>
<td>
assertElementPresent
</td>
<td>
//label[@for="field_my_id"]
</td>
<td></td>
</tr>
<tal:block
tal:define=
"click_configuration python: {'text': 'Editor Field'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/toggle_editable_mode"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/verify_is_editable_mode"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope='maximize']//button[text()='zuidahua']
</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test_core/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test_core/Base_createBaseLanguage.py
View file @
07eea340
...
...
@@ -82,7 +82,8 @@ param_dict = [
{
'message'
:
'Configure Editor'
,
'translation'
:
'peizhibianjiqi'
,
'language'
:
'wo'
},
{
'message'
:
'List'
,
'translation'
:
'liebiao'
,
'language'
:
'wo'
},
{
'message'
:
'This page contains unsaved changes, do you really want to leave the page ?'
,
'translation'
:
'querenlikai?'
,
'language'
:
'wo'
},
{
'message'
:
'What are you looking for?'
,
'translation'
:
'Ni zai zhao shenme?'
,
'language'
:
'wo'
}
{
'message'
:
'What are you looking for?'
,
'translation'
:
'Ni zai zhao shenme?'
,
'language'
:
'wo'
},
{
'message'
:
'Maximize'
,
'translation'
:
'zuidahua'
,
'language'
:
'wo'
},
]
for
tmp
in
param_dict
:
context
.
Base_addUITestTranslation
(
message
=
tmp
[
'message'
],
translation
=
tmp
[
'translation'
],
language
=
tmp
[
'language'
])
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_editor.js.js
View file @
07eea340
...
...
@@ -148,6 +148,8 @@
scope
:
'
maximize
'
,
element
:
div_max
,
sandbox
:
'
public
'
}).
push
(
function
(
button_maximize_gadget
)
{
return
button_maximize_gadget
.
render
();
});
},
function
(
error
)
{
// Check Acquisition, old erp5 ui don't have triggerMaximize
...
...
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