mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-01 21:47:16 +00:00
15 lines
479 B
CoffeeScript
15 lines
479 B
CoffeeScript
Darkswarm.directive "ofnPageAlert", ($timeout) ->
|
|
restrict: 'A'
|
|
scope: true
|
|
link: (scope, elem, attrs) ->
|
|
container_elems = $(".off-canvas-wrap .inner-wrap, .off-canvas-wrap .inner-wrap .fixed, .page-alert")
|
|
|
|
# Wait a moment after page load before showing the alert. Otherwise we often miss the
|
|
# start of the animation.
|
|
$timeout ->
|
|
container_elems.addClass("move-down")
|
|
, 1000
|
|
|
|
scope.close = ->
|
|
container_elems.removeClass("move-down")
|