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
15d4af26
Commit
15d4af26
authored
Oct 14, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #899 from MITx/feature/victor/capa-ajax
Make chem preview more robust
parents
97233cf0
f4d8df94
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
common/lib/capa/capa/templates/chemicalequationinput.html
+1
-3
common/static/js/capa/chemical_equation_preview.js
+3
-2
No files found.
common/lib/capa/capa/templates/chemicalequationinput.html
View file @
15d4af26
...
...
@@ -29,10 +29,8 @@
% endif
</p>
<div
class=
"equation"
>
<div
id=
"input_${id}_preview"
class=
"equation"
>
</div>
<p
id=
"answer_${id}"
class=
"answer"
></p>
...
...
common/static/js/capa/chemical_equation_preview.js
View file @
15d4af26
(
function
()
{
update
=
function
()
{
preview_div
=
$
(
this
).
siblings
(
'div.equation'
);
function
create_handler
(
saved_div
)
{
return
(
function
(
response
)
{
if
(
response
.
error
)
{
...
...
@@ -12,6 +10,9 @@
});
}
prev_id
=
"#"
+
this
.
id
+
"_preview"
;
preview_div
=
$
(
prev_id
)
$
.
get
(
"/preview/chemcalc/"
,
{
"formula"
:
this
.
value
},
create_handler
(
preview_div
));
}
...
...
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