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
85a29648
Commit
85a29648
authored
Feb 07, 2012
by
Ernie Park
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix enter on submit for calculator, needs styling
parent
2663408a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
main.html
+12
-9
No files found.
main.html
View file @
85a29648
...
...
@@ -69,20 +69,22 @@
</div>
<div
id=
"calculator_div"
class=
"leanModal_box"
>
<input
type=
"text"
id=
"calculator_input"
>
<input
id=
"calculator_button"
type=
button
value=
"=>"
>
<input
type=
"text"
id=
"calculator_output"
readonly
>
<form
id=
"calculator"
>
<input
type=
"text"
id=
"calculator_input"
>
<input
id=
"calculator_button"
type=
"submit"
value=
"=>"
>
<input
type=
"text"
id=
"calculator_output"
readonly
>
</form>
<table>
<tr><td
align=
"right"
>
Suffixes
</td><td>
:
</td><td
align=
"left"
>
%kMGTcmunp
</td></tr>
<tr><td
align=
"right"
>
Operations
</td><td>
:
</td><td
align=
"left"
>
^ * / + - ()
</td></tr>
<tr><td
align=
"right"
>
Functions
</td><td>
:
</td><td
align=
"left"
>
sin, cos, tan, sqrt, log10, log2, ln, arccos, arcsin, arctan, abs
</td></tr>
<tr><td
align=
"right"
>
Constants
</td><td>
:
</td><td
align=
"left"
>
e
</td></tr>
<!--p> Unsupported: ||, j </p
Students won't know what parallel means at this time.
Complex numbers aren't well tested in the courseware, so we would prefer to not expose them.
If you read the comments in the source, feel free to use them. If you run into a bug, please
let us know. But we can't officially support them right now.
-->
Students won't know what parallel means at this time.
Complex numbers aren't well tested in the courseware, so we would prefer to not expose them.
If you read the comments in the source, feel free to use them. If you run into a bug, please
let us know. But we can't officially support them right now.
-->
</table>
</div>
...
...
@@ -103,7 +105,8 @@ $(function() {
// Calculator
$
(
function
()
{
$
(
"#calculator_button"
).
click
(
function
(){
$
(
"form#calculator"
).
submit
(
function
(
e
){
e
.
preventDefault
();
$
.
getJSON
(
"/calculate"
,
{
"equation"
:
$
(
"#calculator_input"
).
attr
(
"value"
)},
function
(
data
){
$
(
"#calculator_output"
).
attr
(
"value"
,
data
.
result
);
...
...
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