From dd22309e7c685864a60602b02017771a2e2f4eb0 Mon Sep 17 00:00:00 2001 From: gerard Date: Thu, 2 Aug 2018 15:31:01 +0200 Subject: [PATCH 1/6] Bug #576 Cambiar los bindings del textfield --- .../src/components/textfield/textfield.js | 31 +++++-------------- 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/client/core/src/components/textfield/textfield.js b/client/core/src/components/textfield/textfield.js index 81385268a..bee5f1d08 100644 --- a/client/core/src/components/textfield/textfield.js +++ b/client/core/src/components/textfield/textfield.js @@ -22,34 +22,18 @@ export default class Textfield extends Input { this.rightIcons = tClone[0]; }, null, 'rightIcons'); } + this.input.addEventListener('keyup', e => { if (e.key == "Escape") { - this._cancel(); + this.input.blur(); } }); - this.input.addEventListener('focus', () => this.saveOldValue()); - this.input.addEventListener('keyup', e => { - if (e.key == "Enter") { - this._accept(); + this.input.addEventListener('change', e => { + if (this.onChange) { + this.onChange(); } }); } - _accept() { - if (this.accept) { - this.input.blur(); - this.accept(); - } - } - _cancel() { - this.input.blur(); - this.input.value = this.oldValue; - this.value = this.input.value; - this.$.$apply(); - - if (this.cancel) { - this.cancel(); - } - } saveOldValue() { this.oldValue = this.input.value; } @@ -111,8 +95,7 @@ ngModule.component('vnTextfield', { rule: '@?', type: '@?', vnTabIndex: '@?', - accept: '&', - cancel: '&', - unclearable: ' Date: Thu, 2 Aug 2018 15:33:24 +0200 Subject: [PATCH 2/6] revert Bug #575 ng-click se llama en los vn-button deshabilitados --- client/core/src/components/button/button.html | 2 +- client/core/src/components/button/button.js | 3 +-- client/ticket/src/sale/index.html | 13 +++++++++---- client/ticket/src/sale/index.js | 16 +++++++++------- client/ticket/src/sale/locale/es.yml | 1 - 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/client/core/src/components/button/button.html b/client/core/src/components/button/button.html index 27800f1a7..4770714ae 100644 --- a/client/core/src/components/button/button.html +++ b/client/core/src/components/button/button.html @@ -1,4 +1,4 @@ -