Commit 2b7749b2 authored by Boris Kocherov's avatar Boris Kocherov

[erp5_only_office] use xmla_client in iframe

parent a8eaacb2
...@@ -72,5 +72,8 @@ ...@@ -72,5 +72,8 @@
<div id="viewport"></div> <div id="viewport"></div>
<div data-gadget-url="onlyoffice/xmla_client.html"
data-gadget-scope="xmla_client"
data-gadget-sandbox="iframe"></div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -657,10 +657,10 @@ DocsAPI.DocEditor.version = function () { ...@@ -657,10 +657,10 @@ DocsAPI.DocEditor.version = function () {
return loadScript(app_url); return loadScript(app_url);
}) })
.push(function () { .push(function () {
// declare public gadgets only after configure requirejs return g.getDeclaredGadget("xmla_client");
// public because xmla_client return not serialized data })
return g.declareGadget('onlyoffice/xmla_client.html', .push(function (xmla_client) {
{scope: 'xmla_client', sandbox: "public"}); return xmla_client.render();
}) })
.push(undefined, function (error) { .push(undefined, function (error) {
display_error(g, error); display_error(g, error);
......
...@@ -147,6 +147,9 @@ ...@@ -147,6 +147,9 @@
cache: {}, cache: {},
connections: {} connections: {}
}; };
})
.declareMethod("render", function () {
var g = this;
return g.getRemoteSettings() return g.getRemoteSettings()
.push(function (settings) { .push(function (settings) {
return g.setConnectionsSettings(settings); return g.setConnectionsSettings(settings);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment