1
0
forked from GitHub/gf-core

Access keys for input fields in minibar and feedback form

This commit is contained in:
hallgren
2010-07-06 13:36:42 +00:00
parent 710b8f1bf7
commit c1245d53cd
2 changed files with 7 additions and 6 deletions

View File

@@ -23,12 +23,12 @@
<p><input type=hidden name="to"> <span class=field id="to">...</span> translation:
<input type=hidden name="translation"> <span class=field id=translation>...</span>
<p>Suggest a better translation:
<textarea rows=3 name="improvement"></textarea>
<p><label accesskey="S">Suggest a better translation:
<textarea rows=3 name="improvement"></textarea></label>
</div>
<p>Comments:
<br><textarea rows=5 name="comment"></textarea>
<p><label accesskey="C">Comments:
<br><textarea rows=5 name="comment"></textarea></label>
<p>
<input type=submit value="Submit Feedback">

View File

@@ -71,7 +71,8 @@ var server = {
/* --- Initialisation ------------------------------------------------------- */
function start_minibar(opts) { // typically called when the HTML document is loaded
function start_minibar(opts) {
// Typically called when the HTML document is loaded
if(opts) for(var o in opts) options[o]=opts[o];
var surface=div_id("surface");
var extra=div_id("extra");
@@ -209,7 +210,7 @@ function add_typed_input(surface) {
inp=surface.typed;
else {
var inp=empty("input","type","text");
//inp.setAttribute("onclick","return false;"); // Don't propagate click to surface
inp.setAttribute("accesskey","t");
inp.setAttribute("onkeyup","complete_typed(this)");
inp.setAttribute("onchange","finish_typed(this)");
surface.appendChild(inp);