Replace disable-dynamically angular directive

This commit is contained in:
Cillian O'Ruanaidh
2025-08-22 14:20:14 +01:00
committed by Filipe
parent 23c9410a25
commit 32e3fc0175
2 changed files with 2 additions and 16 deletions

View File

@@ -1,14 +0,0 @@
# Allows disabling of link buttons via disabled attribute.
# This is normally ignored, ie the link appears disabled but is still clickable.
angular.module('Darkswarm').directive "disableDynamically", ->
restrict: 'A'
link: (scope, element, attrs) ->
element.on 'click', (e) ->
if attrs.disabled
e.preventDefault()
return
scope.$on "$destroy", ->
element.off("click")