Closed
Bug 288891
Opened 20 years ago
Closed 20 years ago
ICAL_STATUS_ constants are undefined, mouseover Status: field is blank
Categories
(Calendar :: Sunbird Only, defect)
Calendar
Sunbird Only
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: gekacheka, Assigned: mostafah)
Details
Attachments
(1 file, 1 obsolete file)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2 Build Identifier: trunk ICAL_STATUS_ constants are undefined, mouseover Status: field is blank Reproducible: Always Steps to Reproduce: 1. Mouseover event or task. Actual Results: Status field is blank. JavaScript console shows: Warning: reference to undefined property iCalToDo.ICAL_STATUS_NEEDSACTION Source File: chrome://calendar/content/mouseoverPreviews.js Line: 274 and several more. Expected Results: mouseover tooltip shows status. Workaround: edit event or task to view status.
(patch -l -p 2 -i file.patch) The ICAL_STATUS_... constants are no longer available to specify status values. The current values are literal RFC2445sec4.8.1.11 strings, so this patch just inserts the literal strings into the code just like in eventDialog.js. In addition to the RFC2445sec4.8.1.11 strings, eventDialog.js also uses "None" (capitalized, not allcaps) as a value, so that is used here as well. (It would be nice to define these as constants somewhere, so there would be better checking against misspellings, mishyphenization, or miscapitalization. But I'm not sure where would be a good place. It might be hard to refer to such external constants in all contexts where they are used: eventDialog.xul, eventDialog.js, and mouseoverPreviews.js.)
Attachment #179524 -
Flags: first-review?
Comment 2•20 years ago
|
||
Comment on attachment 179524 [details] [diff] [review] mouseoverPreviews.js: replace ICAL_STATUS constants with RFC2445sec4.8.1.11 strings shaver knows these constants...
Attachment #179524 -
Flags: first-review? → first-review?(shaver)
Comment 3•20 years ago
|
||
Comment on attachment 179524 [details] [diff] [review] mouseoverPreviews.js: replace ICAL_STATUS constants with RFC2445sec4.8.1.11 strings Why is "None" not "NONE"? If it works, this is an improvement for sure, but I'd rather see that be capitalized. Also, we should remove the constants if they're no longer used. Can you pop up another patch that does both those things? Thanks.
Attachment #179524 -
Flags: first-review?(shaver) → first-review-
(patch -l -p 2 -i file.patch) Fix patch to use "NONE" instead of "None". (The previous patch used "None" because that was the value used in eventDialog.js) The event.ICAL_STATUS_ javascript constants were defined in libxpical which is no longer used so there is no point in removing them. http://lxr.mozilla.org/seamonkey/source/calendar/libxpical/oeIICal.idl#85 (I guess the new interfaces do not have these constants because the new values are strings and idl interfaces cannot define cross platform string constants.) http://www.mozilla.org/scriptable/xpidl/idl-authors-guide/rules.html#enum-and-const
Attachment #179524 -
Attachment is obsolete: true
Attachment #180181 -
Flags: first-review?
Comment 5•20 years ago
|
||
Comment on attachment 180181 [details] [diff] [review] mouseoverPreviews.js: replace ICAL_STATUS constants with RFC2445sec4.8.1.11 strings + "NONE" You should really ask review from someone...
Attachment #180181 -
Flags: first-review? → first-review?(shaver)
Comment 6•20 years ago
|
||
Comment on attachment 180181 [details] [diff] [review] mouseoverPreviews.js: replace ICAL_STATUS constants with RFC2445sec4.8.1.11 strings + "NONE" Sweet, thanks. r=shaver (We should cvsremove libxpidl some time.)
Attachment #180181 -
Flags: first-review?(shaver) → first-review+
Comment 7•20 years ago
|
||
Committed the latest patch. Thanks!
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
QA Contact: gurganbl → sunbird
You need to log in
before you can comment on or make changes to this bug.
Description
•