controller.js
1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
angular.module('focaModal')
.controller('focaModalConfirmController', [
'$uibModalInstance', '$scope', 'textoModal',
function($uibModalInstance, $scope, textoModal) {
$scope.textoModal = textoModal;
$scope.cancelar = function() {
$uibModalInstance.dismiss(false);
};
$scope.aceptar = function() {
$uibModalInstance.close(true);
};
}
])
.controller('focaModalAlertController', [
'$uibModalInstance', '$scope', 'textoModal',
function($uibModalInstance, $scope, textoModal) {
$scope.textoModal = textoModal;
$scope.aceptar = function() {
$uibModalInstance.close(true);
};
}
])
.controller('focaModalFechaController', [
'$uibModalInstance', '$scope', 'titulo',
function($uibModalInstance, $scope, titulo) {
$scope.titulo = titulo;
$scope.fecha = new Date();
$scope.cancelar = function() {
$uibModalInstance.dismiss();
};
$scope.aceptar = function() {
$uibModalInstance.close($scope.fecha);
};
}
])
.controller('focaModalPromptController', [
'$uibModalInstance', '$scope', 'titulo', 'initValue', 'textarea', 'readonly',
function($uibModalInstance, $scope, titulo, initValue, textarea, readonly) {
$scope.readonly = readonly;
$scope.textarea = textarea;
$scope.titulo = titulo;
$scope.value = initValue;
$scope.cancelar = function() {
$uibModalInstance.dismiss();
};
$scope.aceptar = function() {
$uibModalInstance.close($scope.value);
};
}
]);