Commit 17bdcefdde1412bb69457aee19c260c4bc15821f

Authored by Jose Pinto
1 parent f83339a06b

parametro max

Showing 2 changed files with 4 additions and 2 deletions   Show diff stats
... ... @@ -3,6 +3,7 @@ angular.module('focaBotoneraFacturador', [])
3 3 templateUrl: 'src/views/botonera-facturador.html',
4 4 controller: 'focaBotoneraFacturadorController',
5 5 bindings: {
6   - botones: '<'
  6 + botones: '<',
  7 + max: '<'
7 8 }
8 9 });
src/js/controller.js
... ... @@ -5,9 +5,10 @@ angular.module(&#39;focaBotoneraFacturador&#39;)
5 5 function($scope, $window) {
6 6 this.$onInit = function() {
7 7 $scope.botones = $scope.$ctrl.botones;
  8 + var max = ($scope.$ctrl.max) ? $scope.$ctrl.max : 12;
8 9  
9 10 if($window.innerWidth > 576) {
10   - while(($scope.botones.length % 12) !== 0) {
  11 + while(($scope.botones.length % max) !== 0) {
11 12 $scope.botones.push('');
12 13 }
13 14 }else {