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
bbf554ab
Commit
bbf554ab
authored
May 12, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: show user on the logout page
Drop user informations from language page
parent
b1dfe137
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
106 additions
and
76 deletions
+106
-76
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
+0
-1
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
+2
-2
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
+8
-34
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
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_html.html
...m/web_page_module/rjs_gadget_erp5_pt_logoutform_html.html
+12
-10
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_html.xml
...em/web_page_module/rjs_gadget_erp5_pt_logoutform_html.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_js.js
...eItem/web_page_module/rjs_gadget_erp5_pt_logoutform_js.js
+78
-23
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_js.xml
...Item/web_page_module/rjs_gadget_erp5_pt_logoutform_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_language_html.html
View file @
bbf554ab
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<!--
<!--
data-i18n=User
data-i18n=Language
data-i18n=Language
data-i18n=Update
data-i18n=Update
-->
-->
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_language_html.xml
View file @
bbf554ab
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
81.54790.20438.51626
</string>
</value>
<value>
<string>
9
91.57853.23997.31232
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -256,7 +256,7 @@
...
@@ -256,7 +256,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
581677271.66
</float>
<float>
1
620830688.79
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_language_js.js
View file @
bbf554ab
...
@@ -20,45 +20,26 @@
...
@@ -20,45 +20,26 @@
// declared methods
// declared methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
()
{
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
,
var
gadget
=
this
;
first_result_list
;
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
return
RSVP
.
all
([
return
RSVP
.
all
([
gadget
.
getUrlForList
([{
command
:
'
display
'
}]),
gadget
.
getUrlForList
([{
command
:
'
display
'
}]),
gadget
.
getSettingList
([
'
me
'
,
'
language_map
'
,
'
selected_language
'
,
gadget
.
getSettingList
([
'
language_map
'
,
'
selected_language
'
,
'
default_selected_language
'
]),
'
default_selected_language
'
]),
gadget
.
getDeclaredGadget
(
"
erp5_form
"
),
gadget
.
getDeclaredGadget
(
"
erp5_form
"
),
gadget
.
getTranslationList
([
'
Language
'
,
'
U
ser
'
,
'
U
pdate
'
])
gadget
.
getTranslationList
([
'
Language
'
,
'
Update
'
])
]);
]);
})
})
.
push
(
function
(
result_list
)
{
.
push
(
function
(
first_result_list
)
{
first_result_list
=
result_list
;
var
selected_language
=
first_result_list
[
1
][
1
]
||
var
me
=
result_list
[
1
][
0
];
first_result_list
[
1
][
2
],
if
(
me
!==
undefined
)
{
return
gadget
.
jio_allDocs
({
query
:
'
relative_url:"
'
+
me
+
'
"
'
,
select_list
:
[
'
title
'
]
});
}
})
.
push
(
function
(
result
)
{
var
user
,
selected_language
=
first_result_list
[
1
][
2
]
||
first_result_list
[
1
][
3
],
key
,
key
,
list_item
=
[],
list_item
=
[],
options
=
JSON
.
parse
(
first_result_list
[
1
][
1
]);
options
=
JSON
.
parse
(
first_result_list
[
1
][
0
]);
gadget
.
state
.
old_selected_lang
=
selected_language
;
gadget
.
state
.
old_selected_lang
=
selected_language
;
// Calculate user name
if
(
result
===
undefined
)
{
user
=
"
Who are you?
"
;
}
else
{
user
=
result
.
data
.
rows
[
0
].
value
.
title
;
}
// Calculate possible language list
// Calculate possible language list
for
(
key
in
options
)
{
for
(
key
in
options
)
{
if
(
options
.
hasOwnProperty
(
key
))
{
if
(
options
.
hasOwnProperty
(
key
))
{
...
@@ -81,13 +62,6 @@
...
@@ -81,13 +62,6 @@
first_result_list
[
2
].
render
({
first_result_list
[
2
].
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
'
User
'
:
{
"
default
"
:
user
,
"
editable
"
:
0
,
"
key
"
:
"
field_user
"
,
"
title
"
:
first_result_list
[
3
][
1
],
"
type
"
:
"
StringField
"
},
'
Language
'
:
{
'
Language
'
:
{
"
default
"
:
selected_language
,
"
default
"
:
selected_language
,
"
editable
"
:
1
,
"
editable
"
:
1
,
...
@@ -107,7 +81,7 @@
...
@@ -107,7 +81,7 @@
form_definition
:
{
form_definition
:
{
group_list
:
[[
group_list
:
[[
"
left
"
,
"
left
"
,
[[
"
User
"
],
[
"
Language
"
]]
[[
"
Language
"
]]
]]
]]
}
}
})
})
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_language_js.xml
View file @
bbf554ab
...
@@ -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
81.54793.39964.17766
</string>
</value>
<value>
<string>
9
92.854.10678.4949
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
581677388.59
</float>
<float>
1
620830966.27
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_html.html
View file @
bbf554ab
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<!--
<!--
data-i18n=User
data-i18n=Confirm
data-i18n=Confirm
-->
-->
<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"
/>
<title>
ERP5 PT Log
in
page
</title>
<title>
ERP5 PT Log
out
page
</title>
<link
rel=
"http://www.renderjs.org/rel/interface"
href=
"interface_page.html"
>
<link
rel=
"http://www.renderjs.org/rel/interface"
href=
"interface_page.html"
>
<!-- renderjs -->
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"jiodev.js"
type=
"text/javascript"
></script>
<script
src=
"jiodev.js"
type=
"text/javascript"
></script>
<script
src=
"domsugar.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<!-- custom script -->
<script
src=
"gadget_erp5_page_logout.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_erp5_page_logout.js"
type=
"text/javascript"
></script>
</head>
</head>
<body>
<body>
<
article
>
<
form
>
<
secti
on>
<
button
type=
"submit"
class=
"ui-icon-edit ui-btn-icon-right ui-screen-hidden"
></butt
on>
<form>
<div
data-gadget-url=
"gadget_erp5_form.html"
data-gadget-scope=
"erp5_form"
<input
type=
"submit"
/
>
data-gadget-sandbox=
"public"
>
</div>
</form
>
<div
class=
"dialog_button_container"
>
</
section
>
</
div
>
</
article
>
</
form
>
</body>
</body>
</html>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_html.xml
View file @
bbf554ab
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
71.52441.15467.16503
</string>
</value>
<value>
<string>
9
92.824.37160.29132
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -256,7 +256,7 @@
...
@@ -256,7 +256,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
542905896.75
</float>
<float>
1
620830587.9
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_js.js
View file @
bbf554ab
/*global window, rJS, UriTemplate */
/*global window, rJS, UriTemplate
, domsugar, RSVP
*/
/*jslint indent: 2, maxerr: 3, nomen: true */
/*jslint indent: 2, maxerr: 3, nomen: true */
(
function
(
window
,
rJS
,
UriTemplate
)
{
(
function
(
window
,
rJS
,
UriTemplate
,
domsugar
,
RSVP
)
{
"
use strict
"
;
"
use strict
"
;
rJS
(
window
)
rJS
(
window
)
...
@@ -9,10 +9,12 @@
...
@@ -9,10 +9,12 @@
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getUrlFor
List
"
,
"
getUrlForLis
t
"
)
.
declareAcquiredMethod
(
"
getUrlFor
Dict
"
,
"
getUrlForDic
t
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
getTranslationDict
"
,
"
getTranslationDict
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// declared methods
// declared methods
...
@@ -20,25 +22,78 @@
...
@@ -20,25 +22,78 @@
.
declareMethod
(
"
render
"
,
function
()
{
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
;
var
gadget
=
this
;
return
gadget
.
getUrlForList
([
return
new
RSVP
.
Queue
(
RSVP
.
hash
({
// Back url
translation
:
gadget
.
getTranslationDict
([
{
command
:
'
display
'
},
'
Confirm
'
,
// Change language
'
User
'
{
command
:
'
display
'
,
options
:
{
page
:
'
language
'
}}
]),
])
me
:
gadget
.
getSetting
(
'
me
'
)
.
push
(
function
(
url_list
)
{
.
push
(
function
(
me
)
{
return
gadget
.
updateHeader
({
if
(
me
!==
undefined
)
{
page_title
:
'
Logout
'
,
return
gadget
.
jio_allDocs
({
page_icon
:
'
power-off
'
,
query
:
'
relative_url:"
'
+
me
+
'
"
'
,
front_url
:
url_list
[
0
],
select_list
:
[
'
title
'
]
language_url
:
url_list
[
1
]
});
});
}
})
})
.
push
(
function
()
{
.
push
(
function
(
result
)
{
return
gadget
.
translate
(
'
Confirm
'
);
var
user
;
// Calculate user name
if
(
result
===
undefined
)
{
user
=
"
Who are you?
"
;
}
else
{
user
=
result
.
data
.
rows
[
0
].
value
.
title
;
}
return
user
;
}),
erp5_form
:
gadget
.
getDeclaredGadget
(
"
erp5_form
"
),
url_dict
:
gadget
.
getUrlForDict
({
// Back url
back
:
{
command
:
'
display
'
},
// Change language
change_language
:
{
command
:
'
display
'
,
options
:
{
page
:
'
language
'
}}
})
})
.
push
(
function
(
translated_text
)
{
}))
gadget
.
element
.
querySelector
(
'
input
'
).
value
=
translated_text
;
.
push
(
function
(
result_dict
)
{
domsugar
(
gadget
.
element
.
querySelector
(
'
.dialog_button_container
'
),
[
domsugar
(
'
input
'
,
{
name
:
'
action_update
'
,
type
:
'
submit
'
,
value
:
result_dict
.
translation
.
Confirm
})
]);
return
RSVP
.
all
([
gadget
.
updateHeader
({
page_title
:
'
Logout
'
,
page_icon
:
'
power-off
'
,
front_url
:
result_dict
.
url_dict
.
back
,
language_url
:
result_dict
.
url_dict
.
change_language
}),
result_dict
.
erp5_form
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
'
User
'
:
{
"
default
"
:
result_dict
.
me
,
"
editable
"
:
0
,
"
key
"
:
"
field_user
"
,
"
title
"
:
result_dict
.
translation
.
User
,
"
type
"
:
"
StringField
"
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
[[
"
left
"
,
[[
"
User
"
]]
]]
}
})
]);
});
});
})
})
...
@@ -67,4 +122,4 @@
...
@@ -67,4 +122,4 @@
.
declareMethod
(
"
triggerSubmit
"
,
function
()
{
.
declareMethod
(
"
triggerSubmit
"
,
function
()
{
return
;
return
;
});
});
}(
window
,
rJS
,
UriTemplate
));
}(
window
,
rJS
,
UriTemplate
,
domsugar
,
RSVP
));
\ No newline at end of file
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_js.xml
View file @
bbf554ab
...
@@ -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
71.7721.48108.61320
</string>
</value>
<value>
<string>
9
92.849.18457.2065
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
542905890.66
</float>
<float>
1
620831029.04
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
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