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
Labels
Merge Requests
139
Merge Requests
139
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
341fdcf0
Commit
341fdcf0
authored
Nov 22, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into zope4py2
parents
7518e634
dad8e60c
Pipeline
#24944
failed with stage
in 0 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
12 deletions
+66
-12
bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/jsstyle.js.js
...plateItem/portal_skins/erp5_web_js_style_ui/jsstyle.js.js
+4
-4
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.js
...js_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.js
+30
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.xml
...s_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.xml
+2
-2
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/renderjs.js.js
...TemplateItem/portal_skins/erp5_xhtml_style/renderjs.js.js
+30
-3
No files found.
bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/jsstyle.js.js
View file @
341fdcf0
/*globals window, document, RSVP, rJS, XMLHttpRequest,
DOMParser,
URL,
/*globals window, document, RSVP, rJS, XMLHttpRequest, URL,
history, console */
/*jslint indent: 2, maxlen: 80*/
(
function
(
window
,
document
,
RSVP
,
rJS
,
XMLHttpRequest
,
DOMParser
,
URL
,
(
function
(
window
,
document
,
RSVP
,
rJS
,
XMLHttpRequest
,
URL
,
loopEventListener
,
history
,
console
)
{
"
use strict
"
;
...
...
@@ -295,7 +295,7 @@
style_gadget
:
gadget
.
getDeclaredGadget
(
'
renderer
'
)
}))
.
push
(
function
(
result_dict
)
{
var
dom_parser
=
(
new
DOMParser
()).
parseFromString
(
var
dom_parser
=
rJS
.
parseDocumentStringOrFail
(
result_dict
.
xhr
.
responseText
,
'
text/html
'
),
...
...
@@ -472,5 +472,5 @@
// with browsers without javascript
hidePage
();
}(
window
,
document
,
RSVP
,
rJS
,
XMLHttpRequest
,
DOMParser
,
URL
,
}(
window
,
document
,
RSVP
,
rJS
,
XMLHttpRequest
,
URL
,
rJS
.
loopEventListener
,
history
,
console
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.js
View file @
341fdcf0
...
...
@@ -781,6 +781,32 @@ if (typeof document.contains !== 'function') {
ScopeError
.
prototype
=
new
Error
();
ScopeError
.
prototype
.
constructor
=
ScopeError
;
//////////////////////////////////////////
// ParserError
//////////////////////////////////////////
function
DOMParserError
(
message
)
{
this
.
name
=
"
DOMParserError
"
;
if
((
message
!==
undefined
)
&&
(
typeof
message
!==
"
string
"
))
{
throw
new
TypeError
(
'
You must pass a string for DOMParserError.
'
);
}
this
.
message
=
message
||
"
Default Message
"
;
}
DOMParserError
.
prototype
=
new
Error
();
DOMParserError
.
prototype
.
constructor
=
DOMParserError
;
//////////////////////////////////////////
// DOMParser
//////////////////////////////////////////
function
parseDocumentStringOrFail
(
string
,
mime_type
)
{
var
doc
=
new
DOMParser
().
parseFromString
(
string
,
mime_type
),
error_node
=
doc
.
querySelector
(
'
parsererror
'
);
if
(
error_node
!==
null
)
{
// parsing failed
throw
new
DOMParserError
(
error_node
.
textContent
);
}
return
doc
;
}
/////////////////////////////////////////////////////////////////
// renderJS.IframeSerializationError
/////////////////////////////////////////////////////////////////
...
...
@@ -1901,8 +1927,7 @@ if (typeof document.contains !== 'function') {
.
push
(
function
handleDataURLAjaxResponse
(
xhr
)
{
// Insert a "base" element, in order to resolve all relative links
// which could get broken with a data url
var
doc
=
(
new
DOMParser
()).
parseFromString
(
xhr
.
responseText
,
'
text/html
'
),
var
doc
=
parseDocumentStringOrFail
(
xhr
.
responseText
,
'
text/html
'
),
base
=
doc
.
createElement
(
'
base
'
),
blob
;
base
.
href
=
url
;
...
...
@@ -2200,7 +2225,7 @@ if (typeof document.contains !== 'function') {
// https://developer.mozilla.org/en-US/docs/Web/API/DOMParser
// https://developer.mozilla.org/en-US/docs/Code_snippets/HTML_to_DOM
tmp_constructor
.
__template_element
=
(
new
DOMParser
()).
parseFromString
(
xhr
.
responseText
,
"
text/html
"
);
parseDocumentStringOrFail
(
xhr
.
responseText
,
"
text/html
"
);
parsed_html
=
renderJS
.
parseGadgetHTMLDocument
(
tmp_constructor
.
__template_element
,
url
,
...
...
@@ -2406,6 +2431,8 @@ if (typeof document.contains !== 'function') {
renderJS
.
ScopeError
=
ScopeError
;
renderJS
.
IframeSerializationError
=
IframeSerializationError
;
renderJS
.
loopEventListener
=
loopEventListener
;
renderJS
.
DOMParserError
=
DOMParserError
;
renderJS
.
parseDocumentStringOrFail
=
parseDocumentStringOrFail
;
window
.
rJS
=
window
.
renderJS
=
renderJS
;
window
.
__RenderJSGadget
=
RenderJSGadget
;
window
.
__RenderJSEmbeddedGadget
=
RenderJSEmbeddedGadget
;
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.xml
View file @
341fdcf0
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
99
6.23761.26725.4578
9
</string>
</value>
<value>
<string>
99
8.17699.36537.2443
9
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
16
41216662.48
</float>
<float>
16
68780748.06
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/renderjs.js.js
View file @
341fdcf0
...
...
@@ -781,6 +781,32 @@ if (typeof document.contains !== 'function') {
ScopeError
.
prototype
=
new
Error
();
ScopeError
.
prototype
.
constructor
=
ScopeError
;
//////////////////////////////////////////
// ParserError
//////////////////////////////////////////
function
DOMParserError
(
message
)
{
this
.
name
=
"
DOMParserError
"
;
if
((
message
!==
undefined
)
&&
(
typeof
message
!==
"
string
"
))
{
throw
new
TypeError
(
'
You must pass a string for DOMParserError.
'
);
}
this
.
message
=
message
||
"
Default Message
"
;
}
DOMParserError
.
prototype
=
new
Error
();
DOMParserError
.
prototype
.
constructor
=
DOMParserError
;
//////////////////////////////////////////
// DOMParser
//////////////////////////////////////////
function
parseDocumentStringOrFail
(
string
,
mime_type
)
{
var
doc
=
new
DOMParser
().
parseFromString
(
string
,
mime_type
),
error_node
=
doc
.
querySelector
(
'
parsererror
'
);
if
(
error_node
!==
null
)
{
// parsing failed
throw
new
DOMParserError
(
error_node
.
textContent
);
}
return
doc
;
}
/////////////////////////////////////////////////////////////////
// renderJS.IframeSerializationError
/////////////////////////////////////////////////////////////////
...
...
@@ -1901,8 +1927,7 @@ if (typeof document.contains !== 'function') {
.
push
(
function
handleDataURLAjaxResponse
(
xhr
)
{
// Insert a "base" element, in order to resolve all relative links
// which could get broken with a data url
var
doc
=
(
new
DOMParser
()).
parseFromString
(
xhr
.
responseText
,
'
text/html
'
),
var
doc
=
parseDocumentStringOrFail
(
xhr
.
responseText
,
'
text/html
'
),
base
=
doc
.
createElement
(
'
base
'
),
blob
;
base
.
href
=
url
;
...
...
@@ -2200,7 +2225,7 @@ if (typeof document.contains !== 'function') {
// https://developer.mozilla.org/en-US/docs/Web/API/DOMParser
// https://developer.mozilla.org/en-US/docs/Code_snippets/HTML_to_DOM
tmp_constructor
.
__template_element
=
(
new
DOMParser
()).
parseFromString
(
xhr
.
responseText
,
"
text/html
"
);
parseDocumentStringOrFail
(
xhr
.
responseText
,
"
text/html
"
);
parsed_html
=
renderJS
.
parseGadgetHTMLDocument
(
tmp_constructor
.
__template_element
,
url
,
...
...
@@ -2406,6 +2431,8 @@ if (typeof document.contains !== 'function') {
renderJS
.
ScopeError
=
ScopeError
;
renderJS
.
IframeSerializationError
=
IframeSerializationError
;
renderJS
.
loopEventListener
=
loopEventListener
;
renderJS
.
DOMParserError
=
DOMParserError
;
renderJS
.
parseDocumentStringOrFail
=
parseDocumentStringOrFail
;
window
.
rJS
=
window
.
renderJS
=
renderJS
;
window
.
__RenderJSGadget
=
RenderJSGadget
;
window
.
__RenderJSEmbeddedGadget
=
RenderJSEmbeddedGadget
;
...
...
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