Commit 36341c07ee3b20c863813f315cb76e99f0c99ab2
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
Master (pmarco) See merge request modulos-npm/foca-crear-nota-pedido!74
Showing
2 changed files
Show diff stats
gulpfile.js
| ... | ... | @@ -53,7 +53,7 @@ gulp.task('uglify', ['templates'], function() { |
| 53 | 53 | ); |
| 54 | 54 | }); |
| 55 | 55 | |
| 56 | -gulp.task('clean', function(){ | |
| 56 | +gulp.task('clean', function() { | |
| 57 | 57 | return gulp.src(['tmp', 'dist'], {read: false}) |
| 58 | 58 | .pipe(clean()); |
| 59 | 59 | }); |
| ... | ... | @@ -88,3 +88,12 @@ gulp.task('default', ['webserver']); |
| 88 | 88 | gulp.task('watch', function() { |
| 89 | 89 | gulp.watch([paths.srcJS, paths.srcViews], ['uglify']); |
| 90 | 90 | }); |
| 91 | + | |
| 92 | +gulp.task('copy', ['uglify'], function() { | |
| 93 | + return gulp.src('dist/*.js') | |
| 94 | + .pipe(gulp.dest('../../wrapper-demo/node_modules/foca-crear-nota-pedido/dist/')); | |
| 95 | +}); | |
| 96 | + | |
| 97 | +gulp.task('watchAndCopy', function() { | |
| 98 | + return gulp.watch([paths.srcJS], ['copy']); | |
| 99 | +}); |
src/js/controller.js
| ... | ... | @@ -508,7 +508,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 508 | 508 | if(key === 13) { |
| 509 | 509 | if($scope.articuloACargar.cantidad === undefined || |
| 510 | 510 | $scope.articuloACargar.cantidad === 0 || |
| 511 | - $scope.articuloACargar.cantidad === null ){ | |
| 511 | + $scope.articuloACargar.cantidad === null ) { | |
| 512 | 512 | focaModalService.alert('El valor debe ser al menos 1'); |
| 513 | 513 | return; |
| 514 | 514 | } |
| ... | ... | @@ -525,7 +525,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 525 | 525 | $scope.editarArticulo = function(key, articulo) { |
| 526 | 526 | if(key === 13) { |
| 527 | 527 | if(articulo.cantidad === null || articulo.cantidad === 0 || |
| 528 | - articulo.cantidad === undefined){ | |
| 528 | + articulo.cantidad === undefined) { | |
| 529 | 529 | focaModalService.alert('El valor debe ser al menos 1'); |
| 530 | 530 | return; |
| 531 | 531 | } |
| ... | ... | @@ -604,7 +604,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 604 | 604 | |
| 605 | 605 | function removeCabecera(label) { |
| 606 | 606 | var propiedad = $filter('filter')($scope.cabecera, {label: label}, true); |
| 607 | - if(propiedad.length === 1){ | |
| 607 | + if(propiedad.length === 1) { | |
| 608 | 608 | $scope.cabecera.splice($scope.cabecera.indexOf(propiedad[0]), 1); |
| 609 | 609 | } |
| 610 | 610 | } |