mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Delete unused Angular service ofnConfirmHandler
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
angular.module("ofn.admin").factory "ofnConfirmHandler", (pendingChanges, $compile, $q) ->
|
||||
return (scope, callback) ->
|
||||
template = "<div id='dialog-div' style='padding: 10px'><h6>" + t('js.services.unsaved_changes_message') + "</h6></div>"
|
||||
dialogDiv = $compile(template)(scope)
|
||||
return ->
|
||||
if pendingChanges.changeCount(pendingChanges.pendingChanges) > 0
|
||||
dialogDiv.dialog
|
||||
dialogClass: "no-close"
|
||||
resizable: false
|
||||
height: 140
|
||||
modal: true
|
||||
buttons:
|
||||
"SAVE": ->
|
||||
dialogDiv = $(this)
|
||||
$q.all(pendingChanges.submitAll()).then ->
|
||||
callback()
|
||||
dialogDiv.dialog "close"
|
||||
"IGNORE": ->
|
||||
callback()
|
||||
$(this).dialog "close"
|
||||
scope.$apply()
|
||||
dialogDiv.dialog "open"
|
||||
else
|
||||
callback()
|
||||
Reference in New Issue
Block a user