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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
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
Show 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 @@
...
@@ -30,6 +30,7 @@
<script
src=
"${base_prefix}rsvp.js"
></script>
<script
src=
"${base_prefix}rsvp.js"
></script>
<script
src=
"${base_prefix}renderjs.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>
<script
src=
"${base_prefix}erp5_launcher_nojqm.js"
></script>
</head>
</head>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_html.xml
View file @
fbb90c1a
...
@@ -240,7 +240,7 @@
...
@@ -240,7 +240,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -258,7 +258,7 @@
...
@@ -258,7 +258,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
589545308.75
</float>
<float>
1
609513682.22
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
View file @
fbb90c1a
/*globals window, document, RSVP, rJS,
/*globals window, document, RSVP, rJS,
URI, location, XMLHttpRequest, console, navigator, Event,
URI, location, XMLHttpRequest, console, navigator, Event,
URL*/
URL
, domsugar
*/
/*jslint indent: 2, maxlen: 80*/
/*jslint indent: 2, maxlen: 80*/
(
function
(
window
,
document
,
RSVP
,
rJS
,
(
function
(
window
,
document
,
RSVP
,
rJS
,
XMLHttpRequest
,
location
,
console
,
navigator
,
Event
,
XMLHttpRequest
,
location
,
console
,
navigator
,
Event
,
URL
)
{
URL
,
domsugar
)
{
"
use strict
"
;
"
use strict
"
;
var
MAIN_SCOPE
=
"
m
"
,
var
MAIN_SCOPE
=
"
m
"
,
...
@@ -561,7 +561,8 @@
...
@@ -561,7 +561,8 @@
return
route
(
this
,
'
translation_gadget
'
,
'
getTranslationList
'
,
return
route
(
this
,
'
translation_gadget
'
,
'
getTranslationList
'
,
argument_list
);
argument_list
);
})
})
.
allowPublicAcquisition
(
"
getSelectedLanguage
"
,
function
getSelectedLanguage
()
{
.
allowPublicAcquisition
(
"
getSelectedLanguage
"
,
function
getSelectedLanguage
()
{
return
route
(
this
,
'
translation_gadget
'
,
'
getSelectedLanguage
'
);
return
route
(
this
,
'
translation_gadget
'
,
'
getSelectedLanguage
'
);
})
})
...
@@ -724,50 +725,43 @@
...
@@ -724,50 +725,43 @@
})
})
.
push
(
function
()
{
.
push
(
function
()
{
var
element
=
gadget
.
props
.
content_element
,
var
element
=
gadget
.
props
.
content_element
,
container
=
document
.
createElement
(
"
section
"
),
container
;
paragraph
,
iframe
,
container
=
domsugar
(
"
section
"
,
[
link
;
domsugar
(
"
p
"
,
{
"
text
"
:
'
Please report this unhandled error to the support
'
+
paragraph
=
document
.
createElement
(
"
p
"
);
'
team, and go back to the
'
paragraph
.
textContent
=
},
[
'
Please report this unhandled error to the support team,
'
+
domsugar
(
"
a
"
,
{
'
and go back to the
'
;
"
href
"
:
"
#
"
,
link
=
document
.
createElement
(
"
a
"
);
"
text
"
:
"
homepage
"
link
.
href
=
'
#
'
;
})
link
.
textContent
=
'
homepage
'
;
]),
paragraph
.
appendChild
(
link
);
domsugar
(
"
br
"
),
container
.
appendChild
(
paragraph
);
domsugar
(
"
p
"
,
{
"
text
"
:
'
Location:
'
container
.
appendChild
(
document
.
createElement
(
"
br
"
));
},
[
domsugar
(
"
a
"
,
{
paragraph
=
document
.
createElement
(
"
p
"
);
"
href
"
:
window
.
location
.
toString
(),
paragraph
.
textContent
=
'
Location:
'
;
"
text
"
:
window
.
location
.
toString
()
link
=
document
.
createElement
(
"
a
"
);
})
link
.
href
=
link
.
textContent
=
window
.
location
.
toString
();
]),
paragraph
.
appendChild
(
link
);
domsugar
(
"
p
"
,
{
container
.
appendChild
(
paragraph
);
"
text
"
:
'
User-agent:
'
+
navigator
.
userAgent
}),
paragraph
=
document
.
createElement
(
"
p
"
);
domsugar
(
"
p
"
,
{
paragraph
.
textContent
=
'
User-agent:
'
+
navigator
.
userAgent
;
"
text
"
:
'
Date:
'
+
new
Date
(
Date
.
now
()).
toISOString
()
container
.
appendChild
(
paragraph
);
}),
domsugar
(
"
p
"
,
{
paragraph
=
document
.
createElement
(
"
p
"
);
"
text
"
:
'
Online:
'
+
navigator
.
onLine
paragraph
.
textContent
=
}),
'
Date:
'
+
new
Date
(
Date
.
now
()).
toISOString
();
domsugar
(
"
br
"
),
container
.
appendChild
(
paragraph
);
domsugar
(
"
pre
"
,
[
domsugar
(
"
code
"
,
{
paragraph
=
document
.
createElement
(
"
p
"
);
"
text
"
:
gadget
.
state
.
error_text
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
);
// Remove the content
// Remove the content
while
(
element
.
firstChild
)
{
while
(
element
.
firstChild
)
{
...
@@ -777,9 +771,11 @@
...
@@ -777,9 +771,11 @@
// make an iframe to display error page from XMLHttpRequest.
// make an iframe to display error page from XMLHttpRequest.
if
(
gadget
.
state
.
request_error_text
)
{
if
(
gadget
.
state
.
request_error_text
)
{
iframe
=
document
.
createElement
(
'
iframe
'
);
container
.
appendChild
(
container
.
appendChild
(
iframe
);
domsugar
(
'
iframe
'
,
{
iframe
.
srcdoc
=
gadget
.
state
.
request_error_text
;
"
srcdoc
"
:
gadget
.
state
.
request_error_text
})
);
}
}
// reset gadget state
// reset gadget state
...
@@ -1008,4 +1004,4 @@
...
@@ -1008,4 +1004,4 @@
}(
window
,
document
,
RSVP
,
rJS
,
}(
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 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<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>
160
7016321.86
</float>
<float>
160
9765240.15
</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