Closed Bug 281632 Opened 20 years ago Closed 20 years ago

Add javascript to focus/select the voting textbox or checkbox

Categories

(Bugzilla :: User Interface, enhancement)

2.19
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: bugzilla, Assigned: bugzilla)

Details

Attachments

(1 file, 2 obsolete files)

Bug 250440 tried this once, and failed. Try again...
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?
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?
fix indentation and carry over Marc's r+
Attachment #174128 - Attachment is obsolete: true
Attachment #174170 - Flags: review+
Flags: approval?
Flags: approval? → approval+
Target Milestone: --- → Bugzilla 2.20
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
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: