diff --git a/controllers/reports.py b/controllers/reports.py index 57fac3027e57a1e65442e10e726e4c3f8f95bcfb..0f8ded05072aa6374c53e611cda2cca800102bf5 100644 --- a/controllers/reports.py +++ b/controllers/reports.py @@ -22,15 +22,17 @@ def report_2(): """Return the URL arguments """ - selector = Selector(virtdb.foo1, extfield='my_format') + print "hello word" +# selector = Selector(virtdb.foo1, extfield='my_format') # user request a file with a specific format (latex,...) - iframe = selector.download() - if iframe: - return iframe +# iframe = selector.download() +# if iframe: +# return iframe # standart response with the selected values - return dict(test=selector.as_dict()) +# return dict(test=selector.as_dict()) + return "report_2" def report_3(): diff --git a/static/plugin_dbui/src/basepanelwithselector.js b/static/plugin_dbui/src/basepanelwithselector.js index 3b34052e5cef53b3d9dd03c25e14cb3959cdd332..3a229d7034f66e749d650434d9fa3b31a9e9df77 100644 --- a/static/plugin_dbui/src/basepanelwithselector.js +++ b/static/plugin_dbui/src/basepanelwithselector.js @@ -119,6 +119,7 @@ Ext.define('App.BasePanelWithSelector', { layout: 'border', items: [{ border: this.panelBorder, + loader: {}, layout: 'fit', itemId: 'mainPanel', items: this.panelCfg, diff --git a/static/plugin_dbui/src/panelwithurlselector.js b/static/plugin_dbui/src/panelwithurlselector.js index bef462ebe3b74cb50f6476f5559becbfea743903..1a78c2677543053daaefc223e1a28f01c444e28b 100644 --- a/static/plugin_dbui/src/panelwithurlselector.js +++ b/static/plugin_dbui/src/panelwithurlselector.js @@ -67,9 +67,7 @@ Ext.define('App.PanelWithUrlSelector', { // Private method requires by the ExtJS model initComponent: function () { - "use strict"; - - App.PanelWithUrlSelector.superclass.initComponent.call(this); + this.callParent(arguments); // connect the buttons this.goButton.on('click', this.onGo, this); @@ -79,12 +77,10 @@ Ext.define('App.PanelWithUrlSelector', { // Private method requires by the Ext JS component model beforeDestroy: function () { - "use strict"; - this.goButton.un('click', this.onGo, this); this.resetButton.un('click', this.onReset, this); - App.PanelWithUrlSelector.superclass.beforeDestroy.call(this); + this.callParent(arguments); }, /** @@ -96,9 +92,7 @@ Ext.define('App.PanelWithUrlSelector', { var fields, i, - mainPanel = this.getComponent('mainPanel'), params = {}, - selector = this.getComponent('selectorPanel'), url = this.baseUrl, urlCtrl = null, urlFunc = null, @@ -109,10 +103,11 @@ Ext.define('App.PanelWithUrlSelector', { } // activate the auto scrolling - mainPanel.setAutoScroll(true); + this.mainPanel.setAutoScroll(true); // extract basic parameters - fields = selector.findByType('field'); + fields = this.selectorPanel.query('field'); + for (i = 0; i < fields.length; i += 1) { if (fields[i].getName() === this.ctrlField) { urlCtrl = fields[i].getValue(); @@ -129,7 +124,7 @@ Ext.define('App.PanelWithUrlSelector', { } // extract parameters embedded in composite fields - fields = this.findByType('compositefield'); + fields = this.selectorPanel.query('fieldcontainer'); for (i = 0; i < fields.length; i += 1) { fields[i].items.eachKey(extract); } @@ -148,7 +143,10 @@ Ext.define('App.PanelWithUrlSelector', { } // load url in the main panel - mainPanel.load({ + console.log(this.mainPanel.getLoader()); + console.log(url); + console.log(params); + this.mainPanel.getLoader().load({ callback: this.onLoad, params: params, scope: this, @@ -175,6 +173,10 @@ Ext.define('App.PanelWithUrlSelector', { var panelWithSelector = this; + console.log(el); + console.log(success); + console.log(response); + // errors detection if (success === false) { el.updateManager.abort(); @@ -196,11 +198,10 @@ Ext.define('App.PanelWithUrlSelector', { "use strict"; var fields, - i, - selector = this.getComponent('selectorPanel'); + i; - fields = selector.findByType('field'); + fields = this.selectorPanel.query('field'); for (i = 0; i < fields.length; i += 1) { fields[i].reset(); }