Ignore select-all events for disabled check-boxes

This commit is contained in:
Shane Kilkelly 2017-12-14 16:18:01 +00:00
parent 603252f3b4
commit b6d6ac8304

View file

@ -49,18 +49,21 @@ define [
selectAllListController.clearSelectAllState()
scope.$on "select-all:select", () ->
return if element.prop('disabled')
ignoreChanges = true
scope.$apply () ->
scope.ngModel = true
ignoreChanges = false
scope.$on "select-all:deselect", () ->
return if element.prop('disabled')
ignoreChanges = true
scope.$apply () ->
scope.ngModel = false
ignoreChanges = false
scope.$on "select-all:row-clicked", () ->
return if element.prop('disabled')
ignoreChanges = true
scope.$apply () ->
scope.ngModel = !scope.ngModel
@ -75,4 +78,4 @@ define [
link: (scope, element, attrs) ->
element.on "click", (e) ->
scope.$broadcast "select-all:row-clicked"
}
}