Commit 0c7440928ce5568dfb14ca34ead6c4cd5dc5f091

Authored by Martin Macola
1 parent 5d8dba22f4
Exists in master

Agregado boton pagar

... ... @@ -4,6 +4,8 @@
4 4 "description": "Componente de botonera lateral",
5 5 "main": "index.js",
6 6 "scripts": {
  7 + "refresh": "gulp uglify && cp tmp/foca-botonera-lateral.js ../wrapper-demo/node_modules/foca-botonera-lateral/dist/foca-botonera-lateral.min.js",
  8 + "frefresh": "gulp uglify && cp tmp/foca-botonera-lateral.js ../wrapper-facturador/node_modules/foca-botonera-lateral/dist/foca-botonera-lateral.min.js",
7 9 "test": "echo \"Error: no test specified\" && exit 1",
8 10 "compile": "gulp uglify",
9 11 "gulp-pre-commit": "gulp pre-commit",
... ... @@ -55,5 +57,8 @@
55 57 "jshint": "2.9.6",
56 58 "pre-commit": "1.2.2",
57 59 "pump": "3.0.0"
  60 + },
  61 + "dependencies": {
  62 + "node-sass": "^4.12.0"
58 63 }
59 64 }
... ... @@ -8,6 +8,7 @@ angular.module('focaBotoneraLateral')
8 8 cancelar: false,
9 9 pausar: false,
10 10 guardar: false,
  11 + pagar: false,
11 12 guardando: false,
12 13 funcionGuardar: undefined,
13 14 pathCancelar: undefined,
... ... @@ -44,6 +45,12 @@ angular.module('focaBotoneraLateral')
44 45 this.botones.guardar = value;
45 46 if (value) this.botones.funcionGuardar = funcion;
46 47 };
  48 + this.showPagar = function(value, funcion) {
  49 + angular.element('#pagar').removeClass('guardado');
  50 + this.botones.custom = [];
  51 + this.botones.pagar = value;
  52 + if (value) this.botones.funcionGuardar = funcion;
  53 + };
47 54 this.addCustomButton = function(title, funcion) {
48 55 this.botones.custom.push({
49 56 title: title,
src/views/botonera-lateral.html
... ... @@ -8,12 +8,29 @@
8 8 ladda="botones.guardando"
9 9 data-spinner-size="30"
10 10 data-spinner-color="#000000"
11   - class="mb-2 border rounded"
  11 + class="border rounded"
  12 + ng-show="botones.pagar"
  13 + >
  14 + <button
  15 + id="pagar"
  16 + ng-click="botones.funcionGuardar()"
  17 + ng-disabled="botones.guardando"
  18 + type="button"
  19 + title="Pagar"
  20 + class="btn btn-block">
  21 + <strong>PAGAR</strong>
  22 + </button>
  23 + </div>
  24 + <div
  25 + ladda="botones.guardando"
  26 + data-spinner-size="30"
  27 + data-spinner-color="#000000"
  28 + class="border rounded"
  29 + ng-show="botones.guardar"
12 30 >
13 31 <button
14 32 id="guardar"
15 33 ng-click="botones.funcionGuardar()"
16   - ng-show="botones.guardar"
17 34 ng-disabled="botones.guardando"
18 35 type="button"
19 36 title="Guardar"
... ... @@ -26,7 +43,7 @@
26 43 ng-show="botones.pausar"
27 44 type="button"
28 45 title="Pausar"
29   - class="btn btn-block border">
  46 + class="btn btn-block mt-2 border">
30 47 <strong>PAUSAR</strong>
31 48 </button>
32 49 <button
... ... @@ -34,7 +51,7 @@
34 51 ng-show="botones.cancelar"
35 52 type="button"
36 53 title="Cancelar"
37   - class="btn btn-block border border-dark">
  54 + class="btn btn-block mt-2 border border-dark">
38 55 <strong>CANCELAR</strong>
39 56 </button>
40 57 <button
... ... @@ -42,7 +59,7 @@
42 59 ng-show="botones.salir"
43 60 type="button"
44 61 title="Salir"
45   - class="btn btn-block border">
  62 + class="btn btn-block mt-2 border">
46 63 <strong>SALIR</strong>
47 64 </button>
48 65 <button
... ... @@ -50,7 +67,7 @@
50 67 ng-click="boton.funcion()"
51 68 type="button"
52 69 title="{{boton.title}}"
53   - class="btn btn-block border">
  70 + class="btn btn-block mt-2 border">
54 71 <strong
55 72 class="text-uppercase"
56 73 ng-bind="boton.title">
... ... @@ -69,7 +86,7 @@
69 86 <div class="container">
70 87 <div class="row">
71 88 <div
72   - class="btn-group-toggle btn btn-block border"
  89 + class="btn-group-toggle btn btn-block mt-2 border"
73 90 data-toggle="buttons"
74 91 ng-click="cambioUsoTeclado()"
75 92 title="Activar/desactivar teclado">