Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
plugin_dbui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
w2pext
plugin_dbui
Commits
08607adb
Commit
08607adb
authored
13 years ago
by
Renaud Le Gac
Browse files
Options
Downloads
Patches
Plain Diff
Remove the loading of the MathJax library since it is performed in the view.
parent
46badc62
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
static/plugin_dbui/src/appbase.js
+1
-28
1 addition, 28 deletions
static/plugin_dbui/src/appbase.js
static/plugin_dbui/src/appgridmathjax.js
+4
-6
4 additions, 6 deletions
static/plugin_dbui/src/appgridmathjax.js
static/plugin_dbui/src/appmgr.js
+2
-11
2 additions, 11 deletions
static/plugin_dbui/src/appmgr.js
with
7 additions
and
45 deletions
static/plugin_dbui/src/appbase.js
+
1
−
28
View file @
08607adb
...
...
@@ -19,18 +19,10 @@ Ext.namespace('App');
* Configuration option for all json stores
*/
/**
* @cfg {Boolean} App.mathJax
* The path of the MathJax.js script.
* It is equal to undefined if it does not exist.
* This constants is defined by the server and should not be used directly.
* The plugin should be loaded with the function App.loadMathJax.
*/
/**
* @param {String} App.version version of the library
*/
App
.
version
=
'
0.4.
0
'
App
.
version
=
'
0.4.
1
'
/**
* Helper function mimicking the encode_field function running on the server
...
...
@@ -119,22 +111,3 @@ App.isPlugin = function (component, ptype) {
}
return
false
;
};
/**
* Helper function to load the MathJax library
* The loading is an asynchronous operation.
* When finished the function callback is executed.
* If the library is not there the callback is executed to.
* @param {Function} callback
* @param {Object} scope scope for the callback
*/
App
.
loadMathJax
=
function
(
callback
,
scope
)
{
if
(
App
.
mathJax
)
{
Ext
.
Loader
.
load
([
App
.
mathJax
],
callback
,
scope
);
}
else
{
callback
.
call
(
scope
);
}
};
This diff is collapsed.
Click to expand it.
static/plugin_dbui/src/appgridmathjax.js
+
4
−
6
View file @
08607adb
...
...
@@ -13,14 +13,12 @@ App.grid.MathJax = Ext.extend(Object, {
init
:
function
(
grid
)
{
function
processMath
()
{
MathJax
.
Hub
.
PreProcess
(
);
MathJax
.
Hub
.
Process
();
function
processMath
(
gridView
)
{
var
domEl
=
Ext
.
getDom
(
gridView
.
el
);
MathJax
.
Hub
.
Queue
([
"
Typeset
"
,
MathJax
.
Hub
,
domEl
]);
}
// NOTE: in some case mathJax error appears on the first rendering
// Adding a delay of 0.1 s seems to fixed this problem
grid
.
getView
().
on
(
'
refresh
'
,
processMath
,
grid
,
{
delay
:
100
});
grid
.
getView
().
on
(
'
refresh
'
,
processMath
,
grid
);
}
});
...
...
This diff is collapsed.
Click to expand it.
static/plugin_dbui/src/appmgr.js
+
2
−
11
View file @
08607adb
...
...
@@ -27,18 +27,9 @@ App.Mgr = Ext.extend(Object, {
constructor
:
function
(
config
)
{
Ext
.
apply
(
this
,
config
);
App
.
Mgr
.
superclass
.
constructor
.
apply
(
this
);
// If the MathJax library is required load it
App
.
loadMathJax
(
this
.
configure
,
this
);
Dbui
.
getViewport
(
this
.
launch
,
this
);
},
/**
* Callback function to get the viewport configuration from the server
*/
configure
:
function
()
{
Dbui
.
getViewport
(
this
.
launch
,
this
);
},
/**
* Call back function to launch the application.
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment