Closed
Bug 386505
Opened 19 years ago
Closed 19 years ago
Cannot switch to Calendar mode using Thunderbird 1.5
Categories
(Calendar :: Lightning Only, defect)
Calendar
Lightning Only
Tracking
(Not tracked)
VERIFIED
FIXED
0.7
People
(Reporter: Taraman, Assigned: ssitter)
Details
Attachments
(3 files)
|
4.28 KB,
patch
|
michael.buettner
:
review-
|
Details | Diff | Splinter Review |
|
4.09 KB,
patch
|
michael.buettner
:
review+
|
Details | Diff | Splinter Review |
|
4.10 KB,
patch
|
Details | Diff | Splinter Review |
In TB 1.5.0.10 Portable Edition I get the following error on clicking the
calendar-view button:
Fehler: mailToolbar has no properties
Quelldatei: chrome://lightning/content/messenger-overlay-toolbar.js
Zeile: 140
the view is not switching.
Lightning Version: 0.7pre (build 2007070103)
This seems to be after the patch from Bug 371916 has been checked in.
| Assignee | ||
Comment 1•19 years ago
|
||
Thunderbird 2.0 uses the ID "mail-bar2" while Thunderbird 1.5 uses the ID "mail-bar". The ID was changed with Bug 324194.
Assignee: nobody → ssitter
Status: NEW → ASSIGNED
Attachment #270500 -
Flags: review?(michael.buettner)
| Assignee | ||
Updated•19 years ago
|
OS: Windows XP → All
Hardware: PC → All
Summary: Error in Calendar View Button → Cannot switch to Calendar mode using Thunderbird 1.5
Comment 2•19 years ago
|
||
Isn't there any better way than calling getElementById() twice and see which one succeeds? Probably do this once in the load-handler and remembering the right one in a global variable? This is nit-picking, but it would make me feel more comfortable ;-)
Comment 3•19 years ago
|
||
I first found the same problem today with TB 1.5 and then this bug.
Verified the patch, but as mentioned in other bugs, equal code should be considered to be a central function.
So think about a function 'getMailBar()' similiar to 'getViewDeck()'.
This would be perfect to change, whenever a better solution is found.
Comment 4•19 years ago
|
||
(In reply to comment #3)
> So think about a function 'getMailBar()' similiar to 'getViewDeck()'.
> This would be perfect to change, whenever a better solution is found.
That's exactly what I tried to ask for in my comment #2 :-)
Comment 5•19 years ago
|
||
...just to push the resolution of this bug.
Otherwise you should consider to change the application requirements for Lightning, which would be sad to exclude TB 1.5!
Attachment #270854 -
Flags: review?(michael.buettner)
| Assignee | ||
Comment 6•19 years ago
|
||
Comment on attachment 270854 [details] [diff] [review]
rev1 - consider Thunderbird 1.5 mail toolbar ID
This patch replaces one call to getElementById (Tb 2) resp. two calls to getElementById (Tb 1.5) with one function call + two calls to getElementById + passing back the return value (Tb 2 and Tb 1.5). In my opinion this is less efficient and adds more overhead than required for this simple task.
Comment 7•19 years ago
|
||
Comment on attachment 270500 [details] [diff] [review]
rev0 - consider Thunderbird 1.5 mail toolbar ID
canceling review request due to updated version from sven. thanks for initially coming up with a solution.
Attachment #270500 -
Flags: review?(michael.buettner) → review-
Comment 8•19 years ago
|
||
Comment on attachment 270854 [details] [diff] [review]
rev1 - consider Thunderbird 1.5 mail toolbar ID
>+function getMailBar() {
>+ var tb2Bar = document.getElementById("mail-bar2");
if (tb2Bar) {
return tb2Bar;
}
>+ return document.getElementById("mail-bar");
>+}
Just a minor performance improvement...
Comment 9•19 years ago
|
||
Comment on attachment 270854 [details] [diff] [review]
rev1 - consider Thunderbird 1.5 mail toolbar ID
>+function getMailBar() {
return document.getElementById("mail-bar2") ||
document.getElementById("mail-bar");
>+}
or even better...
Comment 10•19 years ago
|
||
Comment on attachment 270854 [details] [diff] [review]
rev1 - consider Thunderbird 1.5 mail toolbar ID
>+function getMailBar() {
>+ var tb2Bar = document.getElementById("mail-bar2");
>+ var tb1Bar = document.getElementById("mail-bar");
>+ return tb2Bar || tb1Bar;
>+}
Putting the retrieval of the appropriate node from the tree into a separate function makes the code cleaner since it avoids code duplication. Furthermore, counting cycles here strikes me as being premature optimization. These functions are called extremely seldom.
But we could write the body of the function as Stefan originally suggested:
return document.getElementById("mail-bar2") ||
document.getElementById("mail-bar");
r=mickey with this issue being addressed.
Attachment #270854 -
Flags: review?(michael.buettner) → review+
Comment 11•19 years ago
|
||
patch as it is going to be checked in.
Comment 12•19 years ago
|
||
Checked in on HEAD and MOZILLA_1_8_BRANCH
-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Target Milestone: --- → 0.7
Version: Trunk → unspecified
Comment 13•18 years ago
|
||
Verified with lightning build 2007071103, task is fixed.
Updated•18 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•