mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
6 lines
331 B
CoffeeScript
6 lines
331 B
CoffeeScript
angular.module("ofn.admin").directive "ofnConfirmModelChange", (ofnConfirmHandler,$timeout) ->
|
|
restrict: "A"
|
|
link: (scope, element, attrs) ->
|
|
handler = ofnConfirmHandler scope, -> scope.fetchOrders()
|
|
scope.$watch attrs.ngModel, (oldValue,newValue) ->
|
|
handler() unless oldValue == undefined || newValue == oldValue |