Tarea #658 dialogo de añadir cantidad

This commit is contained in:
gerard 2018-09-27 08:42:36 +02:00
parent 7cfcede5ff
commit a5e74335a9
1 changed files with 4 additions and 12 deletions

View File

@ -2,8 +2,9 @@ import ngModule from '../module';
import './style.scss';
class Controller {
constructor($scope, $http, $element) {
constructor($scope, $http, $timeout, $element) {
this.$ = $scope;
this.$timeout = $timeout;
this.$http = $http;
this.$element = $element;
this.totalBasquet = 0;
@ -60,9 +61,8 @@ class Controller {
}
this.validate();
}
validate() {
setTimeout(() => {
this.$timeout(() => {
this.calculateTotal();
let inputs = this.$element[0].querySelectorAll('vn-input-number[name="quantity"] div.infix:not(.validated)');
@ -81,13 +81,6 @@ class Controller {
}
});
}
focusFirstInput() {
let inputs = document.querySelectorAll('input[name="quantity"]');
inputs[inputs.length - 1].querySelector("input").focus();
this.calculateTotals();
}
getFilledLines() {
let filledLines = [];
let match;
@ -106,7 +99,6 @@ class Controller {
});
return filledLines;
}
submit() {
this.calculateTotal();
let filledLines = this.getFilledLines();
@ -129,7 +121,7 @@ class Controller {
}
}
Controller.$inject = ['$scope', '$http', '$element'];
Controller.$inject = ['$scope', '$http', '$timeout', '$element'];
ngModule.component('vnOrderPricesPopover', {
template: require('./index.html'),