Closed Bug 658063 Opened 13 years ago Closed 13 years ago

Move votes_container css style to external style.css instead of template

Categories

(Bugzilla :: Extensions, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 4.2

People

(Reporter: dkl, Assigned: dkl)

References

Details

Attachments

(1 file, 2 obsolete files)

Patch that moves the CSS style for #votes_container from the template to the style.css file instead.
Attachment #533413 - Flags: review?(mkanat)
Assignee: extensions → dkl
Status: NEW → ASSIGNED
Comment on attachment 533413 [details] [diff] [review]
Patch that moves CSS style from template to style.css (v1)

Awesome, thank you. However, adding <link> tags directly into the headers is actually not the way that things should be done anymore, if you can avoid it. Instead, you want to push the style URL into the style_urls array in the header-start.html.tmpl hook.

If that doesn't work (a) let me know and (b) keep the <link> tag and do FILTER mtime on the href portion.
Attachment #533413 - Flags: review?(mkanat) → review-
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → Bugzilla 4.2
Also, in curiosity--what's happening that you want to have this style.css loaded by every page in Bugzilla?
(In reply to comment #2)
> Also, in curiosity--what's happening that you want to have this style.css
> loaded by every page in Bugzilla?

It shouldn't. I am doing [% IF bug %] in the current patch so it should only load for show_bug.cgi. Is there a way to check for bug/show.html.tmpl in the header-start.html.tmpl hook template instead?

The reasoning for the patch is to fix HTML validation issues pointed out by bug 652413.

dkl
Nevermind. I see now.

[% IF template.name == 'bug/show.html.tmpl' %]

dkl
Ah, that wouldn't work though, because the edit form gets loaded by things other than show. You want to hook the special header stuff in bug/.
New patch that uses header-start.html.tmpl to add the stylesheet to style_urls list. I tried different methods to use the special header stuff mentioned before and I couldn't seem to get it to work as I thought it would. Although the way this patch is written it does work. 

dkl
Attachment #533413 - Attachment is obsolete: true
Attachment #534109 - Flags: review?(mkanat)
dkl: Add an "end" hook to bug/show-header.html.tmpl.
Depends on: 659124
New patch that relies on 'end' hook in show-header.html.tmpl to add to style_urls the path the Voting stylesheet. Depends on patch in bug 659124. Works good for me. 

dkl
Attachment #534109 - Attachment is obsolete: true
Attachment #534109 - Flags: review?(mkanat)
Attachment #534566 - Flags: review?(mkanat)
Comment on attachment 534566 [details] [diff] [review]
Patch that moves CSS style from template to style.css (v3)

Looks great! :-)
Attachment #534566 - Flags: review?(mkanat) → review+
Severity: normal → minor
Flags: approval4.2+
Flags: approval+
Thanks

trunk:
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bugzilla/trunk
modified extensions/Voting/template/en/default/hook/bug/edit-after_importance.html.tmpl
modified extensions/Voting/web/style.css
Committed revision 7826.

dkl
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Flags: approval4.2+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: