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
Ekaterina
erp5
Commits
f58bdefb
Commit
f58bdefb
authored
Oct 20, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Simplify logout page code
parent
5035d2b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
42 deletions
+12
-42
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
+10
-40
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_logoutform_js.js
View file @
f58bdefb
/*global window, rJS,
RSVP, promiseEventListener,
UriTemplate */
/*global window, rJS, UriTemplate */
/*jslint indent: 2, maxerr: 3, nomen: true */
(
function
(
window
,
rJS
,
RSVP
,
promiseEventListener
,
UriTemplate
)
{
(
function
(
window
,
rJS
,
UriTemplate
)
{
"
use strict
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.
ready
(
function
(
g
)
{
g
.
props
=
{};
})
// Assign the element to a variable
.
ready
(
function
(
g
)
{
return
g
.
getElement
()
.
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
});
})
/////////////////////////////////////////////////////////////////
// handle acquisition
/////////////////////////////////////////////////////////////////
...
...
@@ -33,35 +18,20 @@
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
updateHeader
({
page_title
:
'
Logout
'
});
})
return
gadget
.
updateHeader
({
page_title
:
'
Logout
'
})
.
push
(
function
()
{
return
gadget
.
translateHtml
(
gadget
.
props
.
element
.
innerHTML
);
return
gadget
.
translateHtml
(
gadget
.
element
.
innerHTML
);
})
.
push
(
function
(
my_translated_html
)
{
gadget
.
props
.
element
.
innerHTML
=
my_translated_html
;
gadget
.
element
.
innerHTML
=
my_translated_html
;
});
})
.
declareService
(
function
()
{
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
,
logout_url_template
;
// Listen to form submit
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
promiseEventListener
(
gadget
.
props
.
element
.
querySelector
(
'
form
'
),
'
submit
'
,
false
);
})
.
push
(
function
()
{
return
gadget
.
jio_getAttachment
(
'
acl_users
'
,
'
links
'
);
})
return
gadget
.
jio_getAttachment
(
'
acl_users
'
,
'
links
'
)
.
push
(
function
(
links
)
{
logout_url_template
=
links
.
_links
.
logout
.
href
;
return
gadget
.
getUrlFor
({
...
...
@@ -79,4 +49,4 @@
});
});
});
}(
window
,
rJS
,
RSVP
,
promiseEventListener
,
UriTemplate
));
\ No newline at end of file
}(
window
,
rJS
,
UriTemplate
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_js.xml
View file @
f58bdefb
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
2.53322.52034.23569
</string>
</value>
<value>
<string>
95
4.47195.16803.17902
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
14
69543750.01
</float>
<float>
14
76953978.0
</float>
<string>
UTC
</string>
</tuple>
</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