diff --git a/src/js/service.js b/src/js/service.js index 653e530..713db43 100644 --- a/src/js/service.js +++ b/src/js/service.js @@ -7,22 +7,32 @@ angular.module('focaBotoneraLateral') pausar: false, guardar: false, funcionGuardar: undefined, - pathCancelar: undefined + pathCancelar: undefined, + custom: [] }; this.showSalir = function(value) { + this.botones.custom = []; this.botones.salir = value; }; this.showPausar = function(value) { + this.botones.custom = []; this.botones.pausar = value; }; this.showCancelar = function(value, path) { + this.botones.custom = []; this.botones.cancelar = value; this.botones.pathCancelar = (path) ? path : undefined; }; this.showGuardar = function(value, funcion) { + this.botones.custom = []; this.botones.guardar = value; if(value) this.botones.funcionGuardar = funcion; }; - + this.addCustomButton = function(title, funcion){ + this.botones.custom.push({ + title: title, + funcion: funcion + }); + }; }); diff --git a/src/views/botonera-lateral.html b/src/views/botonera-lateral.html index e8ad494..2bdc317 100644 --- a/src/views/botonera-lateral.html +++ b/src/views/botonera-lateral.html @@ -35,6 +35,14 @@ class="btn btn-block border border-dark"> SALIR +