Add javascript to focus/select the voting textbox or checkbox

RESOLVED FIXED in Bugzilla 2.20

Status

()

Bugzilla
User Interface
--
enhancement
RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: GavinS, Assigned: GavinS)

Tracking

2.19
Bugzilla 2.20
Bug Flags:
approval +

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

13 years ago
Bug 250440 tried this once, and failed. Try again...
(Assignee)

Comment 1

13 years ago
Created attachment 174094 [details] [diff] [review]
try adding javascript to focus the voting form

1 question: is this OK in the case when we are just viewing the list, and not
voting for a specific bug? (In that case we just try and focus a non-existent
form control)
Attachment #174094 - Flags: review?
(Assignee)

Comment 2

13 years ago
Created attachment 174128 [details] [diff] [review]
add javascript to focus voting textbox or checkbox

This version removes the javascript error by only attempting the focus when we
are actually voting
Attachment #174094 - Attachment is obsolete: true
Attachment #174128 - Flags: review?
Comment on attachment 174128 [details] [diff] [review]
add javascript to focus voting textbox or checkbox

>+    [% IF bug_id %]
>+      [%# We .select and .focus the input so it works for textbox and 
>+          checkbox %]
>+      [% onload = "document.forms['voting_form'].bug_" _ bug_id _
>+                  ".select();document.forms['voting_form'].bug_" _ bug_id _
>+                  ".focus()" %]
>+      [% END %]

The [% END %] is misaligned. Please update on a new patch, and set r+ on it.
The patch is good otherwise. I'm fine with having select as well as focus, good
thing you commented that.
Attachment #174128 - Flags: review? → review+
Attachment #174094 - Flags: review?
(Assignee)

Comment 4

13 years ago
Created attachment 174170 [details] [diff] [review]
add javascript to focus voting textbox or checkbox v3

fix indentation and carry over Marc's r+
Attachment #174128 - Attachment is obsolete: true
Attachment #174170 - Flags: review+
(Assignee)

Updated

13 years ago
Flags: approval?
Flags: approval? → approval+
Target Milestone: --- → Bugzilla 2.20

Comment 5

13 years ago
Checking in template/en/default/bug/votes/list-for-user.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/votes/list-for-
user.html.tmpl,v  <--  list-for-user.html.tmpl
new revision: 1.19; previous revision: 1.18
done
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.