Commit 11ce192aa0f1bff2a3073c959420688cccbc58d1
Exists in
develop
Merge branch 'master' into 'develop'
Master(benjamin) See merge request !36
Showing
5 changed files
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/controllerModal.js
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,23 @@ |
1 | +<div class="focus-in"> | |
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 m-0 pb-2"></p> | |
9 | + <!-- La versión está tipeada, después habria que hacer que se haga una consulta y devuelva la versión --> | |
10 | + <p class="m-0 border-bottom border-top pt-2 pb-2">Debo Distribuidores: Versión 2.0</p> | |
11 | + <p class="mt-1">Ante un inconveniente con el sistema,</br> | |
12 | + comuniquese con nuestra <a href="http://focasoftware.com" target="__blank">mesa de ayuda</a></p> | |
13 | + <a href="http://focasoftware.com" target="__blank"> | |
14 | + <img src="img/logo-foca.png" class="w-25 rounded mx-auto d-block mt-4"> | |
15 | + </a> | |
16 | + </div> | |
17 | + <div class="modal-footer"> | |
18 | + <button class="btn btn-primary" ng-click="aceptar()" foca-focus="true">Aceptar</button> | |
19 | + </div> | |
20 | +</div> | |
21 | + | |
22 | + | |
23 | + |