mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-03 22:06:07 +00:00
Trigger a digest cycle when opening modals with dynamic content
This commit is contained in:
@@ -10,12 +10,15 @@ angular.module("admin.utils").factory 'ConfirmDialog', ($rootScope, $q, $compile
|
||||
template = $compile($templateCache.get('admin/confirm_dialog.html'))(scope)
|
||||
template.dialog(DialogDefaults)
|
||||
template.dialog('open')
|
||||
$rootScope.$evalAsync()
|
||||
scope.confirm = ->
|
||||
deferred.resolve()
|
||||
template.dialog('close')
|
||||
$rootScope.$evalAsync()
|
||||
null
|
||||
scope.close = ->
|
||||
deferred.reject()
|
||||
template.dialog('close')
|
||||
$rootScope.$evalAsync()
|
||||
null
|
||||
deferred.promise
|
||||
|
||||
@@ -15,8 +15,10 @@ angular.module("admin.utils").factory 'InfoDialog', ($rootScope, $q, $compile, $
|
||||
template = $compile($templateCache.get(templateUrl))(scope)
|
||||
template.dialog(DialogDefaults)
|
||||
template.dialog('open')
|
||||
$rootScope.$evalAsync()
|
||||
scope.close = ->
|
||||
deferred.resolve()
|
||||
template.dialog('close')
|
||||
$rootScope.$evalAsync()
|
||||
null
|
||||
deferred.promise
|
||||
|
||||
Reference in New Issue
Block a user