ffffng/app/scripts/dialogs/outsideOfCommunityDialog.js

30 lines
765 B
JavaScript
Raw Permalink Normal View History

'use strict';
angular.module('ffffng')
2016-05-16 13:33:49 +02:00
.factory('OutsideOfCommunityDialog', function ($uibModal, config) {
var ctrl = function ($scope, $uibModalInstance, action) {
$scope.action = action;
$scope.config = config;
$scope.proceed = function () {
2016-05-16 13:33:49 +02:00
$uibModalInstance.close();
};
$scope.cancel = function () {
2016-05-16 13:33:49 +02:00
$uibModalInstance.dismiss('cancel');
};
};
return {
open: function (action) {
2016-05-16 13:33:49 +02:00
return $uibModal.open({
controller: ctrl,
templateUrl: 'views/dialogs/outsideOfCommunityDialog.html',
resolve: {
action: function () { return action; }
}
});
}
};
});