Commit 2b7749b2 by Boris Kocherov

[erp5_only_office] use xmla_client in iframe

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