Commit a280c1ce authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update MathJax.js to render equation when item is add, update or remove in the grid view.

parent 76fb9aaf
......@@ -90,12 +90,18 @@ Ext.define('Dbui.plugin.MathJax', {
switch (me.targetType) {
case 'grid':
//
// process equation each time the grid is refreshed.
//
// NOTE: MathJax processing is lost when the gridView is
// modified (sort, filter, add, remove or delete).
// process equation each time the view is refreshed.
// This happen when the view is render for the first time or
// when page is chnages
//
me.target.on('refresh', me.onProcessMath, me);
//
// process equation each time a record is add, update or delete
//
me.target.on('itemadd', me.onProcessMath, me);
me.target.on('itemupdate', me.onProcessMath, me);
me.target.on('itemremove', me.onProcessMath, me);
break;
case 'panel':
......@@ -117,6 +123,9 @@ Ext.define('Dbui.plugin.MathJax', {
switch (me.targetType) {
case 'grid':
me.target.un('itemadd', me.onProcessMath, me);
me.target.un('itemupdate', me.onProcessMath, me);
me.target.un('itemremove', me.onProcessMath, me);
me.target.un('refresh', me.onProcessMath, me);
break;
......
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