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