diff --git a/models/widgets_viewport.py b/models/widgets_viewport.py index 81bd9bfa43a5dc11cd297b3528b1ae910fc0e853..909a3cea909de4e9b6230bbc2330034679ee952d 100644 --- a/models/widgets_viewport.py +++ b/models/widgets_viewport.py @@ -72,6 +72,7 @@ leaf_2 = PanelWithUrlSelector(virtdb.foo1, baseUrl=URL('reports', 'report_2'), baseParams={'hello': 3}, extField='my_format', + panelLoader={"renderer": "html", "scripts": True}, plugins=['pMathJax']) leaf_3 = PanelWithUrlSelector(virtdb.harvester_selector, diff --git a/static/plugin_dbui/CHANGELOG b/static/plugin_dbui/CHANGELOG index f74c1d0645ea83fc33c6b158ff16d2aa9e7a1c8f..c6c5172b733b1c63463ccaad69d944790c0a5896 100644 --- a/static/plugin_dbui/CHANGELOG +++ b/static/plugin_dbui/CHANGELOG @@ -1,6 +1,8 @@ --------------------------------- CHANGE LOG ---------------------------------- HEAD + - Add protection in CLEAN_COMMA and CLEAN_SPACES. + - Add the configuration panelLoader to BaseWithSelector. 0.6.1.1 (Mar 2014) - Consolidation version diff --git a/static/plugin_dbui/src/panel/BaseWithSelector.js b/static/plugin_dbui/src/panel/BaseWithSelector.js index 073bc8dd6dbfe13f160add184978c3379667a073..1acc6a2b670ef5d2f22e58adae93dc8b4bbf2bbf 100644 --- a/static/plugin_dbui/src/panel/BaseWithSelector.js +++ b/static/plugin_dbui/src/panel/BaseWithSelector.js @@ -50,6 +50,18 @@ Ext.define('App.panel.BaseWithSelector', { */ panelDefaults: null, + /** + * @cfg {Ext.ComponentLoader/Object} + * A configuration object or an instance of a {@link Ext.ComponentLoader} + * to load remote content for this Component. By default, the content + * loaded will be processed as raw html. The response text from the + * request is taken and added to the component. This can be used in + * conjunction with the scripts option to execute any inline scripts + * in the resulting content. + * + */ + panelLoader: {}, + /** * @cfg {Object} * The selector items. @@ -143,7 +155,7 @@ Ext.define('App.panel.BaseWithSelector', { itemId: 'mainPanel', items: this.panelItems, layout: 'fit', - loader: {}, + loader: this.panelLoader, plugins: ['pPanelLoaderException'], region: 'center' }, { diff --git a/views/reports/report_2.html b/views/reports/report_2.html index def402bd7c7e063271c2f59d481e98757717af6c..9bfed297ced95f17c9c91e65dd0f7ce6762fa160 100644 --- a/views/reports/report_2.html +++ b/views/reports/report_2.html @@ -6,3 +6,6 @@ <h4>request.vars:</h4> {{=BEAUTIFY(vars)}} <hr> +<script type="text/javascript"> + Ext.Msg.alert("Hello", "Execute inline script"); +</script>