diff --git a/static/scripts/panel_1.js b/static/scripts/panel_1.js new file mode 100755 index 0000000000000000000000000000000000000000..f3f3340d79a6d7f1f1a7dce3b502f18dd2053e90 --- /dev/null +++ b/static/scripts/panel_1.js @@ -0,0 +1,44 @@ +/** + * panel_1.js + * + * Script to test the panel with MathJax + * $Id$ + * + */ + +main = function(){ + console.log('MathJax is loaded'); + + var panel = new Ext.Panel({ + autoLoad: App.name + '/reports/report_1', + preventBodyReset: true, + script: false, + }); + + + var vp = new Ext.Viewport({ + region: 'center', + layout: 'fit', + items: [panel] + }); + +// console.dir(panel); + var updater = panel.body.getUpdater(); + + updater.on('update', function(e, o){ + console.log('html content is loaded'); + MathJax.Hub.PreProcess(); + MathJax.Hub.Process(); + }); + + vp.render('appmain'); + +}; + + Ext.onReady(function(){ + + Ext.QuickTips.init(); + + App.withMathJax ? App.loadMathJax(main) : main(); + +}); \ No newline at end of file diff --git a/static/scripts/panel_2.js b/static/scripts/panel_2.js new file mode 100644 index 0000000000000000000000000000000000000000..007dca3d55d5a8547afbdd303764818df6e66be1 --- /dev/null +++ b/static/scripts/panel_2.js @@ -0,0 +1,34 @@ +/** + * panel_2.js + * + * Script to test the panel with MathJax + * $Id$ + * + */ + +main = function(){ + + var panel = new Ext.Panel({ + autoLoad: App.name + '/reports/report_1', + preventBodyReset: true, + plugins: ['pPanelMathJax'], + script: false, + }); + + var vp = new Ext.Viewport({ + region: 'center', + layout: 'fit', + items: [panel] + }); + + vp.render('appmain'); + +}; + + Ext.onReady(function(){ + + Ext.QuickTips.init(); + + App.withMathJax ? App.loadMathJax(main) : main(); + +}); \ No newline at end of file