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
Mikolaï Krol
erp5
Commits
3f1110c4
Commit
3f1110c4
authored
Jan 18, 2017
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_xhtml_style/erp5_web_renderjs_ui] Update renderJS 0.14.0
parent
7c8fc367
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2583 additions
and
2566 deletions
+2583
-2566
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.js
...js_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.js
+2350
-2331
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
+231
-233
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.js
View file @
3f1110c4
...
@@ -1081,19 +1081,32 @@ if (typeof document.contains !== 'function') {
...
@@ -1081,19 +1081,32 @@ if (typeof document.contains !== 'function') {
});
});
}
}
function
clearGadgetInternalParameters
(
g
)
{
function
clearGadgetInternalParameters
(
)
{
g
.
__sub_gadget_dict
=
{};
this
.
__sub_gadget_dict
=
{};
createMonitor
(
g
);
createMonitor
(
this
);
}
}
function
loadSubGadgetDOMDeclaration
(
g
)
{
function
loadSubGadgetDOMDeclaration
(
)
{
var
element_list
=
g
.
element
.
querySelectorAll
(
'
[data-gadget-url]
'
),
var
element_list
=
this
.
element
.
querySelectorAll
(
'
[data-gadget-url]
'
),
element
,
element
,
promise_list
=
[],
promise_list
=
[],
scope
,
scope
,
url
,
url
,
sandbox
,
sandbox
,
i
;
i
,
context
=
this
;
function
prepareReportGadgetDeclarationError
(
scope
)
{
return
function
(
error
)
{
var
aq_dict
=
context
.
__acquired_method_dict
||
{},
method_name
=
'
reportGadgetDeclarationError
'
;
if
(
aq_dict
.
hasOwnProperty
(
method_name
))
{
return
aq_dict
[
method_name
].
apply
(
context
,
[
arguments
,
scope
]);
}
throw
error
;
};
}
for
(
i
=
0
;
i
<
element_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
element_list
.
length
;
i
+=
1
)
{
element
=
element_list
[
i
];
element
=
element_list
[
i
];
...
@@ -1101,11 +1114,14 @@ if (typeof document.contains !== 'function') {
...
@@ -1101,11 +1114,14 @@ if (typeof document.contains !== 'function') {
url
=
element
.
getAttribute
(
"
data-gadget-url
"
);
url
=
element
.
getAttribute
(
"
data-gadget-url
"
);
sandbox
=
element
.
getAttribute
(
"
data-gadget-sandbox
"
);
sandbox
=
element
.
getAttribute
(
"
data-gadget-sandbox
"
);
if
(
url
!==
null
)
{
if
(
url
!==
null
)
{
promise_list
.
push
(
g
.
declareGadget
(
url
,
{
promise_list
.
push
(
context
.
declareGadget
(
url
,
{
element
:
element
,
element
:
element
,
scope
:
scope
||
undefined
,
scope
:
scope
||
undefined
,
sandbox
:
sandbox
||
undefined
sandbox
:
sandbox
||
undefined
}));
})
.
push
(
undefined
,
prepareReportGadgetDeclarationError
(
scope
))
);
}
}
}
}
...
@@ -1120,9 +1136,10 @@ if (typeof document.contains !== 'function') {
...
@@ -1120,9 +1136,10 @@ if (typeof document.contains !== 'function') {
};
};
RenderJSGadget
.
setState
=
function
(
state_dict
)
{
RenderJSGadget
.
setState
=
function
(
state_dict
)
{
var
json_state
=
JSON
.
stringify
(
state_dict
);
var
json_state
=
JSON
.
stringify
(
state_dict
);
return
this
.
ready
(
function
()
{
this
.
__ready_list
.
unshift
(
function
()
{
this
.
state
=
JSON
.
parse
(
json_state
);
this
.
state
=
JSON
.
parse
(
json_state
);
});
});
return
this
;
};
};
RenderJSGadget
.
onStateChange
=
function
(
callback
)
{
RenderJSGadget
.
onStateChange
=
function
(
callback
)
{
this
.
prototype
.
__state_change_callback
=
callback
;
this
.
prototype
.
__state_change_callback
=
callback
;
...
@@ -1331,6 +1348,8 @@ if (typeof document.contains !== 'function') {
...
@@ -1331,6 +1348,8 @@ if (typeof document.contains !== 'function') {
};
};
RenderJSGadget
.
declareAcquiredMethod
(
"
aq_reportServiceError
"
,
RenderJSGadget
.
declareAcquiredMethod
(
"
aq_reportServiceError
"
,
"
reportServiceError
"
);
"
reportServiceError
"
);
RenderJSGadget
.
declareAcquiredMethod
(
"
aq_reportGadgetDeclarationError
"
,
"
reportGadgetDeclarationError
"
);
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// RenderJSGadget.allowPublicAcquisition
// RenderJSGadget.allowPublicAcquisition
...
@@ -1461,6 +1480,17 @@ if (typeof document.contains !== 'function') {
...
@@ -1461,6 +1480,17 @@ if (typeof document.contains !== 'function') {
gadget_instance
=
new
RenderJSIframeGadget
();
gadget_instance
=
new
RenderJSIframeGadget
();
setAqParent
(
gadget_instance
,
parent_gadget
);
setAqParent
(
gadget_instance
,
parent_gadget
);
iframe
=
document
.
createElement
(
"
iframe
"
);
iframe
=
document
.
createElement
(
"
iframe
"
);
iframe
.
addEventListener
(
'
error
'
,
function
(
error
)
{
iframe_loading_deferred
.
reject
(
error
);
});
iframe
.
addEventListener
(
'
load
'
,
function
()
{
return
RSVP
.
timeout
(
5000
)
.
fail
(
function
()
{
iframe_loading_deferred
.
reject
(
new
Error
(
'
Timeout while loading:
'
+
url
)
);
});
});
// gadget_instance.element.setAttribute("seamless", "seamless");
// gadget_instance.element.setAttribute("seamless", "seamless");
iframe
.
setAttribute
(
"
src
"
,
url
);
iframe
.
setAttribute
(
"
src
"
,
url
);
gadget_instance
.
__path
=
url
;
gadget_instance
.
__path
=
url
;
...
@@ -1524,18 +1554,7 @@ if (typeof document.contains !== 'function') {
...
@@ -1524,18 +1554,7 @@ if (typeof document.contains !== 'function') {
trans
.
delayReturn
(
true
);
trans
.
delayReturn
(
true
);
});
});
return
RSVP
.
any
([
return
iframe_loading_deferred
.
promise
;
iframe_loading_deferred
.
promise
,
// Timeout to prevent non renderJS embeddable gadget
// XXX Maybe using iframe.onload/onerror would be safer?
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
timeout
(
5000
);
})
.
push
(
undefined
,
function
()
{
throw
new
Error
(
'
Timeout while loading:
'
+
url
);
})
]);
}
}
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
...
@@ -2283,8 +2302,8 @@ if (typeof document.contains !== 'function') {
...
@@ -2283,8 +2302,8 @@ if (typeof document.contains !== 'function') {
return
fct
.
call
(
g
,
g
);
return
fct
.
call
(
g
,
g
);
};
};
}
}
TmpConstructor
.
ready
(
function
(
g
)
{
TmpConstructor
.
ready
(
function
(
)
{
return
startService
(
g
);
return
startService
(
this
);
});
});
loading_gadget_promise
.
push
(
ready_wrapper
);
loading_gadget_promise
.
push
(
ready_wrapper
);
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_renderjs_js.xml
View file @
3f1110c4
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
5.51226.25726.38263
</string>
</value>
<value>
<string>
95
6.46086.45265.8004
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
148
1043805.03
</float>
<float>
148
4732189.17
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/renderjs.js.js
View file @
3f1110c4
This diff is collapsed.
Click to expand it.
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