Closed
Bug 186689
Opened 22 years ago
Closed 22 years ago
Should be able to set all/clear all email options in preferences
Categories
(Bugzilla :: User Interface, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: mozilla-linux, Assigned: justdave)
References
Details
Attachments
(1 file, 2 obsolete files)
2.01 KB,
patch
|
gerv
:
review+
|
Details | Diff | Splinter Review |
I have two bugzilla accounts: one for work and one for home. When I am not working, I want to completely disable e-mail for my work account. When I am working, I want to re-enable it, again. Currently, I have to click (or unclick) each option. There should be a two extra buttons under "Field/recipient specific options:". One should be labeled "Set all" and the other should be labeled "Clear all"
Assignee | ||
Comment 1•22 years ago
|
||
"Enable all mail" and "Disable all mail" javascript buttons which set/clear the appropriate checkboxes.
Assignee | ||
Updated•22 years ago
|
Attachment #113358 -
Flags: review?(gerv)
Assignee | ||
Comment 2•22 years ago
|
||
-> me
Assignee: myk → justdave
Severity: minor → enhancement
Target Milestone: --- → Bugzilla 2.18
Comment 3•22 years ago
|
||
Comment on attachment 113358 [details] [diff] [review] patch v1 >+<script type="text/javascript"> >+<!-- >+ >+function SetCheckboxes(setting) { >+ for (var count = 0; count < document.userprefsform.elements.length; count++) { >+ var theinput = document.userprefsform.elements[count]; >+ if (theinput.type == "checkbox") { >+ if (theinput.name == "ExcludeSelf") { >+ theinput.checked = false; Are you sure you mean "false" rather than "!setting"? Perhaps the need for this exception tells us that this checkbox should have an inverted sense... >@@ -108,7 +127,9 @@ > </td> > </tr> > </table> >- >+<noscript>The following two buttons require Javascript to be active<br></noscript> >+<input type="button" value="Enable All Mail" onclick="SetCheckboxes(true); return false;"> >+<input type="button" value="Disable All Mail" onclick="SetCheckboxes(false); return false;"> I think it's preferable to document.write() the two buttons, rather than have the slightly clunky message. This is the usual solution for things that only work with JS. Gerv
Attachment #113358 -
Flags: review?(gerv) → review-
Assignee | ||
Comment 4•22 years ago
|
||
>>+ if (theinput.name == "ExcludeSelf") { >>+ theinput.checked = false; > >Are you sure you mean "false" rather than "!setting"? Yep... if the rest of the mail settings are disabled, that's ignored. But if you want "ALL" mail, then that needs to NOT be checked. But having that checked when the rest of the settings aren't makes it read like you're still going to get mail, even though it's really going to be ignored. We had a huge argument over that last time the prefs got redone, and the concensus at the time was that we didn't want any of the checkboxes to have a negative description... >I think it's preferable to document.write() the two buttons, rather than have >the slightly clunky message. I was debating on that. :) Should we put a <noscript> messasge indicating that they can check/uncheck all the settings with a single button if they enable Javascript? :)
Assignee | ||
Comment 5•22 years ago
|
||
addresses Gerv's nits, with the exception of the "ExcludeSelf" checkbox...
Attachment #113358 -
Attachment is obsolete: true
Assignee | ||
Comment 6•22 years ago
|
||
oops, forgot you weren't CC'd, Gerv. See comment #4
Status: NEW → ASSIGNED
Comment 7•22 years ago
|
||
Now you have two scripts, it makes sense to amalgamate them to keep the code together. I'm not all that keen on the <noscript> (what they don't know won't hurt 'em) but if you want to keep it, fine. With the first change, r=gerv. Gerv
Assignee | ||
Comment 8•22 years ago
|
||
This what you had in mind, re: merging the scripts?
Attachment #113365 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #113380 -
Flags: review?(gerv)
Comment 9•22 years ago
|
||
Exactly. r=gerv. Although you should probably test on e.g. NS 4.x, if these buttons are outside the <form>, as I'm not sure it supports form controls outside one. (I can't see from the context.) Gerv
Assignee | ||
Comment 10•22 years ago
|
||
I thought of that. :) They're inside the form. The form itself is actually defined in a different template (hence the patch to the second file to name it). The email.html.tmpl template is entirely inside the form.
Updated•22 years ago
|
Attachment #113380 -
Flags: review?(gerv) → review+
Assignee | ||
Comment 11•22 years ago
|
||
Checking in template/en/default/account/prefs/email.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/account/prefs/email.html.tmpl,v <-- email.html.tmpl new revision: 1.8; previous revision: 1.7 done Checking in template/en/default/account/prefs/prefs.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/account/prefs/prefs.html.tmpl,v <-- prefs.html.tmpl new revision: 1.9; previous revision: 1.8 done
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Flags: approval+
Resolution: --- → FIXED
Comment 12•21 years ago
|
||
*** Bug 201083 has been marked as a duplicate of this bug. ***
Comment 13•20 years ago
|
||
*** Bug 150846 has been marked as a duplicate of this bug. ***
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•