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

RESOLVED FIXED in Bugzilla 4.2

Status

()

--
minor
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: dkl, Assigned: dkl)

Tracking

unspecified
Bugzilla 4.2
Dependency tree / graph
Bug Flags:
approval +

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

8 years ago
Created attachment 533413 [details] [diff] [review]
Patch that moves CSS style from template to style.css (v1)

Patch that moves the CSS style for #votes_container from the template to the style.css file instead.
Attachment #533413 - Flags: review?(mkanat)
(Assignee)

Updated

8 years ago
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-

Updated

8 years ago
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?
(Assignee)

Comment 3

8 years ago
(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
(Assignee)

Comment 4

8 years ago
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/.
(Assignee)

Comment 6

8 years ago
Created attachment 534109 [details] [diff] [review]
Patch that moves CSS style from template to style.css (v2)

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.
(Assignee)

Updated

8 years ago
Depends on: 659124
(Assignee)

Comment 8

8 years ago
Created attachment 534566 [details] [diff] [review]
Patch that moves CSS style from template to style.css (v3)

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+

Updated

8 years ago
Severity: normal → minor
Flags: approval4.2+
Flags: approval+
(Assignee)

Comment 10

8 years ago
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
Last Resolved: 8 years ago
Resolution: --- → FIXED

Updated

8 years ago
Flags: approval4.2+
You need to log in before you can comment on or make changes to this bug.