Commit 0f3656aa5d4e21c7de1241e73ab1a1deb1068e61
1 parent
a2da28e6e5
Exists in
develop
Creo modalInfo para el modal de informacion
Showing
4 changed files
with
46 additions
and
0 deletions
Show diff stats
package.json
... | ... | @@ -4,6 +4,7 @@ |
4 | 4 | "description": "Modales de foca", |
5 | 5 | "main": "index.js", |
6 | 6 | "scripts": { |
7 | + "refresh": "gulp uglify && cp tmp/foca-modal.js ../wrapper-demo/node_modules/foca-modal/dist/foca-modal.min.js", | |
7 | 8 | "test": "echo \"Error: no test specified\" && exit 1", |
8 | 9 | "gulp-pre-commit": "gulp pre-commit", |
9 | 10 | "compile": "gulp uglify", |
src/js/controller.js
... | ... | @@ -11,6 +11,15 @@ angular.module('focaModal') |
11 | 11 | }; |
12 | 12 | } |
13 | 13 | ]) |
14 | +.controller('focaModalInfoController', [ | |
15 | + '$uibModalInstance', '$scope', 'textoModal', | |
16 | + function($uibModalInstance, $scope, textoModal) { | |
17 | + $scope.textoModal = textoModal; | |
18 | + $scope.aceptar = function() { | |
19 | + $uibModalInstance.close(true); | |
20 | + }; | |
21 | + } | |
22 | +]) | |
14 | 23 | .controller('focaModalAlertController', [ |
15 | 24 | '$uibModalInstance', '$scope', 'textoModal', |
16 | 25 | function($uibModalInstance, $scope, textoModal) { |
src/js/service.js
... | ... | @@ -17,6 +17,20 @@ angular.module('focaModal') |
17 | 17 | } |
18 | 18 | ); |
19 | 19 | }, |
20 | + info: function(textoModal){ | |
21 | + return $uibModal.open({ | |
22 | + templateUrl: 'modal-info.html', | |
23 | + controller: 'focaModalInfoController', | |
24 | + animation: false, | |
25 | + backdrop: false, | |
26 | + resolve: { textoModal: function() { return textoModal; } } | |
27 | + }) | |
28 | + .result.then( | |
29 | + function(resultado) { | |
30 | + return resultado; | |
31 | + } | |
32 | + ); | |
33 | + }, | |
20 | 34 | alert: function(textoModal) { |
21 | 35 | return $uibModal.open({ |
22 | 36 | templateUrl: 'modal-alert.html', |
src/views/modal-info.html
... | ... | @@ -0,0 +1,22 @@ |
1 | +<div> | |
2 | + | |
3 | + <div class="modal-header"> | |
4 | + <h4>Información</h4> | |
5 | + </div> | |
6 | + | |
7 | + <div class="modal-body"> | |
8 | + <p ng-bind="textoModal" class="line-break"> | |
9 | + </p> | |
10 | + <!-- La versión está tipeada, después habria que hacer que se haga una consulta y devuelva la versión --> | |
11 | + <p class="mt-1">Debo Distribuidores: Versión 2.0</p> | |
12 | + <p class="mt-1">Ante un inconveniente con el sistema,</br> | |
13 | + comuniquese con nuestra <a href="http://focasoftware.com" target="__blank">mesa de ayuda</a></p> | |
14 | + <a href="http://focasoftware.com" target="__blank"> | |
15 | + <img src="img/logo-foca.png" class="w-25 rounded mx-auto d-block mt-4"> | |
16 | + </a> | |
17 | + </div> | |
18 | + <div class="modal-footer"> | |
19 | + <button class="btn btn-primary" ng-click="aceptar()" foca-focus="true">Aceptar</button> | |
20 | + </div> | |
21 | +</div> | |
22 | + |