From ec50bccda5debdf4af06fc6643ffefcf5655702c Mon Sep 17 00:00:00 2001
From: Renaud Le Gac <renaud.legac@free.fr>
Date: Sun, 12 Dec 2010 10:22:11 +0000
Subject: [PATCH] A new plugin to render mathematics formula in grid using
 MathJax;

---
 static/plugin_dbui/lib/appgridmathjax.js | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 static/plugin_dbui/lib/appgridmathjax.js

diff --git a/static/plugin_dbui/lib/appgridmathjax.js b/static/plugin_dbui/lib/appgridmathjax.js
new file mode 100644
index 00000000..9b9065f1
--- /dev/null
+++ b/static/plugin_dbui/lib/appgridmathjax.js
@@ -0,0 +1,24 @@
+/**
+ * Plugin to render mathematics formula embedded in grid content.
+ * The processing is performed by MathJax.
+ * The MathJax library is loaded by the framework
+ * 
+ * @version $Id$
+ *
+ */
+
+Ext.namespace('App.grid');
+ 
+App.grid.MathJax = Ext.extend(Object, {
+ 	
+	init: function(grid){
+
+	grid.getView().on('refresh', function(){
+		MathJax.Hub.PreProcess();
+		MathJax.Hub.Process();
+	})
+		
+	},
+});
+	
+Ext.preg('pGridMathJax', App.grid.MathJax);
\ No newline at end of file
-- 
GitLab