mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Refactor darker-background directive, extract method
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
Darkswarm.directive "darkerBackground", ->
|
||||
restrict: "A"
|
||||
link: (scope, elm, attr)->
|
||||
elm.closest('.page-view').toggleClass("with-darker-background", true)
|
||||
toggleClass = (value) ->
|
||||
elm.closest('.page-view').toggleClass("with-darker-background", value)
|
||||
|
||||
toggleClass(true)
|
||||
|
||||
Reference in New Issue
Block a user