Closed Bug 428022 Opened 17 years ago Closed 13 years ago

Category color indicators should be printed

Categories

(Calendar :: Printing, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: slorimer, Assigned: philmsgs)

References

Details

Attachments

(4 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13 Build Identifier: 2008033120 - Lightning plugin for Thunderbird When I set a color for a category for an event, Sunbird displays the event with a block to the right of the event containing the category color (new in 0.8. 0.7 placed a border around the event.) However, this color does not print. It doesn't appear in the print preview either. Reproducible: Always Steps to Reproduce: 1. Add a category / set a color for the category 2. Try to print - category color won't print 3. Actual Results: Pretty straightforward
Morphing bug to feature request.
Severity: normal → enhancement
OS: Windows XP → All
Hardware: PC → All
Summary: Sunbird/Lightning doesn't print Category color indicators → Category color indicators should be printed
Status: UNCONFIRMED → NEW
Ever confirmed: true
The current code contains color printing for categories, but does not work because of a ';' missing from the declaration of style. In this patch, 'border' is changed to 'border-right' for a report similar to the views. See example 'sample1.png'
Attachment #581275 - Flags: review?(philipp)
Attached image sample
Assignee: nobody → philippe.martinak
Severity: enhancement → minor
Status: NEW → ASSIGNED
Comment on attachment 581275 [details] [diff] [review] Patch for colors printing. > style += ' color: ' + cal.getContrastingTextColor(calColor); > if (catColor) { >- style += ' border: solid ' + catColor + ' 2px;'; >+ style += '; border-right: solid ' + catColor + ' 7px;'; > } I'd rather have each style += line add its own semicolon, I'll change this before checkin. r=philipp
Attachment #581275 - Flags: review?(philipp) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3
The category name must be converted using 'formatStringForCSSRule' to read the color in the preferences. ex : Congés => calendar.category.color.cong-uxe9-s
Attachment #584549 - Flags: review?(philipp)
Comment on attachment 584549 [details] [diff] [review] patch formatStringForCSSRule r=mschroeder. Philipp, can you approve this fix for comm-aurora?
Attachment #584549 - Flags: review?(philipp)
Attachment #584549 - Flags: review+
Attachment #584549 - Flags: feedback?(philipp)
Comment on attachment 584549 [details] [diff] [review] patch formatStringForCSSRule approval for aurora also
Attachment #584549 - Flags: feedback?(philipp) → feedback+
(In reply to Philipp Kewisch [:Fallen] from comment #9) > Comment on attachment 584549 [details] [diff] [review] > patch formatStringForCSSRule > > approval for aurora also https://hg.mozilla.org/comm-central/rev/89c824683851 https://hg.mozilla.org/releases/comm-aurora/rev/7595b1a85c47
Keywords: checkin-needed
(In reply to Philipp Kewisch [:Fallen] from comment #9) > Comment on attachment 584549 [details] [diff] [review] > patch formatStringForCSSRule > > approval for aurora also i replaced cat.toLowerCase() by formatStringForCSSRule(cat) in lightning 1.2b2 (+tb10) and categories colors are not printed. (it works with 1.0b3 version i use) when adding trace logs, formatStringForCSSRule is not defined. (formatStringForCSSRule is defined in calendar/content/calendar/calUtils.js file)
this patch change: formatStringForCSSRule(cat) to: cal.formatStringForCSSRule(cat) this patch solve the problem described in comment 11
Attachment #589807 - Flags: review?(philipp)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 589807 [details] [diff] [review] patch-formatStringForCSSRule-v2 Maybe wrong patch (changes toLowerCase to cal.formatString...), but I see what you mean. I'll change it and push in a sec.
Attachment #589807 - Flags: review?(philipp) → review+
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
Target Milestone: 1.3 → 1.4
Target Milestone: 1.4 → 1.3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: