Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
c63dcf0d
Commit
c63dcf0d
authored
Feb 22, 2016
by
Adam Palay
Committed by
Michael Frey
Feb 24, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
render mathjax in svg by default (TNL-4145)
mathjax preview should be inline by default
parent
2cb48742
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
14 additions
and
14 deletions
+14
-14
cms/static/cms/js/require-config.js
+1
-1
cms/static/coffee/spec/main.coffee
+1
-1
cms/static/coffee/spec/main_squire.coffee
+1
-1
common/djangoapps/terrain/ui_helpers.py
+1
-1
common/lib/capa/capa/templates/formulaequationinput.html
+1
-1
common/static/js/capa/spec/formula_equation_preview_spec.js
+2
-2
common/static/js/capa/src/formula_equation_preview.js
+1
-1
common/templates/mathjax_include.html
+1
-1
common/test/acceptance/pages/lms/discussion.py
+1
-1
common/test/acceptance/pages/lms/problem.py
+2
-2
common/test/acceptance/pages/lms/tab_nav.py
+1
-1
lms/static/js/spec/main.js
+1
-1
No files found.
cms/static/cms/js/require-config.js
View file @
c63dcf0d
...
...
@@ -91,7 +91,7 @@
// end of Annotation tool files
// externally hosted files
"mathjax"
:
"//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_
CHTML
&delayStartupUntil=configured"
,
// jshint ignore:line
"mathjax"
:
"//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_
SVG
&delayStartupUntil=configured"
,
// jshint ignore:line
"youtube"
:
[
// youtube URL does not end in ".js". We add "?noext" to the path so
// that require.js adds the ".js" to the query component of the URL,
...
...
cms/static/coffee/spec/main.coffee
View file @
c63dcf0d
...
...
@@ -51,7 +51,7 @@ requirejs.config({
"URI"
:
"xmodule_js/common_static/js/vendor/URI.min"
,
"mock-ajax"
:
"xmodule_js/common_static/js/vendor/mock-ajax"
,
"mathjax"
:
"//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_
CHTML
&delayStartupUntil=configured"
,
"mathjax"
:
"//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_
SVG
&delayStartupUntil=configured"
,
"youtube"
:
"//www.youtube.com/player_api?noext"
,
"coffee/src/ajax_prefix"
:
"xmodule_js/common_static/coffee/src/ajax_prefix"
,
...
...
cms/static/coffee/spec/main_squire.coffee
View file @
c63dcf0d
...
...
@@ -42,7 +42,7 @@ requirejs.config({
"domReady"
:
"xmodule_js/common_static/js/vendor/domReady"
,
"URI"
:
"xmodule_js/common_static/js/vendor/URI.min"
,
"mathjax"
:
"//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_
CHTML
&delayStartupUntil=configured"
,
"mathjax"
:
"//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_
SVG
&delayStartupUntil=configured"
,
"youtube"
:
"//www.youtube.com/player_api?noext"
,
"coffee/src/ajax_prefix"
:
"xmodule_js/common_static/coffee/src/ajax_prefix"
...
...
common/djangoapps/terrain/ui_helpers.py
View file @
c63dcf0d
...
...
@@ -346,7 +346,7 @@ def css_contains_text(css_selector, partial_text, index=0):
# If we're expecting a non-empty string, give the page
# a chance to fill in text fields.
if
partial_text
:
wait_for
(
lambda
_
:
css_html
(
css_selector
,
index
=
index
))
wait_for
(
lambda
_
:
css_html
(
css_selector
,
index
=
index
)
,
timeout
=
8
)
actual_text
=
css_html
(
css_selector
,
index
=
index
)
...
...
common/lib/capa/capa/templates/formulaequationinput.html
View file @
c63dcf0d
...
...
@@ -20,7 +20,7 @@
<p
id=
"answer_${id}"
class=
"answer"
></p>
<div
id=
"input_${id}_preview"
class=
"equation"
>
\
[\]
\
(\)
<img
src=
"${STATIC_URL}images/spinner.gif"
class=
"loading"
alt=
"Loading"
/>
</div>
</div>
...
...
common/static/js/capa/spec/formula_equation_preview_spec.js
View file @
c63dcf0d
...
...
@@ -139,7 +139,7 @@ describe("Formula Equation Preview", function () {
// Either it makes a request or jumps straight into displaying ''.
waitsFor
(
function
()
{
// (Short circuit if `inputAjax` is indeed called)
return
Problem
.
inputAjax
.
wasCalled
||
return
Problem
.
inputAjax
.
wasCalled
||
// jshint ignore:line
MathJax
.
Hub
.
Queue
.
wasCalled
;
},
"AJAX never called on user input"
,
1000
);
...
...
@@ -266,7 +266,7 @@ describe("Formula Equation Preview", function () {
// We should look in the preview div for the MathJax.
var
previewElement
=
$
(
"#input_THE_ID_preview"
)[
0
];
expect
(
previewElement
.
firstChild
.
data
).
toEqual
(
"
\\
[THE_FORMULA
\\
]
"
);
expect
(
previewElement
.
firstChild
.
data
).
toEqual
(
"
\\
(THE_FORMULA
\\
)
"
);
// Refresh the MathJax.
expect
(
MathJax
.
Hub
.
Queue
).
toHaveBeenCalledWith
(
...
...
common/static/js/capa/src/formula_equation_preview.js
View file @
c63dcf0d
...
...
@@ -145,7 +145,7 @@ formulaEquationPreview.enable = function () {
console
.
log
(
"[FormulaEquationInput] Oops no mathjax for "
,
latex
);
// Fall back to modifying the actual element.
var
textNode
=
previewElement
.
childNodes
[
0
];
textNode
.
data
=
"
\\
["
+
latex
+
"
\\
]
"
;
textNode
.
data
=
"
\\
("
+
latex
+
"
\\
)
"
;
MathJax
.
Hub
.
Queue
([
"Typeset"
,
MathJax
.
Hub
,
previewElement
]);
}
});
...
...
common/templates/mathjax_include.html
View file @
c63dcf0d
...
...
@@ -76,4 +76,4 @@
<!-- This must appear after all mathjax-config blocks, so it is after the imports from the other templates.
It can't be run through static.url because MathJax uses crazy url introspection to do lazy loading of
MathJax extension libraries -->
<script
type=
"text/javascript"
src=
"https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_
CHTML
"
></script>
<script
type=
"text/javascript"
src=
"https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_
SVG
"
></script>
common/test/acceptance/pages/lms/discussion.py
View file @
c63dcf0d
...
...
@@ -126,7 +126,7 @@ class DiscussionThreadPage(PageObject, DiscussionPageMixin):
def
verify_mathjax_rendered
(
self
):
""" Checks that MathJax css class is present """
self
.
wait_for
(
lambda
:
self
.
_is_element_visible
(
".MathJax_
CHTML
"
),
lambda
:
self
.
_is_element_visible
(
".MathJax_
SVG
"
),
description
=
"MathJax Preview is rendered"
)
...
...
common/test/acceptance/pages/lms/problem.py
View file @
c63dcf0d
...
...
@@ -49,7 +49,7 @@ class ProblemPage(PageObject):
"""
def
mathjax_present
():
""" Returns True if MathJax css is present in the problem body """
mathjax_container
=
self
.
q
(
css
=
"div.problem p .MathJax_
CHTML
"
)
mathjax_container
=
self
.
q
(
css
=
"div.problem p .MathJax_
SVG
"
)
return
mathjax_container
.
visible
and
mathjax_container
.
present
self
.
wait_for
(
...
...
@@ -63,7 +63,7 @@ class ProblemPage(PageObject):
"""
def
mathjax_present
():
""" Returns True if MathJax css is present in the problem body """
mathjax_container
=
self
.
q
(
css
=
"div.problem div.problem-hint .MathJax_
CHTML
"
)
mathjax_container
=
self
.
q
(
css
=
"div.problem div.problem-hint .MathJax_
SVG
"
)
return
mathjax_container
.
visible
and
mathjax_container
.
present
self
.
wait_for
(
...
...
common/test/acceptance/pages/lms/tab_nav.py
View file @
c63dcf0d
...
...
@@ -40,7 +40,7 @@ class TabNavPage(PageObject):
"""
Check that MathJax has rendered in tab content
"""
mathjax_container
=
self
.
q
(
css
=
".static_tab_wrapper .MathJax_
CHTML
"
)
mathjax_container
=
self
.
q
(
css
=
".static_tab_wrapper .MathJax_
SVG
"
)
EmptyPromise
(
lambda
:
mathjax_container
.
present
and
mathjax_container
.
visible
,
"MathJax is not visible"
...
...
lms/static/js/spec/main.js
View file @
c63dcf0d
...
...
@@ -49,7 +49,7 @@
'jasmine.async'
:
'xmodule_js/common_static/js/vendor/jasmine.async'
,
'draggabilly'
:
'xmodule_js/common_static/js/vendor/draggabilly.pkgd'
,
'domReady'
:
'xmodule_js/common_static/js/vendor/domReady'
,
'mathjax'
:
'//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_
CHTML
&delayStartupUntil=configured'
,
// jshint ignore:line
'mathjax'
:
'//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_
SVG
&delayStartupUntil=configured'
,
// jshint ignore:line
'youtube'
:
'//www.youtube.com/player_api?noext'
,
'coffee/src/ajax_prefix'
:
'xmodule_js/common_static/coffee/src/ajax_prefix'
,
'coffee/src/instructor_dashboard/student_admin'
:
'coffee/src/instructor_dashboard/student_admin'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment