Commit e20684d752a747e2c31121fb60e9938e201f9800
Exists in
master
Merge branch 'master' into 'master'
buscador en header, paginado en footer, cambio icons See merge request !1
Showing
2 changed files
Show diff stats
package.json
| 1 | { | 1 | { |
| 2 | "name": "foca-modal-vendedores", | 2 | "name": "foca-modal-vendedores", |
| 3 | "version": "0.0.1", | 3 | "version": "0.0.1", |
| 4 | "description": "Modal para seleccionar vendedores", | 4 | "description": "Modal para seleccionar vendedores", |
| 5 | "main": "index.js", | 5 | "main": "index.js", |
| 6 | "scripts": { | 6 | "scripts": { |
| 7 | "test": "echo \"Error: no test specified\" && exit 1", | 7 | "test": "echo \"Error: no test specified\" && exit 1", |
| 8 | "gulp-pre-commit": "gulp pre-commit", | 8 | "gulp-pre-commit": "gulp pre-commit", |
| 9 | "compile": "gulp uglify", | 9 | "compile": "gulp uglify", |
| 10 | "postinstall": "npm run compile && gulp clean-post-install", | 10 | "postinstall": "npm run compile && gulp clean-post-install", |
| 11 | "install-dev": "npm install -D angular angular-ladda ladda@1.0.6 bootstrap font-awesome gulp gulp-angular-templatecache gulp-concat gulp-connect gulp-htmlmin gulp-jshint gulp-rename gulp-clean gulp-replace gulp-uglify jasmine-core jquery jshint pre-commit pump ui-bootstrap4 && npm i -D git+https://debo.suite.repo/modulos-npm/foca-directivas" | 11 | "install-dev": "npm install -D angular angular-ladda ladda@1.0.6 bootstrap font-awesome gulp gulp-angular-templatecache gulp-concat gulp-connect gulp-htmlmin gulp-jshint gulp-rename gulp-clean gulp-replace gulp-uglify jasmine-core jquery jshint pre-commit pump ui-bootstrap4 && npm i -D git+http://git.focasoftware.com/npm/foca-directivas.git" |
| 12 | }, | 12 | }, |
| 13 | "pre-commit": [ | 13 | "pre-commit": [ |
| 14 | "gulp-pre-commit" | 14 | "gulp-pre-commit" |
| 15 | ], | 15 | ], |
| 16 | "repository": { | 16 | "repository": { |
| 17 | "type": "git", | 17 | "type": "git", |
| 18 | "url": "https://debo.suite.repo/modulos-npm/foca-modal-vendedores" | 18 | "url": "https://debo.suite.repo/modulos-npm/foca-modal-vendedores" |
| 19 | }, | 19 | }, |
| 20 | "author": "Foca Software", | 20 | "author": "Foca Software", |
| 21 | "license": "ISC", | 21 | "license": "ISC", |
| 22 | "peerDependencies": { | 22 | "peerDependencies": { |
| 23 | "angular": "^1.7.4", | 23 | "angular": "^1.7.4", |
| 24 | "bootstrap": "^4.1.3", | 24 | "bootstrap": "^4.1.3", |
| 25 | "font-awesome": "^4.7.0", | 25 | "font-awesome": "^4.7.0", |
| 26 | "ui-bootstrap4": "^3.0.4", | 26 | "ui-bootstrap4": "^3.0.4", |
| 27 | "gulp": "^3.9.1", | 27 | "gulp": "^3.9.1", |
| 28 | "gulp-angular-templatecache": "^2.2.1", | 28 | "gulp-angular-templatecache": "^2.2.1", |
| 29 | "gulp-concat": "^2.6.1", | 29 | "gulp-concat": "^2.6.1", |
| 30 | "gulp-connect": "^5.6.1", | 30 | "gulp-connect": "^5.6.1", |
| 31 | "gulp-htmlmin": "^5.0.1", | 31 | "gulp-htmlmin": "^5.0.1", |
| 32 | "gulp-rename": "^1.4.0", | 32 | "gulp-rename": "^1.4.0", |
| 33 | "gulp-replace": "^1.0.0", | 33 | "gulp-replace": "^1.0.0", |
| 34 | "gulp-uglify": "^3.0.1", | 34 | "gulp-uglify": "^3.0.1", |
| 35 | "jquery": "^3.3.1", | 35 | "jquery": "^3.3.1", |
| 36 | "pump": "^3.0.0", | 36 | "pump": "^3.0.0", |
| 37 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas" | 37 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas" |
| 38 | }, | 38 | }, |
| 39 | "devDependencies": { | 39 | "devDependencies": { |
| 40 | "angular": "^1.7.5", | 40 | "angular": "1.7.5", |
| 41 | "angular-ladda": "^0.4.3", | 41 | "angular-ladda": "0.4.3", |
| 42 | "bootstrap": "^4.1.3", | 42 | "bootstrap": "4.1.3", |
| 43 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas", | 43 | "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas", |
| 44 | "font-awesome": "^4.7.0", | 44 | "font-awesome": "4.7.0", |
| 45 | "gulp": "^3.9.1", | 45 | "gulp": "3.9.1", |
| 46 | "gulp-angular-templatecache": "^2.2.3", | 46 | "gulp-angular-templatecache": "2.2.5", |
| 47 | "gulp-clean": "^0.4.0", | 47 | "gulp-clean": "0.4.0", |
| 48 | "gulp-concat": "^2.6.1", | 48 | "gulp-concat": "2.6.1", |
| 49 | "gulp-connect": "^5.6.1", | 49 | "gulp-connect": "5.6.1", |
| 50 | "gulp-htmlmin": "^5.0.1", | 50 | "gulp-htmlmin": "5.0.1", |
| 51 | "gulp-jshint": "^2.1.0", | 51 | "gulp-jshint": "2.1.0", |
| 52 | "gulp-rename": "^1.4.0", | 52 | "gulp-rename": "1.4.0", |
| 53 | "gulp-replace": "^1.0.0", | 53 | "gulp-replace": "1.0.0", |
| 54 | "gulp-uglify": "^3.0.1", | 54 | "gulp-uglify": "3.0.1", |
| 55 | "jasmine-core": "^3.3.0", | 55 | "jasmine-core": "3.3.0", |
| 56 | "jquery": "^3.3.1", | 56 | "jquery": "3.3.1", |
| 57 | "jshint": "^2.9.6", | 57 | "jshint": "2.9.6", |
| 58 | "ladda": "1.0.6", | 58 | "ladda": "1.0.6", |
| 59 | "pre-commit": "^1.2.2", | 59 | "pre-commit": "1.2.2", |
| 60 | "pump": "^3.0.0", | 60 | "pump": "3.0.0", |
| 61 | "ui-bootstrap4": "^3.0.5" | 61 | "ui-bootstrap4": "3.0.5" |
| 62 | } | 62 | } |
| 63 | } | 63 | } |
| 64 | 64 |
src/views/modal-vendedores.html
| 1 | <div class="modal-header"> | 1 | <div class="modal-header py-1"> |
| 2 | <h5 class="modal-title my-1">Búsqueda de vendedores</h5> | 2 | <div class="row w-100"> |
| 3 | </div> | 3 | <div class="col-lg-6 col-xs-12"> |
| 4 | <div class="modal-body" id="modal-body"> | 4 | <h5 class="modal-title my-1">Búsqueda de vendedores</h5> |
| 5 | <div class="input-group"> | 5 | </div> |
| 6 | <input | 6 | <div class="input-group col-lg-6 col-xs-12 pr-0 my-2"> |
| 7 | ladda="searchLoading" | 7 | <input |
| 8 | type="text" | ||
| 9 | class="form-control form-control-sm" | ||
| 10 | placeholder="Busqueda" | ||
| 11 | ng-model="filters" | ||
| 12 | ng-change="search()" | ||
| 13 | ng-keydown="busquedaDown($event.keyCode)" | ||
| 14 | ng-keypress="busquedaPress($event.keyCode)" | ||
| 15 | foca-focus="selectedVendedor == -1" | ||
| 16 | ng-focus="selectedVendedor = -1" | ||
| 17 | teclado-virtual | ||
| 18 | > | ||
| 19 | <div class="input-group-append"> | ||
| 20 | <button | ||
| 21 | ladda="searchLoading" | 8 | ladda="searchLoading" |
| 22 | class="btn btn-outline-secondary" | 9 | type="text" |
| 23 | type="button" | 10 | class="form-control form-control-sm" |
| 24 | ng-click="busquedaPress(13)" | 11 | placeholder="Busqueda" |
| 12 | ng-model="filters" | ||
| 13 | ng-change="search()" | ||
| 14 | ng-keydown="busquedaDown($event.keyCode)" | ||
| 15 | ng-keypress="busquedaPress($event.keyCode)" | ||
| 16 | foca-focus="selectedVendedor == -1" | ||
| 17 | ng-focus="selectedVendedor = -1" | ||
| 18 | teclado-virtual | ||
| 25 | > | 19 | > |
| 26 | <i class="fa fa-search" aria-hidden="true"></i> | 20 | <div class="input-group-append"> |
| 27 | </button> | 21 | <button |
| 22 | ladda="searchLoading" | ||
| 23 | class="btn btn-outline-secondary" | ||
| 24 | type="button" | ||
| 25 | ng-click="busquedaPress(13)" | ||
| 26 | > | ||
| 27 | <i class="fa fa-search" aria-hidden="true"></i> | ||
| 28 | </button> | ||
| 29 | </div> | ||
| 28 | </div> | 30 | </div> |
| 29 | </div> | 31 | </div> |
| 32 | </div> | ||
| 33 | <div class="modal-body" id="modal-body"> | ||
| 34 | |||
| 35 | <div ng-show="!primerBusqueda"> | ||
| 36 | Debe realizar una primer búsqueda. | ||
| 37 | </div> | ||
| 38 | |||
| 30 | <table ng-show="primerBusqueda" class="table table-striped table-sm col-12"> | 39 | <table ng-show="primerBusqueda" class="table table-striped table-sm col-12"> |
| 31 | <thead> | 40 | <thead> |
| 32 | <tr> | 41 | <tr> |
| 33 | <th>Código</th> | 42 | <th>Código</th> |
| 34 | <th>Nombre</th> | 43 | <th>Nombre</th> |
| 35 | <th></th> | 44 | <th></th> |
| 36 | </tr> | 45 | </tr> |
| 37 | </thead> | 46 | </thead> |
| 38 | <tbody> | 47 | <tbody> |
| 39 | <tr ng-show="currentPageVendedores.length == 0 && primerBusqueda"> | 48 | <tr ng-show="currentPageVendedores.length == 0 && primerBusqueda"> |
| 40 | <td colspan="3"> | 49 | <td colspan="3"> |
| 41 | No se encontraron resultados. | 50 | No se encontraron resultados. |
| 42 | </td> | 51 | </td> |
| 43 | </tr> | 52 | </tr> |
| 44 | <tr class="selected" | 53 | <tr class="selected" |
| 45 | ng-repeat="(key, vendedor) in currentPageVendedores" | 54 | ng-repeat="(key, vendedor) in currentPageVendedores" |
| 46 | ng-click="select(vendedor)" | 55 | ng-click="select(vendedor)" |
| 47 | > | 56 | > |
| 48 | <td ng-bind="vendedor.CodVen"></td> | 57 | <td ng-bind="vendedor.CodVen"></td> |
| 49 | <td ng-bind="vendedor.NomVen"></td> | 58 | <td ng-bind="vendedor.NomVen"></td> |
| 50 | <td class="d-md-none text-primary"> | 59 | <td class="d-md-none text-primary"> |
| 51 | <i class="fa fa-arrow-right" aria-hidden="true"></i> | 60 | <i class="fa fa-circle-thin" aria-hidden="true"></i> |
| 52 | </td> | 61 | </td> |
| 53 | <td class="d-none d-md-table-cell"> | 62 | <td class="d-none d-md-table-cell"> |
| 54 | <button | 63 | <button |
| 55 | type="button" | 64 | type="button" |
| 56 | class="btn btn-xs p-1 float-right" | 65 | class="btn btn-xs p-1 float-right" |
| 57 | ng-class="{ | 66 | ng-class="{ |
| 58 | 'btn-secondary': selectedVendedor != key, | 67 | 'btn-secondary': selectedVendedor != key, |
| 59 | 'btn-primary': selectedVendedor == key | 68 | 'btn-primary': selectedVendedor == key |
| 60 | }" | 69 | }" |
| 61 | foca-focus="selectedVendedor == {{key}}" | 70 | foca-focus="selectedVendedor == {{key}}" |
| 62 | ng-keydown="itemVendedor($event.keyCode)"> | 71 | ng-keydown="itemVendedor($event.keyCode)"> |
| 63 | <i class="fa fa-arrow-right" aria-hidden="true"></i> | 72 | <i class="fa fa-circle-thin" aria-hidden="true"></i> |
| 64 | </button> | 73 | </button> |
| 65 | </td> | 74 | </td> |
| 66 | </tr> | 75 | </tr> |
| 67 | </tbody> | 76 | </tbody> |
| 68 | </table> | 77 | </table> |
| 69 | <nav ng-show="currentPageVendedores.length > 0 && primerBusqueda"> | ||
| 70 | <ul class="pagination pagination-sm justify-content mb-0"> | ||
| 71 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | ||
| 72 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | ||
| 73 | <span aria-hidden="true">«</span> | ||
| 74 | <span class="sr-only">Anterior</span> | ||
| 75 | </a> | ||
| 76 | </li> | ||
| 77 | <li | ||
| 78 | class="page-item" | ||
| 79 | ng-repeat="pagina in paginas" | ||
| 80 | ng-class="{'active': pagina == currentPage}" | ||
| 81 | > | ||
| 82 | <a | ||
| 83 | class="page-link" | ||
| 84 | href="javascript:void();" | ||
| 85 | ng-click="selectPage(pagina)" | ||
| 86 | ng-bind="pagina" | ||
| 87 | ></a> | ||
| 88 | </li> |