Commit 0ef5d3052c0653add9ae829248ea101666b85525
Exists in
develop
Merge branch 'master' into 'develop'
Master(benjamin) See merge request !21
Showing
3 changed files
Show diff stats
gulpfile.js
1 | const templateCache = require('gulp-angular-templatecache'); | 1 | const templateCache = require('gulp-angular-templatecache'); |
2 | const concat = require('gulp-concat'); | 2 | const concat = require('gulp-concat'); |
3 | const htmlmin = require('gulp-htmlmin'); | 3 | const htmlmin = require('gulp-htmlmin'); |
4 | const rename = require('gulp-rename'); | 4 | const rename = require('gulp-rename'); |
5 | const uglify = require('gulp-uglify'); | 5 | const uglify = require('gulp-uglify'); |
6 | const gulp = require('gulp'); | 6 | const gulp = require('gulp'); |
7 | const pump = require('pump'); | 7 | const pump = require('pump'); |
8 | const jshint = require('gulp-jshint'); | 8 | const jshint = require('gulp-jshint'); |
9 | const replace = require('gulp-replace'); | 9 | const replace = require('gulp-replace'); |
10 | const connect = require('gulp-connect'); | 10 | const connect = require('gulp-connect'); |
11 | const clean = require('gulp-clean'); | 11 | const clean = require('gulp-clean'); |
12 | 12 | ||
13 | var paths = { | 13 | var paths = { |
14 | srcJS: 'src/js/*.js', | 14 | srcJS: 'src/js/*.js', |
15 | srcViews: 'src/views/*.html', | 15 | srcViews: 'src/views/*.html', |
16 | tmp: 'tmp', | 16 | tmp: 'tmp', |
17 | dist: 'dist/' | 17 | dist: 'dist/' |
18 | }; | 18 | }; |
19 | 19 | ||
20 | gulp.task('templates', function() { | 20 | gulp.task('templates', function() { |
21 | return pump( | 21 | return pump( |
22 | [ | 22 | [ |
23 | gulp.src(paths.srcViews), | 23 | gulp.src(paths.srcViews), |
24 | htmlmin(), | 24 | htmlmin(), |
25 | templateCache('views.js', { | 25 | templateCache('views.js', { |
26 | module: 'focaModalDomicilio', | 26 | module: 'focaModalDomicilio', |
27 | root: '' | 27 | root: '' |
28 | }), | 28 | }), |
29 | gulp.dest(paths.tmp) | 29 | gulp.dest(paths.tmp) |
30 | ] | 30 | ] |
31 | ); | 31 | ); |
32 | }); | 32 | }); |
33 | 33 | ||
34 | gulp.task('uglify', ['templates'], function() { | 34 | gulp.task('uglify', ['templates'], function() { |
35 | return pump( | 35 | return pump( |
36 | [ | 36 | [ |
37 | gulp.src([ | 37 | gulp.src([ |
38 | paths.srcJS, | 38 | paths.srcJS, |
39 | 'tmp/views.js' | 39 | 'tmp/views.js' |
40 | ]), | 40 | ]), |
41 | concat('foca-modal-domicilios.js'), | 41 | concat('foca-modal-domicilio.js'), |
42 | replace('src/views/', ''), | 42 | replace('src/views/', ''), |
43 | replace("['ui.bootstrap', 'focaDirectivas', 'focaModal']", '[]'), | 43 | replace("['ui.bootstrap', 'focaDirectivas', 'focaModal']", '[]'), |
44 | gulp.dest(paths.tmp), | 44 | gulp.dest(paths.tmp), |
45 | rename('foca-modal-domicilios.min.js'), | 45 | rename('foca-modal-domicilio.min.js'), |
46 | uglify(), | 46 | uglify(), |
47 | gulp.dest(paths.dist) | 47 | gulp.dest(paths.dist) |
48 | ] | 48 | ] |
49 | ); | 49 | ); |
50 | }); | 50 | }); |
51 | 51 | ||
52 | gulp.task('pre-commit', function() { | 52 | gulp.task('pre-commit', function() { |
53 | return pump( | 53 | return pump( |
54 | [ | 54 | [ |
55 | gulp.src(paths.srcJS), | 55 | gulp.src(paths.srcJS), |
56 | jshint('.jshintrc'), | 56 | jshint('.jshintrc'), |
57 | jshint.reporter('default'), | 57 | jshint.reporter('default'), |
58 | jshint.reporter('fail') | 58 | jshint.reporter('fail') |
59 | ] | 59 | ] |
60 | ); | 60 | ); |
61 | 61 | ||
62 | gulp.start('uglify'); | 62 | gulp.start('uglify'); |
63 | }); | 63 | }); |
64 | 64 | ||
65 | gulp.task('webserver', function() { | 65 | gulp.task('webserver', function() { |
66 | pump [ | 66 | pump [ |
67 | connect.server({port: 3000}) | 67 | connect.server({port: 3000}) |
68 | ] | 68 | ] |
69 | }); | 69 | }); |
70 | 70 | ||
71 | gulp.task('clean-post-install', function(){ | 71 | gulp.task('clean-post-install', function(){ |
72 | return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', | 72 | return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', |
73 | 'index.html'], {read: false}) | 73 | 'index.html'], {read: false}) |
74 | .pipe(clean()); | 74 | .pipe(clean()); |
75 | }); | 75 | }); |
76 | 76 | ||
77 | gulp.task('default', ['webserver']); | 77 | gulp.task('default', ['webserver']); |
78 | 78 | ||
79 | gulp.task('watch', function() { | 79 | gulp.task('watch', function() { |
80 | gulp.watch([paths.srcJS, paths.srcViews], ['uglify']) | 80 | gulp.watch([paths.srcJS, paths.srcViews], ['uglify']) |
81 | }); | 81 | }); |
82 | 82 |
package.json
1 | { | 1 | { |
2 | "name": "foca-modal-domicilio", | 2 | "name": "foca-modal-domicilio", |
3 | "version": "0.0.1", | 3 | "version": "0.0.1", |
4 | "description": "Modal para busqueda de domicilios", | 4 | "description": "Modal para busqueda de domicilios", |
5 | "scripts": { | 5 | "scripts": { |
6 | "refresh": "gulp uglify && cp tmp/foca-modal-domicilio.js ../wrapper-demo/node_modules/foca-modal-domicilio/dist/foca-modal-domicilio.min.js", | ||
6 | "test": "echo \"Error: no test specified\" && exit 1", | 7 | "test": "echo \"Error: no test specified\" && exit 1", |
7 | "gulp-pre-commit": "gulp pre-commit", | 8 | "gulp-pre-commit": "gulp pre-commit", |
8 | "compile": "gulp uglify", | 9 | "compile": "gulp uglify", |
9 | "postinstall": "npm run compile && gulp clean-post-install", | 10 | "postinstall": "npm run compile && gulp clean-post-install", |
10 | "install-dev": "npm install -D angular bootstrap font-awesome gulp gulp-angular-templatecache gulp-concat gulp-connect gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-uglify gulp-clean jasmine-core jquery jshint pre-commit pump ui-bootstrap4 && npm i -D git+ssh://git@debonline.dyndns.org:npm/foca-directivas" | 11 | "install-dev": "npm install -D angular bootstrap font-awesome gulp gulp-angular-templatecache gulp-concat gulp-connect gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-uglify gulp-clean jasmine-core jquery jshint pre-commit pump ui-bootstrap4 && npm i -D git+ssh://git@debonline.dyndns.org:npm/foca-directivas" |
11 | }, | 12 | }, |
12 | "pre-commit": [ | 13 | "pre-commit": [ |
13 | "gulp-pre-commit" | 14 | "gulp-pre-commit" |
14 | ], | 15 | ], |
15 | "repository": { | 16 | "repository": { |
16 | "type": "git", | 17 | "type": "git", |
17 | "url": "http://git.focasoftware.com/npm/foca-modal-domicilio.git" | 18 | "url": "http://git.focasoftware.com/npm/foca-modal-domicilio.git" |
18 | }, | 19 | }, |
19 | "author": "Foca Software", | 20 | "author": "Foca Software", |
20 | "license": "ISC", | 21 | "license": "ISC", |
21 | "peerDependencies": { | 22 | "peerDependencies": { |
22 | "angular": "^1.7.4", | 23 | "angular": "^1.7.4", |
23 | "bootstrap": "^4.1.3", | 24 | "bootstrap": "^4.1.3", |
24 | "font-awesome": "^4.7.0", | 25 | "font-awesome": "^4.7.0", |
25 | "ui-bootstrap4": "^3.0.4", | 26 | "ui-bootstrap4": "^3.0.4", |
26 | "gulp": "^3.9.1", | 27 | "gulp": "^3.9.1", |
27 | "gulp-angular-templatecache": "^2.2.1", | 28 | "gulp-angular-templatecache": "^2.2.1", |
28 | "gulp-concat": "^2.6.1", | 29 | "gulp-concat": "^2.6.1", |
29 | "gulp-connect": "^5.6.1", | 30 | "gulp-connect": "^5.6.1", |
30 | "gulp-htmlmin": "^5.0.1", | 31 | "gulp-htmlmin": "^5.0.1", |
31 | "gulp-rename": "^1.4.0", | 32 | "gulp-rename": "^1.4.0", |
32 | "gulp-replace": "^1.0.0", | 33 | "gulp-replace": "^1.0.0", |
33 | "gulp-uglify": "^3.0.1", | 34 | "gulp-uglify": "^3.0.1", |
34 | "jquery": "^3.3.1", | 35 | "jquery": "^3.3.1", |
35 | "pump": "^3.0.0", | 36 | "pump": "^3.0.0", |
36 | "foca-directivas": "git+ssh://git@debonline.dyndns.org:npm/foca-directivas" | 37 | "foca-directivas": "git+ssh://git@debonline.dyndns.org:npm/foca-directivas" |
37 | }, | 38 | }, |
38 | "devDependencies": { | 39 | "devDependencies": { |
39 | "angular": "^1.7.5", | 40 | "angular": "^1.7.5", |
40 | "bootstrap": "^4.1.3", | 41 | "bootstrap": "^4.1.3", |
41 | "foca-directivas": "git+ssh://git@debonline.dyndns.org:npm/foca-directivas", | 42 | "foca-directivas": "git+ssh://git@debonline.dyndns.org:npm/foca-directivas", |
42 | "font-awesome": "^4.7.0", | 43 | "font-awesome": "^4.7.0", |
43 | "gulp": "^3.9.1", | 44 | "gulp": "^3.9.1", |
44 | "gulp-angular-templatecache": "^2.2.3", | 45 | "gulp-angular-templatecache": "^2.2.3", |
45 | "gulp-clean": "^0.4.0", | 46 | "gulp-clean": "^0.4.0", |
46 | "gulp-concat": "^2.6.1", | 47 | "gulp-concat": "^2.6.1", |
47 | "gulp-connect": "^5.6.1", | 48 | "gulp-connect": "^5.6.1", |
48 | "gulp-htmlmin": "^5.0.1", | 49 | "gulp-htmlmin": "^5.0.1", |
49 | "gulp-jshint": "^2.1.0", | 50 | "gulp-jshint": "^2.1.0", |
50 | "gulp-rename": "^1.4.0", | 51 | "gulp-rename": "^1.4.0", |
51 | "gulp-replace": "^1.0.0", | 52 | "gulp-replace": "^1.0.0", |
52 | "gulp-uglify": "^3.0.1", | 53 | "gulp-uglify": "^3.0.1", |
53 | "jasmine-core": "^3.3.0", | 54 | "jasmine-core": "^3.3.0", |
54 | "jquery": "^3.3.1", | 55 | "jquery": "^3.3.1", |
55 | "jshint": "^2.9.6", | 56 | "jshint": "^2.9.6", |
56 | "pre-commit": "^1.2.2", | 57 | "pre-commit": "^1.2.2", |
57 | "pump": "^3.0.0", | 58 | "pump": "^3.0.0", |
58 | "ui-bootstrap4": "^3.0.5" | 59 | "ui-bootstrap4": "^3.0.5" |
59 | } | 60 | } |
60 | } | 61 | } |
61 | 62 |
src/views/modal-domicilio.html
1 | <div class="modal-header py-1"> | 1 | <div class="modal-header py-1"> |
2 | <div class="row w-100"> | 2 | <div class="row w-100 justify-content-between"> |
3 | <div class="col-lg-6"> | 3 | <div class="col-auto"> |
4 | <h5 class="modal-title my-1" ng-hide="ingreso">Búsqueda de Domicilios</h5> | 4 | <h5 class="modal-title my-1" ng-hide="ingreso">Búsqueda de Domicilios</h5> |
5 | <h5 class="modal-title my-1" ng-show="ingreso">Crear domicilios de descarga</h5> | 5 | <h5 class="modal-title my-1" ng-show="ingreso">Crear domicilios de descarga</h5> |
6 | </div> | 6 | </div> |
7 | <div class="input-group col-lg-6 pr-0 my-2"> | 7 | <div class="col-auto pr-0 my-2"> |
8 | <button | 8 | <button |
9 | class="btn btn-outline-debo mr-2" | 9 | class="btn btn-outline-debo mr-2" |
10 | ng-click="ingreso = true" | 10 | ng-click="ingreso = true" |
11 | ng-show="!ingreso" | 11 | ng-show="!ingreso" |
12 | title="Nuevo"> | 12 | title="Nuevo"> |
13 | <i class="fa fa-plus" aria-hidden="true"></i> | 13 | <i class="fa fa-plus" aria-hidden="true"></i> |
14 | </button> | 14 | </button> |
15 | <input | ||
16 | type="text" | ||
17 | class="form-control form-control-sm" | ||
18 | id="search" | ||
19 | placeholder="Búsqueda" | ||
20 | ng-model="filters" | ||
21 | ng-change="search()" | ||
22 | ng-keydown="busquedaDown($event.keyCode)" | ||
23 | ng-keypress="busquedaPress($event.keyCode)" | ||
24 | foca-focus="selectedDomicilio == -1" | ||
25 | ng-focus="selectedDomicilio = -1" | ||
26 | teclado-virtual | ||
27 | > | ||
28 | <div class="input-group-append"> | ||
29 | <button | ||
30 | ladda="searchLoading" | ||
31 | class="btn btn-outline-secondary" | ||
32 | type="button" | ||
33 | ng-click="busquedaPress(13)" | ||
34 | > | ||
35 | <i class="fa fa-search" aria-hidden="true"></i> | ||
36 | </button> | ||
37 | </div> | ||
38 | </div> | 15 | </div> |
39 | </div> | 16 | </div> |
40 | </div> | 17 | </div> |
41 | <div class="modal-body" id="modal-body"> | 18 | <div class="modal-body" id="modal-body"> |
42 | 19 | ||
43 | <div ng-show="!primerBusqueda"> | 20 | <div ng-show="!primerBusqueda"> |
44 | Debe realizar una primer búsqueda. | 21 | Debe realizar una primer búsqueda. |
45 | </div> | 22 | </div> |
46 | 23 | ||
47 | <div ng-show="!ingreso"> | 24 | <div ng-show="!ingreso"> |
48 | <table ng-show="!ingreso" class="table table-striped table-sm"> | 25 | <table ng-show="!ingreso" class="table table-striped table-sm"> |
49 | <thead> | 26 | <thead> |
50 | <tr> | 27 | <tr> |
51 | <th>Titulo</th> | 28 | <th>Titulo</th> |
52 | <th>Calle</th> | 29 | <th>Calle</th> |
53 | <th>Localidad</th> | 30 | <th>Localidad</th> |
54 | <th>Provincia</th> | 31 | <th>Provincia</th> |
55 | <th></th> | 32 | <th></th> |
56 | <th></th> | 33 | <th></th> |
57 | </tr> | 34 | </tr> |
58 | </thead> | 35 | </thead> |
59 | <tbody> | 36 | <tbody> |
60 | <tr ng-show="currentPageDomicilios.length == 0 && primerBusqueda"> | 37 | <tr ng-show="currentPageDomicilios.length == 0 && primerBusqueda"> |
61 | <td colspan="5"> | 38 | <td colspan="5"> |
62 | No se encontraron resultados. | 39 | No se encontraron resultados. |
63 | </td> | 40 | </td> |
64 | </tr> | 41 | </tr> |
65 | <tr class="selectable" | 42 | <tr class="selectable" |
66 | ng-repeat="(key,domicilio) in currentPageDomicilios"> | 43 | ng-repeat="(key,domicilio) in currentPageDomicilios"> |
67 | <td | 44 | <td |
68 | ng-bind="domicilio.titulo" | 45 | ng-bind="domicilio.titulo" |
69 | ng-click="select(domicilio)" | 46 | ng-click="select(domicilio)" |
70 | ></td> | 47 | ></td> |
71 | <td | 48 | <td |
72 | ng-bind="domicilio.Calle + ' ' + domicilio.Numero" | 49 | ng-bind="domicilio.Calle + ' ' + domicilio.Numero" |
73 | ng-click="select(domicilio)" | 50 | ng-click="select(domicilio)" |
74 | ></td> | 51 | ></td> |
75 | <td | 52 | <td |
76 | ng-bind="domicilio.Localidad" | 53 | ng-bind="domicilio.Localidad" |
77 | ng-click="select(domicilio)" | 54 | ng-click="select(domicilio)" |
78 | ></td> | 55 | ></td> |
79 | <td | 56 | <td |
80 | ng-bind="domicilio.Provincia" | 57 | ng-bind="domicilio.Provincia" |
81 | ng-click="select(domicilio)" | 58 | ng-click="select(domicilio)" |
82 | ></td> | 59 | ></td> |
83 | <td> | 60 | <td> |
84 | <button | 61 | <button |
85 | type="button" | 62 | type="button" |
86 | class="btn btn-sm p-1 float-right btn-secondary" | 63 | class="btn btn-sm p-1 float-right btn-secondary" |
87 | ng-click="verPuntosDescarga(key)" | 64 | ng-click="verPuntosDescarga(key)" |
88 | title="Puntos de descarga" | 65 | title="Puntos de descarga" |
89 | > | 66 | > |
90 | <small>PD</small> | 67 | <small>PD</small> |
91 | </button> | 68 | </button> |
92 | </td> | 69 | </td> |
93 | <td> | 70 | <td> |
94 | <button | 71 | <button |
95 | type="button" | 72 | type="button" |
96 | class="btn btn-sm p-1 float-right" | 73 | class="btn btn-sm p-1 float-right" |
97 | ng-class="{ | 74 | ng-class="{ |
98 | 'btn-secondary': selectedDomicilio != key + 1, | 75 | 'btn-secondary': selectedDomicilio != key + 1, |
99 | 'btn-primary': selectedDomicilio == key + 1 | 76 | 'btn-primary': selectedDomicilio == key + 1 |
100 | }" | 77 | }" |
101 | foca-focus="selectedDomicilio == {{key + 1}}" | 78 | foca-focus="selectedDomicilio == {{key + 1}}" |
102 | ng-keydown="itemDomicilio($event.keyCode)" | 79 | ng-keydown="itemDomicilio($event.keyCode)" |
103 | ng-click="select(domicilio)" | 80 | ng-click="select(domicilio)" |
104 | title="Seleccionar" | 81 | title="Seleccionar" |
105 | > | 82 | > |
106 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | 83 | <i class="fa fa-circle-thin" aria-hidden="true"></i> |
107 | </button> | 84 | </button> |
108 | </td> | 85 | </td> |
109 | </tr> | 86 | </tr> |
110 | </tbody> | 87 | </tbody> |
111 | </table> | 88 | </table> |
112 | </div> | 89 | </div> |
113 | <form name="formDomicilio" ng-show="ingreso"> | 90 | <form name="formDomicilio" ng-show="ingreso"> |
114 | <input | 91 | <input |
115 | type="hidden" | 92 | type="hidden" |
116 | ng-model="domicilio.latitud" | 93 | ng-model="domicilio.latitud" |
117 | ng-required="true"> | 94 | ng-required="true"> |
118 | <input | 95 | <input |
119 | type="hidden" | 96 | type="hidden" |
120 | ng-model="domicilio.longitud" | 97 | ng-model="domicilio.longitud" |
121 | ng-required="true"> | 98 | ng-required="true"> |
122 | <div class="row"> | 99 | <div class="row"> |
123 | <div class="col-4"> | 100 | <div class="col-4"> |
124 | <label>Tipo</label> | 101 | <label>Tipo</label> |
125 | <select | 102 | <select |
126 | class="form-control" | 103 | class="form-control" |
127 | ng-disabled="true" | 104 | ng-disabled="true" |
128 | > | 105 | > |
129 | <option ng-value="2">Entrega</option> | 106 | <option ng-value="2">Entrega</option> |
130 | </select> | 107 | </select> |
131 | </div> | 108 | </div> |
132 | <div class="col-8"> | 109 | <div class="col-8"> |
133 | <label>Titulo</label> | 110 | <label>Titulo</label> |
134 | <input | 111 | <input |
135 | type="text" | 112 | type="text" |
136 | foca-focus="ingreso" | 113 | foca-focus="ingreso" |
137 | class="form-control" | 114 | class="form-control" |
138 | ng-model="domicilio.titulo" | 115 | ng-model="domicilio.titulo" |
139 | placeholder="Ingrese título" | 116 | placeholder="Ingrese título" |
140 | ng-required="true" | 117 | ng-required="true" |
141 | ng-keypress="next($event.keyCode)" | 118 | ng-keypress="next($event.keyCode)" |
142 | ng-focus="focused = 1" | 119 | ng-focus="focused = 1" |
143 | foca-focus="focused == 1" | 120 | foca-focus="focused == 1" |
144 | teclado-virtual | 121 | teclado-virtual |
145 | /> | 122 | /> |
146 | </div> | 123 | </div> |
147 | <div class="col-9"> | 124 | <div class="col-9"> |
148 | <label>Calle</label> | 125 | <label>Calle</label> |
149 | <input | 126 | <input |
150 | type="text" | 127 | type="text" |
151 | class="form-control" | 128 | class="form-control" |
152 | ng-model="domicilio.calle" | 129 | ng-model="domicilio.calle" |
153 | placeholder="Ingrese calle" | 130 | placeholder="Ingrese calle" |
154 | ng-required="true" | 131 | ng-required="true" |
155 | ng-keypress="next($event.keyCode)" | 132 | ng-keypress="next($event.keyCode)" |
156 | ng-focus="focused = 2" | 133 | ng-focus="focused = 2" |
157 | foca-focus="focused == 2" | 134 | foca-focus="focused == 2" |
158 | teclado-virtual | 135 | teclado-virtual |
159 | /> | 136 | /> |
160 | </div> | 137 | </div> |
161 | <div class="col-3"> | 138 | <div class="col-3"> |
162 | <label>Nº</label> | 139 | <label>Nº</label> |
163 | <input | 140 | <input |
164 | type="text" | 141 | type="text" |
165 | class="form-control" | 142 | class="form-control" |
166 | ng-model="domicilio.numeroCalle" | 143 | ng-model="domicilio.numeroCalle" |
167 | placeholder="Ingrese Numero" | 144 | placeholder="Ingrese Numero" |
168 | ng-required="true" | 145 | ng-required="true" |
169 | ng-keypress="next($event.keyCode)" | 146 | ng-keypress="next($event.keyCode)" |
170 | ng-focus="focused = 3" | 147 | ng-focus="focused = 3" |
171 | foca-focus="focused == 3" | 148 | foca-focus="focused == 3" |
172 | teclado-virtual | 149 | teclado-virtual |
173 | /> | 150 | /> |
174 | </div> | 151 | </div> |
175 | <div class="col-6"> | 152 | <div class="col-6"> |
176 | <label>Localidad</label> | 153 | <label>Localidad</label> |
177 | <input | 154 | <input |
178 | type="text" | 155 | type="text" |
179 | class="form-control" | 156 | class="form-control" |
180 | ng-model="domicilio.localidad" | 157 | ng-model="domicilio.localidad" |
181 | placeholder="Ingrese localidad" | 158 | placeholder="Ingrese localidad" |
182 | ng-required="true" | 159 | ng-required="true" |
183 | ng-keypress="next($event.keyCode)" | 160 | ng-keypress="next($event.keyCode)" |
184 | ng-focus="focused = 4" | 161 | ng-focus="focused = 4" |
185 | foca-focus="focused == 4" | 162 | foca-focus="focused == 4" |
186 | teclado-virtual | 163 | teclado-virtual |
187 | /> | 164 | /> |
188 | </div> | 165 | </div> |
189 | <div class="col-6"> | 166 | <div class="col-6"> |
190 | <label>Provincia</label> | 167 | <label>Provincia</label> |
191 | <input | 168 | <input |
192 | type="text" | 169 | type="text" |
193 | class="form-control" | 170 | class="form-control" |
194 | ng-model="domicilio.provincia" | 171 | ng-model="domicilio.provincia" |
195 | placeholder="Ingrese provincia" | 172 | placeholder="Ingrese provincia" |
196 | ng-required="true" | 173 | ng-required="true" |
197 | ng-keypress="next($event.keyCode)" | 174 | ng-keypress="next($event.keyCode)" |
198 | ng-focus="focused = 5" | 175 | ng-focus="focused = 5" |
199 | foca-focus="focused == 5" | 176 | foca-focus="focused == 5" |
200 | teclado-virtual | 177 | teclado-virtual |
201 | /> | 178 | /> |
202 | </div> | 179 | </div> |
203 | </div> | 180 | </div> |
204 | <div class="row mt-3"> | 181 | <div class="row mt-3"> |
205 | <div class="col-12"> | 182 | <div class="col-12"> |
206 | <button | 183 | <button |
207 | type="button" | 184 | type="button" |
208 | class="btn btn-outline-debo float-right ml-3" | 185 | class="btn btn-outline-debo float-right ml-3" |
209 | ng-click="localizarDomicilio()">Buscar</button> | 186 | ng-click="localizarDomicilio()">Buscar</button> |
210 | <button | 187 | <button |
211 | type="button" | 188 | type="button" |
212 | class="btn btn-outline-debo float-right" | 189 | class="btn btn-outline-debo float-right" |
213 | ng-disabled="!domicilio.calle || !domicilio.numeroCalle || !domicilio.localidad || !domicilio.provincia" | 190 | ng-disabled="!domicilio.calle || !domicilio.numeroCalle || !domicilio.localidad || !domicilio.provincia" |
214 | ng-click="localizarDomicilio(true)">Localizar</button> | 191 | ng-click="localizarDomicilio(true)">Localizar</button> |
215 | </div> | 192 | </div> |
216 | </div> | 193 | </div> |
217 | </form> | 194 | </form> |
218 | </div> | 195 | </div> |
219 | <div class="modal-footer"> | 196 | <div class="modal-footer"> |
220 | <nav ng-show="currentPageDomicilios.length > 0 && !ingreso" class="mr-auto"> | 197 | <nav ng-show="currentPageDomicilios.length > 0 && !ingreso" class="mr-auto"> |
221 | <ul class="pagination pagination-sm mb-0 justify-content-end"> | 198 | <ul class="pagination pagination-sm mb-0 justify-content-end"> |
222 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 199 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
223 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 200 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> |
224 | <span aria-hidden="true">«</span> | 201 | <span aria-hidden="true">«</span> |
225 | <span class="sr-only">Anterior</span> | 202 | <span class="sr-only">Anterior</span> |
226 | </a> | 203 | </a> |
227 | </li> | 204 | </li> |
228 | <li | 205 | <li |
229 | class="page-item" | 206 | class="page-item" |
230 | ng-repeat="pagina in paginas" | 207 | ng-repeat="pagina in paginas" |
231 | ng-class="{'active': pagina == currentPage}" | 208 | ng-class="{'active': pagina == currentPage}" |
232 | > | 209 | > |
233 | <a | 210 | <a |
234 | class="page-link" | 211 | class="page-link" |
235 | href="javascript:void();" | 212 | href="javascript:void();" |
236 | ng-click="selectPage(pagina)" | 213 | ng-click="selectPage(pagina)" |
237 | ng-bind="pagina" | 214 | ng-bind="pagina" |
238 | ></a> | 215 | ></a> |
239 | </li> | 216 | </li> |
240 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | 217 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> |
241 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> | 218 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> |
242 | <span aria-hidden="true">»</span> | 219 | <span aria-hidden="true">»</span> |
243 | <span class="sr-only">Siguiente</span> | 220 | <span class="sr-only">Siguiente</span> |
244 | </a> | 221 | </a> |
245 | </li> | 222 | </li> |
246 | </ul> | 223 | </ul> |
247 | </nav> | 224 | </nav> |
248 | <button | 225 | <button |
249 | ng-show="!ingreso" | 226 | ng-show="!ingreso" |
250 | class="btn btn-sm btn-secondary" | 227 | class="btn btn-sm btn-secondary" |
251 | type="button" | 228 | type="button" |
252 | ng-click="cancel()" | 229 | ng-click="cancel()" |
253 | >Volver | 230 | >Volver |
254 | </button> | 231 | </button> |
255 | <button | 232 | <button |
256 | ng-show="ingreso" | 233 | ng-show="ingreso" |
257 | class="btn btn-secondary btn-sm" | 234 | class="btn btn-secondary btn-sm" |
258 | type="button" | 235 | type="button" |
259 | ng-click="ingreso = !ingreso; domicilio = {}; contactos = [{}]" | 236 | ng-click="ingreso = !ingreso; domicilio = {}; contactos = [{}]" |
260 | >Cancelar | 237 | >Cancelar |
261 | </button> | 238 | </button> |
262 | <button | 239 | <button |
263 | ng-show="ingreso" | 240 | ng-show="ingreso" |
264 | class="btn btn-sm btn-primary" | 241 | class="btn btn-sm btn-primary" |
265 | type="button" | 242 | type="button" |
266 | ng-click="agregarDomicilio()" | 243 | ng-click="agregarDomicilio()" |
267 | >Agregar domicilio | 244 | >Agregar domicilio |
268 | </button> | 245 | </button> |
269 | </div> | 246 | </div> |
270 | 247 |