Commit d7d86cdd by Sylvia Pearce

Update calculator tooltip

parent ec552cf1
...@@ -228,7 +228,7 @@ ${fragment.foot_html()} ...@@ -228,7 +228,7 @@ ${fragment.foot_html()}
% endif % endif
% if course.show_calculator: % if course.show_calculator:
<div class="calc-main"> <div class="calc-main">
<a title="${_('Open Calculator')}" href="#" role="button" aria-controls="calculator_wrapper" aria-expanded="false" class="calc">${_("Open Calculator")}</a> <a title="${_('Open Calculator')}" href="#" role="button" aria-controls="calculator_wrapper" aria-expanded="false" class="calc">${_("Open Calculator")}</a>
<div id="calculator_wrapper"> <div id="calculator_wrapper">
<form id="calculator"> <form id="calculator">
...@@ -238,110 +238,29 @@ ${fragment.foot_html()} ...@@ -238,110 +238,29 @@ ${fragment.foot_html()}
<div class="help-wrapper"> <div class="help-wrapper">
<p class="sr" id="hint-instructions">${_('Use the arrow keys to navigate the tips or use the tab key to return to the calculator')}</p> <p class="sr" id="hint-instructions">${_('Use the arrow keys to navigate the tips or use the tab key to return to the calculator')}</p>
<a id="calculator_hint" href="#" role="button" aria-haspopup="true" tabindex="-1" aria-describedby="hint-instructions">${_("Hints")}</a> <a id="calculator_hint" href="#" role="button" aria-haspopup="true" tabindex="-1" aria-describedby="hint-instructions">${_("Hints")}</a>
<ul id="calculator_input_help" class="help" aria-activedescendant="hint-integers" role="tooltip" aria-hidden="true"> <ul id="calculator_input_help" class="help" aria-activedescendant="hint- moreinfo" role="tooltip" aria-hidden="true">
<li class="hint-item" id="hint-integers" tabindex="-1"><p><span class="bold">${_("Integers")}:</span> 2520</p></li> <li class="hint-item" id="hint-moreinfo" tabindex="-1"><p><span class="bold">${_("For detailed information, see <a href="http://edx-guide-for-students.readthedocs.org/en/latest/SFD_mathformatting.html">Entering Mathematical and Scientific Expressions</a> in the <a href="http://edx-guide-for-students.readthedocs.org/en/latest/index.html">edX Guide for Students</a>.")}</span></p></li>
<li class="hint-item" id="hint-decimals" tabindex="-1"><p><span class="bold">${_("Decimals")}:</span> 3.14 or .98</p></li> <li class="hint-item" id="hint-tips" tabindex="-1"><p><span class="bold">${_("
<li class="hint-item" id="hint-scientific-notation" tabindex="-1"><p><span class="bold">${_("Scientific notation")}:</span> 1.2e-2 (=0.012), -4.4e+5 = -4.4e5 (=-440,000)</p></li> Tips")}:</span> </p></li>
<li class="hint-item" id="hint-appending-postfixes" tabindex="-1"><p><span class="bold">${_("Appending SI postfixes")}:</span> 2.25k (=2,250)</p></li> <li class="hint-item" id="hint-paren" tabindex="-1"><p> Use parentheses () to make expressions clear.</p></li>
<li class="hint-item" id="hint-supported-postfixes" tabindex="-1"><p><span class="bold">${_("Supported SI postfixes")}:</span></p> <li class="hint-item" id="hint-spaces" tabindex="-1"><p>
<table class="calc-postfixes"> Do not use spaces in expressions.</p></li>
<tbody> <li class="hint-item" id="hint-numbers" tabindex="-1"><p><span class="bold">${_("
<tr> Numbers")}:</span> Integers, fractions, decimals. Examples: 2520, 2/3, 3.14, .98</p></li>
<td>%</td> <li class="hint-item" id="hint-operators" tabindex="-1"><p><span class="bold">${_("Operators")}:</span> + - * / (add, subtract, multiply, divide), ^ (raise to a power), _ (add a subscript), || (parallel resistors). Examples: x^(n+1), v_IN+v_OUT, 1||2</p></li>
<td>percent</td> <li class="hint-item" id="hint-greek-letters" tabindex="-1"><p><span class="bold">${_("Greek letters")}:</span> Type name of letter. Examples: alpha, lambda</p></li>
<td>0.01 = 1e-2</td> <li class="hint-item" id="hint-constants" tabindex="-1"><p><span class="bold">${_("Constants")}:</span> c, e, g, i, j, k, pi, q, T </p></li>
</tr> <li class="hint-item" id="hint-functions" tabindex="-1"><p><span class="bold">${_("Functions")}:</span></p></li>
<tr> <li class="hint-item" id="hint-functions-intro" tabindex="-1"><p>To use functions, type name of function and then add expression in parentheses. Examples: sqrt(x+y), abs(x+y), log2(x+y), arccsch(x+y)</p>
<td>T</td> <ul>
<td>tera</td> <li class="hint-item" id="hint-basic-functions" tabindex="-1"><p><span class="bold">${_("Basic")}:</span> abs, exp, fact or factorial, ln, log2, log10, sqrt</p></li>
<td>1e12</td> <li class="hint-item" id="hint-trig-functions" tabindex="-1"><p><span class="bold">${_("Trigonometric")}:</span>sin, cos, tan, sec, csc, cot; arcsin, sinh, arcsinh, etc.</p></li>
</tr> </ul>
<tr>
<td>G</td>
<td>giga</td>
<td>1e9</td>
</tr>
<tr>
<td>M</td>
<td>mega</td>
<td>1e6</td>
</tr>
<tr>
<td>k</td>
<td>kilo</td>
<td>1000 = 1e3</td>
</tr>
<tr>
<td>c</td>
<td>centi</td>
<td>0.01 = 1e-2</td>
</tr>
<tr>
<td>m</td>
<td>milli</td>
<td>0.001 = 1e-3</td>
</tr>
<tr>
<td>u</td>
<td>micro</td>
<td>1e-6</td>
</tr>
<tr>
<td>n</td>
<td>nano</td>
<td>1e-9</td>
</tr>
<tr>
<td>p</td>
<td>pico</td>
<td>1e-12</td>
</tr>
</tbody>
</table>
</li>
<li class="hint-item" id="hint-operators" tabindex="-1"><p><span class="bold">${_("Operators")}:</span> + - * / ^ and || (${_("parallel resistors function")})</p></li>
<li class="hint-item" id="hint-functions" tabindex="-1"><p><span class="bold">${_("Functions")}:</span> sin, cos, tan, sqrt, log10, log2, ln, arccos, arcsin, arctan, abs, fact/factorial</p></li>
<li class="hint-item" id="hint-constants" tabindex="-1"><p><span class="bold">${_("Constants")}:</span></p>
<table>
<tbody>
<tr>
<td>j</td>
<td>=</td>
<td>sqrt(-1)</td>
</tr>
<tr>
<td>e</td>
<td>=</td>
<td>${_("Euler's number")}</td>
</tr>
<tr>
<td>pi</td>
<td>=</td>
<td>${_("ratio of a circle's circumference to it's diameter")}</td>
</tr>
<tr>
<td>k</td>
<td>=</td>
<td>${_("Boltzmann constant")}</td>
</tr>
<tr>
<td>c</td>
<td>=</td>
<td>${_("speed of light")}</td>
</tr>
<tr>
<td>T</td>
<td>=</td>
<td>${_("Typical room temperature: 298.15 (Kelvin), same as 25C/77F")}</td>
</tr>
<tr>
<td>q</td>
<td>=</td>
<td>${_("fundamental charge")}</td>
</tr>
</tbody>
</table>
</li> </li>
<li class="hint-item" id="hint-affixes" tabindex="-1"><p><span class="bold">${_("
Affixes")}:</span> Percent sign (%) and metric affixes (d, c, m, u, n, p, k, M, G, T) </p></li>
<li class="hint-item" id="hint-affix-info" tabindex="-1"><p>Type number and affix. Examples: 20%, 15u, 8T</p></li>
<li class="hint-item" id="hint-scientific-e-notation" tabindex="-1"><p><span class="bold">${_("Scientific and e Notation")}:</span> Type ^ or e and exponent. Examples: 10^-9, 10^3, 1e-9, 1e3</p></li>
</ul> </ul>
</div> </div>
</div> </div>
...@@ -351,5 +270,6 @@ ${fragment.foot_html()} ...@@ -351,5 +270,6 @@ ${fragment.foot_html()}
</div> </div>
</div> </div>
% endif % endif
<%include file="../modal/accessible_confirm.html" /> <%include file="../modal/accessible_confirm.html" />
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