ffffng/app/scripts/dialogs/confirmDeletionDialog.js

30 lines
747 B
JavaScript
Raw Permalink Normal View History

2016-05-16 18:27:03 +02:00
'use strict';
angular.module('ffffng')
.factory('ConfirmDeletionDialog', function ($uibModal, config) {
var ctrl = function ($scope, $uibModalInstance, node) {
$scope.node = node;
$scope.config = config;
$scope.proceed = function () {
$uibModalInstance.close();
};
$scope.cancel = function () {
$uibModalInstance.dismiss('cancel');
};
};
return {
open: function (node) {
return $uibModal.open({
controller: ctrl,
templateUrl: 'views/dialogs/confirmDeletionDialog.html',
resolve: {
node: function () { return node; }
}
});
}
};
});