Commit e2bdace2b6b51e6882a2040d60d7278028c8329a

Authored by Eric Fernandez
1 parent 9439df25f4
Exists in master

tamaño input, color spinner

Showing 2 changed files with 5 additions and 4 deletions   Show diff stats
1 { 1 {
2 "name": "foca-modal-chofer", 2 "name": "foca-modal-chofer",
3 "version": "0.0.1", 3 "version": "0.0.1",
4 "description": "Modal de búsqueda de choferes", 4 "description": "Modal de búsqueda de choferes",
5 "scripts": { 5 "scripts": {
6 "test": "echo \"Error: no test specified\" && exit 1", 6 "test": "echo \"Error: no test specified\" && exit 1",
7 "gulp-pre-commit": "gulp pre-commit", 7 "gulp-pre-commit": "gulp pre-commit",
8 "compile": "gulp uglify", 8 "compile": "gulp uglify",
9 "postinstall": "npm run compile && gulp clean-post-install", 9 "postinstall": "npm run compile && gulp clean-post-install",
10 "install-dev": "npm install -D angular angular-ladda bootstrap font-awesome gulp gulp-angular-templatecache gulp-clean gulp-concat gulp-connect gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-uglify jasmine-core jquery jshint ladda@1.0.6 pre-commit pump ui-bootstrap4 && npm i -D git+ssh://git@git.focasoftware.com:npm/foca-directivas.git" 10 "install-dev": "npm install -D angular angular-ladda bootstrap font-awesome gulp gulp-angular-templatecache gulp-clean gulp-concat gulp-connect gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-uglify jasmine-core jquery jshint ladda@1.0.6 pre-commit pump ui-bootstrap4 && npm i -D git+http://git.focasoftware.com/npm/foca-directivas.git"
11 }, 11 },
12 "pre-commit": [ 12 "pre-commit": [
13 "gulp-pre-commit" 13 "gulp-pre-commit"
14 ], 14 ],
15 "repository": { 15 "repository": {
16 "type": "git", 16 "type": "git",
17 "url": "https://debo.suite.repo/modulos-npm/foca-modal-chofer.git" 17 "url": "https://debo.suite.repo/modulos-npm/foca-modal-chofer.git"
18 }, 18 },
19 "author": "Foca Software", 19 "author": "Foca Software",
20 "license": "ISC", 20 "license": "ISC",
21 "peerDependencies": { 21 "peerDependencies": {
22 "angular": "^1.7.4", 22 "angular": "^1.7.4",
23 "bootstrap": "^4.1.3", 23 "bootstrap": "^4.1.3",
24 "font-awesome": "^4.7.0", 24 "font-awesome": "^4.7.0",
25 "ui-bootstrap4": "^3.0.4", 25 "ui-bootstrap4": "^3.0.4",
26 "gulp": "^3.9.1", 26 "gulp": "^3.9.1",
27 "gulp-angular-templatecache": "^2.2.1", 27 "gulp-angular-templatecache": "^2.2.1",
28 "gulp-concat": "^2.6.1", 28 "gulp-concat": "^2.6.1",
29 "gulp-connect": "^5.6.1", 29 "gulp-connect": "^5.6.1",
30 "gulp-htmlmin": "^5.0.1", 30 "gulp-htmlmin": "^5.0.1",
31 "gulp-rename": "^1.4.0", 31 "gulp-rename": "^1.4.0",
32 "gulp-replace": "^1.0.0", 32 "gulp-replace": "^1.0.0",
33 "gulp-uglify": "^3.0.1", 33 "gulp-uglify": "^3.0.1",
34 "jquery": "^3.3.1", 34 "jquery": "^3.3.1",
35 "pump": "^3.0.0", 35 "pump": "^3.0.0",
36 "foca-directivas": "git+ssh://git@git.focasoftware.com:npm/foca-directivas.git" 36 "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git"
37 }, 37 },
38 "devDependencies": { 38 "devDependencies": {
39 "angular": "1.7.5", 39 "angular": "1.7.5",
40 "angular-ladda": "0.4.3", 40 "angular-ladda": "0.4.3",
41 "bootstrap": "4.1.3", 41 "bootstrap": "4.1.3",
42 "foca-directivas": "git+ssh://git@git.focasoftware.com:npm/foca-directivas.git", 42 "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git",
43 "font-awesome": "4.7.0", 43 "font-awesome": "4.7.0",
44 "gulp": "3.9.1", 44 "gulp": "3.9.1",
45 "gulp-angular-templatecache": "2.2.5", 45 "gulp-angular-templatecache": "2.2.5",
46 "gulp-clean": "0.4.0", 46 "gulp-clean": "0.4.0",
47 "gulp-concat": "2.6.1", 47 "gulp-concat": "2.6.1",
48 "gulp-connect": "5.6.1", 48 "gulp-connect": "5.6.1",
49 "gulp-htmlmin": "5.0.1", 49 "gulp-htmlmin": "5.0.1",
50 "gulp-jshint": "2.1.0", 50 "gulp-jshint": "2.1.0",
51 "gulp-rename": "1.4.0", 51 "gulp-rename": "1.4.0",
52 "gulp-replace": "1.0.0", 52 "gulp-replace": "1.0.0",
53 "gulp-uglify": "3.0.1", 53 "gulp-uglify": "3.0.1",
54 "jasmine-core": "3.3.0", 54 "jasmine-core": "3.3.0",
55 "jquery": "3.3.1", 55 "jquery": "3.3.1",
56 "jshint": "2.9.6", 56 "jshint": "2.9.6",
57 "ladda": "1.0.6", 57 "ladda": "1.0.6",
58 "pre-commit": "1.2.2", 58 "pre-commit": "1.2.2",
59 "pump": "3.0.0", 59 "pump": "3.0.0",
60 "ui-bootstrap4": "3.0.5" 60 "ui-bootstrap4": "3.0.5"
61 } 61 }
62 } 62 }
63 63
src/views/modal-chofer.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">
3 <div class="col-lg-6"> 3 <div class="col-lg-6">
4 <h5 class="modal-title my-1">Búsqueda de Chofer</h5> 4 <h5 class="modal-title my-1">Búsqueda de Chofer</h5>
5 </div> 5 </div>
6 <div class="input-group col-lg-6 pr-0 my-2"> 6 <div class="input-group col-lg-6 pr-0 my-2">
7 <input 7 <input
8 ladda="searchLoading" 8 ladda="searchLoading"
9 type="text" 9 type="text"
10 class="form-control" 10 class="form-control form-control-sm"
11 id="search" 11 id="search"
12 placeholder="Búsqueda" 12 placeholder="Búsqueda"
13 ng-model="filters" 13 ng-model="filters"
14 ng-change="search()" 14 ng-change="search()"
15 ng-keydown="busquedaDown($event.keyCode)" 15 ng-keydown="busquedaDown($event.keyCode)"
16 ng-keypress="busquedaPress($event.keyCode)" 16 ng-keypress="busquedaPress($event.keyCode)"
17 foca-focus="selectedChofer == -1" 17 foca-focus="selectedChofer == -1"
18 ng-focus="selectedChofer = -1" 18 ng-focus="selectedChofer = -1"
19 teclado-virtual 19 teclado-virtual
20 > 20 >
21 <div class="input-group-append"> 21 <div class="input-group-append">
22 <button 22 <button
23 ladda="searchLoading" 23 ladda="searchLoading"
24 data-spinner-color="#FF0000"
24 class="btn btn-outline-secondary" 25 class="btn btn-outline-secondary"
25 type="button" 26 type="button"
26 ng-click="busquedaPress(13)" 27 ng-click="busquedaPress(13)"
27 > 28 >
28 <i class="fa fa-search" aria-hidden="true"></i> 29 <i class="fa fa-search" aria-hidden="true"></i>
29 </button> 30 </button>
30 </div> 31 </div>
31 </div> 32 </div>
32 </div> 33 </div>
33 34
34 </div> 35 </div>
35 <div class="modal-body" id="modal-body"> 36 <div class="modal-body" id="modal-body">
36 37
37 <div ng-show="!primerBusqueda"> 38 <div ng-show="!primerBusqueda">
38 Debe realizar una primer búsqueda. 39 Debe realizar una primer búsqueda.
39 </div> 40 </div>
40 41
41 <table ng-show="primerBusqueda" class="table table-striped table-sm"> 42 <table ng-show="primerBusqueda" class="table table-striped table-sm">
42 <thead> 43 <thead>
43 <tr> 44 <tr>
44 <th>Código</th> 45 <th>Código</th>
45 <th>Nombre</th> 46 <th>Nombre</th>
46 <th>DNI</th> 47 <th>DNI</th>
47 <th>Teléfono</th> 48 <th>Teléfono</th>
48 <th></th> 49 <th></th>
49 </tr> 50 </tr>
50 </thead> 51 </thead>
51 <tbody> 52 <tbody>
52 <tr ng-show="currentPageChoferes.length == 0 && primerBusqueda"> 53 <tr ng-show="currentPageChoferes.length == 0 && primerBusqueda">
53 <td colspan="5"> 54 <td colspan="5">
54 No se encontraron resultados. 55 No se encontraron resultados.
55 </td> 56 </td>
56 </tr> 57 </tr>
57 <tr class="selectable" 58 <tr class="selectable"
58 ng-repeat="(key,chofer) in currentPageChoferes" 59 ng-repeat="(key,chofer) in currentPageChoferes"
59 ng-click="select(chofer)"> 60 ng-click="select(chofer)">
60 <td ng-bind="chofer.id"></td> 61 <td ng-bind="chofer.id"></td>
61 <td ng-bind="chofer.nombre"></td> 62 <td ng-bind="chofer.nombre"></td>
62 <td ng-bind="chofer.dni"></td> 63 <td ng-bind="chofer.dni"></td>
63 <td ng-bind="chofer.telefono"></td> 64 <td ng-bind="chofer.telefono"></td>
64 <td> 65 <td>
65 <button 66 <button
66 type="button" 67 type="button"
67 class="btn btn-xs p-1 float-right" 68 class="btn btn-xs p-1 float-right"
68 ng-class="{ 69 ng-class="{
69 'btn-secondary': selectedChofer != key, 70 'btn-secondary': selectedChofer != key,
70 'btn-primary': selectedChofer == key 71 'btn-primary': selectedChofer == key
71 }" 72 }"
72 foca-focus="selectedChofer == {{key}}" 73 foca-focus="selectedChofer == {{key}}"
73 ng-keydown="itemChofer($event.keyCode)" 74 ng-keydown="itemChofer($event.keyCode)"
74 > 75 >
75 <i class="fa fa-circle-thin" aria-hidden="true"></i> 76 <i class="fa fa-circle-thin" aria-hidden="true"></i>
76 </button> 77 </button>
77 </td> 78 </td>
78 </tr> 79 </tr>
79 </tbody> 80 </tbody>
80 </table> 81 </table>
81 </div> 82 </div>
82 <div class="modal-footer py-1"> 83 <div class="modal-footer py-1">
83 <nav ng-show="currentPageChoferes.length > 0 && primerBusqueda" class="mr-auto"> 84 <nav ng-show="currentPageChoferes.length > 0 && primerBusqueda" class="mr-auto">
84 <ul class="pagination pagination-sm justify-content mb-0"> 85 <ul class="pagination pagination-sm justify-content mb-0">
85 <li class="page-item" ng-class="{'disabled': currentPage == 1}"> 86 <li class="page-item" ng-class="{'disabled': currentPage == 1}">
86 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> 87 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)">
87 <span aria-hidden="true">&laquo;</span> 88 <span aria-hidden="true">&laquo;</span>
88 <span class="sr-only">Anterior</span> 89 <span class="sr-only">Anterior</span>
89 </a> 90 </a>
90 </li> 91 </li>
91 <li 92 <li
92 class="page-item" 93 class="page-item"
93 ng-repeat="pagina in paginas" 94 ng-repeat="pagina in paginas"
94 ng-class="{'active': pagina == currentPage}" 95 ng-class="{'active': pagina == currentPage}"
95 > 96 >
96 <a 97 <a
97 class="page-link" 98 class="page-link"
98 href="javascript:void();" 99 href="javascript:void();"
99 ng-click="selectPage(pagina)" 100 ng-click="selectPage(pagina)"
100 ng-bind="pagina" 101 ng-bind="pagina"
101 ></a> 102 ></a>
102 </li> 103 </li>
103 <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> 104 <li class="page-item" ng-class="{'disabled': currentPage == lastPage}">
104 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> 105 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)">
105 <span aria-hidden="true">&raquo;</span> 106 <span aria-hidden="true">&raquo;</span>
106 <span class="sr-only">Siguiente</span> 107 <span class="sr-only">Siguiente</span>
107 </a> 108 </a>
108 </li> 109 </li>
109 </ul> 110 </ul>
110 </nav> 111 </nav>
111 <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button> 112 <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button>
112 </div> 113 </div>
113 114