Closed Bug 351445 Opened 19 years ago Closed 18 years ago

Match all messages in the filter and save search dialog hides UI elements

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3

People

(Reporter: mscott, Assigned: bisi)

References

Details

(Keywords: polish)

Attachments

(1 file, 2 obsolete files)

We shouldn't be hiding the filter rules when you choose Match all messages. We should just disable the rules box.
OS: Windows XP → All
Hardware: PC → All
Severity: normal → minor
Keywords: polish
Attached patch disable listbox (obsolete) — Splinter Review
I'm not sure if that's the right approach here, but it seems that there's no easier way to do it.
Assignee: mscott → bisi
Status: NEW → ASSIGNED
Attachment #264179 - Flags: review?(mscott)
Comment on attachment 264179 [details] [diff] [review] disable listbox That turned out to be more complicated than I thought it would :) Looks ok to me, asking Magnus for a peer review too.
Attachment #264179 - Flags: superreview+
Attachment #264179 - Flags: review?(mscott)
Attachment #264179 - Flags: review?(mkmelin+mozilla)
Thanks Scott. By the way, this patch also fixes the save search dialog, which uses the same xul overlay file.
Summary: Match all messages in the filter dialog hides UI elements → Match all messages in the filter and save search dialog hides UI elements
Comment on attachment 264179 [details] [diff] [review] disable listbox You should enable disabled elements again if the match all is deselected. Now you get stuck with a disabled input field when you toggle between match all of/any/all. I think JavaDoc syntax ( /** */ ) is preferable for function documentation, not that that file uses it much...
Attachment #264179 - Flags: review?(mkmelin+mozilla) → review-
Good catch! Actually, the text input field gets enabled, but it's not focusable anymore. I'll look into that, thanks for the review.
Attached patch disable listbox, v2 (obsolete) — Splinter Review
Weird, just switching disabled attributes doesn't work for searchvalue textboxes. We also need to remove them. I've also added java doc style comments and a tiny change to mailWidgets (I forgot to add xbl:inherits to the second xul:textbox element in the searchvalue binding).
Attachment #264179 - Attachment is obsolete: true
Attachment #272325 - Flags: review?(mkmelin+mozilla)
Comment on attachment 272325 [details] [diff] [review] disable listbox, v2 >+ * @param matchAllValue >+ * boolean value from the first search term Please put it on the same line. >+ searchValueList[i].setAttribute("disabled", matchAllValue); >+ if (!matchAllValue) >+ searchValueList[i].removeAttribute("disabled"); Are both needed? I would have thought just removing the attribute was enough. Looks quite good, but I noticed it doesn't disable the value dropdowns for Priority and Status.
Comment on attachment 272325 [details] [diff] [review] disable listbox, v2 Oops, I'll post a new patch.
Attachment #272325 - Attachment is obsolete: true
Attachment #272325 - Flags: review?(mkmelin+mozilla)
I've added a few more xbl:inherits. :) Regarding your question about using setAttribute and removeAttribute: I think in this case they are needed both, because a searchvalue element doesn't reset the value of the disabled attribute if only removeAttribute is used.
Attachment #272343 - Flags: review?(mkmelin+mozilla)
Comment on attachment 272343 [details] [diff] [review] disable listbox, v2.1 Looks good now, thx! r=mkmelin+mozilla
Attachment #272343 - Flags: review?(mkmelin+mozilla) → review+
Target Milestone: Thunderbird2.0 → Thunderbird 3
Comment on attachment 272343 [details] [diff] [review] disable listbox, v2.1 After numerous complications, I think this patch is ready to go. :) Checking for a sr again.
Attachment #272343 - Flags: superreview?(mscott)
Comment on attachment 272343 [details] [diff] [review] disable listbox, v2.1 yeah..bisi is back. looks good to me.
Attachment #272343 - Flags: superreview?(mscott) → superreview+
I'd like to throw a new chicken into the tree. Yeah, this means you, attachment 272343 [details] [diff] [review]. :)
Keywords: checkin-needed
mozilla/mailnews/base/resources/content/mailWidgets.xml 1.118 mozilla/mailnews/base/search/resources/content/searchTermOverlay.js 1.49
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Version: 2.0 → Trunk
Thanks Nickolay!
(In reply to comment #6) >Weird, just switching disabled attributes doesn't work for searchvalue >textboxes. We also need to remove them. That's because they're really HTML <input> elments in disguise, and they disable themselves simply on the presence of a disabled attribute.
Depends on: 477254
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: