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
Carlos Ramos Carreño
erp5
Commits
fbb90c1a
Commit
fbb90c1a
authored
Jan 02, 2021
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: use domsugar instead of DOM API in launcher gadget
parent
25ce6bb7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
60 deletions
+57
-60
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_html.html
...teItem/web_page_module/rjs_gadget_erp5_launcher_html.html
+1
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_html.xml
...ateItem/web_page_module/rjs_gadget_erp5_launcher_html.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
...mplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
+52
-56
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
...plateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_html.html
View file @
fbb90c1a
...
...
@@ -30,6 +30,7 @@
<script
src=
"${base_prefix}rsvp.js"
></script>
<script
src=
"${base_prefix}renderjs.js"
></script>
<script
src=
"${base_prefix}domsugar.js"
></script>
<script
src=
"${base_prefix}erp5_launcher_nojqm.js"
></script>
</head>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_html.xml
View file @
fbb90c1a
...
...
@@ -240,7 +240,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
3.59172.56372.41198
</string>
</value>
<value>
<string>
98
8.54689.43253.59187
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>
1
589545308.75
</float>
<float>
1
609513682.22
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
View file @
fbb90c1a
/*globals window, document, RSVP, rJS,
URI, location, XMLHttpRequest, console, navigator, Event,
URL*/
URL
, domsugar
*/
/*jslint indent: 2, maxlen: 80*/
(
function
(
window
,
document
,
RSVP
,
rJS
,
XMLHttpRequest
,
location
,
console
,
navigator
,
Event
,
URL
)
{
URL
,
domsugar
)
{
"
use strict
"
;
var
MAIN_SCOPE
=
"
m
"
,
...
...
@@ -561,9 +561,10 @@
return
route
(
this
,
'
translation_gadget
'
,
'
getTranslationList
'
,
argument_list
);
})
.
allowPublicAcquisition
(
"
getSelectedLanguage
"
,
function
getSelectedLanguage
()
{
return
route
(
this
,
'
translation_gadget
'
,
'
getSelectedLanguage
'
);
})
.
allowPublicAcquisition
(
"
getSelectedLanguage
"
,
function
getSelectedLanguage
()
{
return
route
(
this
,
'
translation_gadget
'
,
'
getSelectedLanguage
'
);
})
.
allowPublicAcquisition
(
"
redirect
"
,
function
redirect
(
param_list
)
{
return
route
(
this
,
'
router
'
,
'
redirect
'
,
param_list
);
...
...
@@ -617,9 +618,9 @@
})
.
allowPublicAcquisition
(
'
refreshHeaderAndPanel
'
,
function
acquireRefreshHeaderAndPanel
()
{
return
refreshHeaderAndPanel
(
this
,
true
);
})
function
acquireRefreshHeaderAndPanel
()
{
return
refreshHeaderAndPanel
(
this
,
true
);
})
.
allowPublicAcquisition
(
'
hidePanel
'
,
function
hidePanel
(
param_list
)
{
return
hideDesktopPanel
(
this
,
param_list
[
0
]);
...
...
@@ -724,50 +725,43 @@
})
.
push
(
function
()
{
var
element
=
gadget
.
props
.
content_element
,
container
=
document
.
createElement
(
"
section
"
),
paragraph
,
iframe
,
link
;
paragraph
=
document
.
createElement
(
"
p
"
);
paragraph
.
textContent
=
'
Please report this unhandled error to the support team,
'
+
'
and go back to the
'
;
link
=
document
.
createElement
(
"
a
"
);
link
.
href
=
'
#
'
;
link
.
textContent
=
'
homepage
'
;
paragraph
.
appendChild
(
link
);
container
.
appendChild
(
paragraph
);
container
.
appendChild
(
document
.
createElement
(
"
br
"
));
paragraph
=
document
.
createElement
(
"
p
"
);
paragraph
.
textContent
=
'
Location:
'
;
link
=
document
.
createElement
(
"
a
"
);
link
.
href
=
link
.
textContent
=
window
.
location
.
toString
();
paragraph
.
appendChild
(
link
);
container
.
appendChild
(
paragraph
);
paragraph
=
document
.
createElement
(
"
p
"
);
paragraph
.
textContent
=
'
User-agent:
'
+
navigator
.
userAgent
;
container
.
appendChild
(
paragraph
);
paragraph
=
document
.
createElement
(
"
p
"
);
paragraph
.
textContent
=
'
Date:
'
+
new
Date
(
Date
.
now
()).
toISOString
();
container
.
appendChild
(
paragraph
);
paragraph
=
document
.
createElement
(
"
p
"
);
paragraph
.
textContent
=
'
Online:
'
+
navigator
.
onLine
;
container
.
appendChild
(
paragraph
);
container
.
appendChild
(
document
.
createElement
(
"
br
"
));
link
=
document
.
createElement
(
"
code
"
);
link
.
textContent
=
gadget
.
state
.
error_text
;
paragraph
=
document
.
createElement
(
"
pre
"
);
paragraph
.
appendChild
(
link
);
container
.
appendChild
(
paragraph
);
container
;
container
=
domsugar
(
"
section
"
,
[
domsugar
(
"
p
"
,
{
"
text
"
:
'
Please report this unhandled error to the support
'
+
'
team, and go back to the
'
},
[
domsugar
(
"
a
"
,
{
"
href
"
:
"
#
"
,
"
text
"
:
"
homepage
"
})
]),
domsugar
(
"
br
"
),
domsugar
(
"
p
"
,
{
"
text
"
:
'
Location:
'
},
[
domsugar
(
"
a
"
,
{
"
href
"
:
window
.
location
.
toString
(),
"
text
"
:
window
.
location
.
toString
()
})
]),
domsugar
(
"
p
"
,
{
"
text
"
:
'
User-agent:
'
+
navigator
.
userAgent
}),
domsugar
(
"
p
"
,
{
"
text
"
:
'
Date:
'
+
new
Date
(
Date
.
now
()).
toISOString
()
}),
domsugar
(
"
p
"
,
{
"
text
"
:
'
Online:
'
+
navigator
.
onLine
}),
domsugar
(
"
br
"
),
domsugar
(
"
pre
"
,
[
domsugar
(
"
code
"
,
{
"
text
"
:
gadget
.
state
.
error_text
})
])
]);
// Remove the content
while
(
element
.
firstChild
)
{
...
...
@@ -777,9 +771,11 @@
// make an iframe to display error page from XMLHttpRequest.
if
(
gadget
.
state
.
request_error_text
)
{
iframe
=
document
.
createElement
(
'
iframe
'
);
container
.
appendChild
(
iframe
);
iframe
.
srcdoc
=
gadget
.
state
.
request_error_text
;
container
.
appendChild
(
domsugar
(
'
iframe
'
,
{
"
srcdoc
"
:
gadget
.
state
.
request_error_text
})
);
}
// reset gadget state
...
...
@@ -1008,4 +1004,4 @@
}(
window
,
document
,
RSVP
,
rJS
,
XMLHttpRequest
,
location
,
console
,
navigator
,
Event
,
URL
));
XMLHttpRequest
,
location
,
console
,
navigator
,
Event
,
URL
,
domsugar
));
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
fbb90c1a
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
8.26965.13575.15547
</string>
</value>
<value>
<string>
98
9.7273.32666.52736
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
160
7016321.86
</float>
<float>
160
9765240.15
</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