Replace darker-background angular directive

This commit is contained in:
Cillian O'Ruanaidh
2025-08-22 12:54:37 +01:00
committed by Filipe
parent 7e9c5ea58b
commit 23c9410a25
7 changed files with 13 additions and 16 deletions

View File

@@ -1,11 +0,0 @@
angular.module('Darkswarm').directive "darkerBackground", ->
restrict: "A"
link: (scope, elm, attr)->
toggleClass = (value) ->
elm.closest('.page-view').toggleClass("with-darker-background", value)
toggleClass(true)
# if an OrderCycle is selected, disable darker background
scope.$watch 'order_cycle.order_cycle_id', (newvalue, oldvalue) ->
toggleClass(false) if newvalue