amo2009 layout should handle cssAdd array

RESOLVED FIXED in 5.0.6

Status

addons.mozilla.org Graveyard
Public Pages
RESOLVED FIXED
9 years ago
3 years ago

People

(Reporter: wenzel, Assigned: wenzel)

Tracking

unspecified
5.0.6

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
The old layout used to handle a "cssAdd" array containing additional CSS files for the view to apply. This is missing in the new amo2009 layout file.
(Assignee)

Comment 1

9 years ago
Created attachment 378064 [details] [diff] [review]
Patch, rev. 1

This should do the trick.
Attachment #378064 - Flags: review?(lorchard)
Attachment #378064 - Flags: review?(lorchard) → review+
Comment on attachment 378064 [details] [diff] [review]
Patch, rev. 1

Looks good to me.

One thing about this view variable, since I just noticed how it's being used: It's getting set in controllers, when it really should be set in the view template that requires it.

I'd suggest setting it in views like so:

$this->viewVars['cssAdd'] = array('foo','bar','baz');

That would get picked up by the layout once the wrapped view is executed.  Probably not worth changing everywhere, but it would keep view/controller concerns separate.
(Assignee)

Comment 3

9 years ago
(In reply to comment #2)
> That would get picked up by the layout once the wrapped view is executed. 
> Probably not worth changing everywhere, but it would keep view/controller
> concerns separate.

Using MVC the way it's supposed to? Now you are just being silly ;)
(Assignee)

Comment 4

9 years ago
r25851.

QA: This fix is transparent to you.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Keywords: push-needed
Resolution: --- → FIXED
removing "push-needed" from 105 AMO 5.0.6 bugs; filter on "I hate stephend!"
Keywords: push-needed
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.