Commit c35b998d authored by Boris Kocherov's avatar Boris Kocherov

[erp5_only_office] initial add olap_wizard

parent 6824aea8
...@@ -187,6 +187,9 @@ DocsAPI.DocEditor.version = function () { ...@@ -187,6 +187,9 @@ DocsAPI.DocEditor.version = function () {
}); });
} }
}) })
.allowPublicAcquisition("getRemoteSettings", function () {
return this.jio_getAttachment('/', 'remote_settings.json', {format: 'json'});
})
// methods emulating Gateway used for connection with ooffice begin. // methods emulating Gateway used for connection with ooffice begin.
.declareMethod('appReady', function () { .declareMethod('appReady', function () {
......
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OLAP Query editor</title>
<link rel="stylesheet" href="../gadget_erp5_nojqm.css">
<script src="../rsvp.js"></script>
<script src="../renderjs.js"></script>
<script src="../jio.js"></script>
<script src="web-apps/vendor/xmla4js/Xmla-compiled.js"></script>
<script src="olap_wizard.js"></script>
</head>
<body>
<div data-role="page">
<div role="main" class="ui-content gadget-content">
<div data-gadget-url="../jsonform.gadget.html"
data-gadget-scope="olap_wizard"
data-gadget-sandbox="public"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>olap_wizard.html</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>olap_wizard.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "OLAP Query parameters",
"type": "object",
"definitions": {
"choice": {
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "urn:jio:choice.json"
}
}
},
"properties": {
"connection_name": {
"$ref": "urn:jio:remote_connections.json"
},
"columns": {
"title": "columns",
"$ref": "#/definitions/choice"
},
"rows": {
"title": "rows",
"$ref": "#/definitions/choice"
}
},
"additionalProperties": false
}
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>olap_wizard.json</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/json</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/**
* User: Julia.Radzhabova
* Date: 17.05.16
* Time: 15:38
*/
if (Common === undefined)
var Common = {};
Common.Views = Common.Views || {};
define([
'common/main/lib/util/utils',
'common/main/lib/component/BaseView',
'common/main/lib/component/Layout',
'common/main/lib/component/Window'
], function (template) {
'use strict';
Common.Views.RenderJSPanel = Common.UI.BaseView.extend(_.extend({
initialize: function (options) {
_.extend(this, options);
Common.UI.BaseView.prototype.initialize.call(this, arguments);
},
render: function () {
var me = this,
element = me.$el[0],
q = RSVP.Queue();
if (!me.gadget) {
q = Common.Gateway.declareGadget(this.gadget_url, {
scope: this.scope,
element: element,
sandbox: "iframe"
})
.push(function (sub_gadget) {
me.gadget = sub_gadget;
var iframe = sub_gadget.element.querySelector("iframe");
iframe.width = '100%';
iframe.height = (Common.Utils.innerHeight() - 80) + 'px';
iframe.setAttribute("frameBorder", "0");
});
} else {
q = RSVP.Queue();
}
return q.push(function () {
return me.gadget.render(me.gadget_render_opt);
})
.push(function () {
return me;
})
.push(undefined, function (e) {
console.error(e);
});
},
show: function () {
Common.UI.BaseView.prototype.show.call(this,arguments);
this.fireEvent('show', this );
},
hide: function () {
Common.UI.BaseView.prototype.hide.call(this,arguments);
this.fireEvent('hide', this );
}
}, Common.Views.RenderJSPanel || {}));
});
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>RenderJSPanel.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/javascript</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<div id="view-left-menu" class="tool-menu left"> <div id="view-left-menu" class="tool-menu left">
<div class="tool-menu-btns"> <div class="tool-menu-btns">
<button id="left-btn-file" class="btn btn-category" content-target="left-panel-file"><span class="btn-icon img-toolbarmenu btn-menu-file">&nbsp;</span></button> <button id="left-btn-file" class="btn btn-category" content-target="left-panel-file"><span class="btn-icon img-toolbarmenu btn-menu-file">&nbsp;</span></button>
<button id="left-btn-search" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-search">&nbsp;</span></button> <button id="left-btn-search" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-search">&nbsp;</span></button>
<!-- /** coauthoring begin **/ --> <!-- /** coauthoring begin **/ -->
<button id="left-btn-comments" class="btn btn-category" content-target="left-panel-comments"><span class="btn-icon img-toolbarmenu btn-menu-comments">&nbsp;</span></button> <button id="left-btn-comments" class="btn btn-category" content-target="left-panel-comments"><span class="btn-icon img-toolbarmenu btn-menu-comments">&nbsp;</span></button>
<button id="left-btn-chat" class="btn btn-category" content-target="left-panel-chat"><span class="btn-icon img-toolbarmenu btn-menu-chat">&nbsp;</span></button> <button id="left-btn-chat" class="btn btn-category" content-target="left-panel-chat"><span class="btn-icon img-toolbarmenu btn-menu-chat">&nbsp;</span></button>
<!-- /** coauthoring end **/ --> <!-- /** coauthoring end **/ -->
<button id="left-btn-plugins" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-plugin">&nbsp;</span></button> <button id="left-btn-plugins" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-plugin">&nbsp;</span></button>
<button id="left-btn-remote" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-settings">&nbsp;</span></button> <button id="left-btn-remote" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-settings">&nbsp;</span></button>
<button id="left-btn-support" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-support">&nbsp;</span></button> <button id="left-btn-xmlawizard" class="btn btn-category" content-target="left-panel-xmlawizard"><span class="btn-icon img-toolbarmenu btn-menu-table">&nbsp;</span></button>
<button id="left-btn-about" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-about">&nbsp;</span></button> <button id="left-btn-support" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-support">&nbsp;</span></button>
</div> <button id="left-btn-about" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-about">&nbsp;</span></button>
<div class="left-panel" style=""> </div>
<!-- /** coauthoring begin **/ --> <div class="left-panel" style="">
<div id="left-panel-comments" class="" style="display: none;" /> <!-- /** coauthoring begin **/ -->
<div id="left-panel-chat" class="" style="display: none;" /> <div id="left-panel-comments" class="" style="display: none;" />
<!-- /** coauthoring end **/ --> <div id="left-panel-chat" class="" style="display: none;" />
<div id="left-panel-plugins" class="" style="display: none; height: 100%;" /> <!-- /** coauthoring end **/ -->
</div> <div id="left-panel-xmlawizard" class="" style="display: none; height: 100%;" />
</div> <div id="left-panel-plugins" class="" style="display: none; height: 100%;" />
</div>
</div>
...@@ -42,6 +42,7 @@ define([ ...@@ -42,6 +42,7 @@ define([
'common/main/lib/view/Chat', 'common/main/lib/view/Chat',
/** coauthoring end **/ /** coauthoring end **/
'common/main/lib/view/SearchDialog', 'common/main/lib/view/SearchDialog',
'common/main/lib/view/RenderJSPanel',
'common/main/lib/view/Plugins', 'common/main/lib/view/Plugins',
'spreadsheeteditor/main/app/view/FileMenu' 'spreadsheeteditor/main/app/view/FileMenu'
], function (menuTemplate, $, _, Backbone) { ], function (menuTemplate, $, _, Backbone) {
...@@ -63,6 +64,7 @@ define([ ...@@ -63,6 +64,7 @@ define([
'click #left-btn-chat': _.bind(this.onCoauthOptions, this), 'click #left-btn-chat': _.bind(this.onCoauthOptions, this),
/** coauthoring end **/ /** coauthoring end **/
'click #left-btn-plugins': _.bind(this.onCoauthOptions, this), 'click #left-btn-plugins': _.bind(this.onCoauthOptions, this),
'click #left-btn-xmlawizard': _.bind(this.onCoauthOptions, this),
'click #left-btn-support': function() { 'click #left-btn-support': function() {
var config = this.mode.customization; var config = this.mode.customization;
config && !!config.feedback && !!config.feedback.url ? config && !!config.feedback && !!config.feedback.url ?
...@@ -77,7 +79,8 @@ define([ ...@@ -77,7 +79,8 @@ define([
}, },
render: function () { render: function () {
var el = $(this.el); var el = $(this.el),
me = this;
el.html(this.template({ el.html(this.template({
})); }));
...@@ -157,6 +160,26 @@ define([ ...@@ -157,6 +160,26 @@ define([
this.btnPlugins.hide(); this.btnPlugins.hide();
this.btnPlugins.on('click', _.bind(this.onBtnMenuClick, this)); this.btnPlugins.on('click', _.bind(this.onBtnMenuClick, this));
this.btnXmlaWizard = new Common.UI.Button({
el: $('#left-btn-xmlawizard', this.el),
enableToggle: true,
disabled: true,
toggleGroup: 'leftMenuGroup'
});
this.btnXmlaWizard.on('click', _.bind(this.onBtnMenuClick, this));
this.btnXmlaWizard.on('toggle', _.bind(this.onBtnMenuToggle, this));
(new Common.Views.RenderJSPanel({
el: $('#left-panel-xmlawizard'),
scope: "xmlawizard",
gadget_url: "onlyoffice/olap_wizard.html"
})).render()
.push(function (z) {
me.btnXmlaWizard.panel = z;
})
.push(undefined, function (e) {
console.error(e);
});
this.btnSearch.on('click', _.bind(this.onBtnMenuClick, this)); this.btnSearch.on('click', _.bind(this.onBtnMenuClick, this));
this.btnRemote.on('toggle', _.bind(this.onBtnMenuClick, this)); this.btnRemote.on('toggle', _.bind(this.onBtnMenuClick, this));
this.btnAbout.on('toggle', _.bind(this.onBtnMenuToggle, this)); this.btnAbout.on('toggle', _.bind(this.onBtnMenuToggle, this));
...@@ -267,6 +290,7 @@ define([ ...@@ -267,6 +290,7 @@ define([
close: function(menu) { close: function(menu) {
this.btnFile.toggle(false); this.btnFile.toggle(false);
this.btnAbout.toggle(false); this.btnAbout.toggle(false);
this.btnXmlaWizard.toggle(false);
this.$el.width(SCALE_MIN); this.$el.width(SCALE_MIN);
/** coauthoring begin **/ /** coauthoring begin **/
if (this.mode.canCoAuthoring) { if (this.mode.canCoAuthoring) {
...@@ -300,6 +324,7 @@ define([ ...@@ -300,6 +324,7 @@ define([
this.btnFile.setDisabled(false); this.btnFile.setDisabled(false);
this.btnAbout.setDisabled(false); this.btnAbout.setDisabled(false);
this.btnRemote.setDisabled(false); this.btnRemote.setDisabled(false);
this.btnXmlaWizard.setDisabled(false);
this.btnSupport.setDisabled(false); this.btnSupport.setDisabled(false);
this.btnSearch.setDisabled(false); this.btnSearch.setDisabled(false);
/** coauthoring begin **/ /** coauthoring begin **/
......
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