From 490ff51fa6e165e05f541543baef821732273043 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Thu, 21 Sep 2017 12:24:14 +0200 Subject: [PATCH 1/2] bug fixed in address edit with watcher --- client/client/src/address-edit/address-edit.html | 1 - client/core/src/watcher/watcher.js | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/client/src/address-edit/address-edit.html b/client/client/src/address-edit/address-edit.html index 83c860302..c4fbf229a 100644 --- a/client/client/src/address-edit/address-edit.html +++ b/client/client/src/address-edit/address-edit.html @@ -6,7 +6,6 @@ data="$ctrl.address" form="form"> -
diff --git a/client/core/src/watcher/watcher.js b/client/core/src/watcher/watcher.js index c9557848b..cf50c205a 100644 --- a/client/core/src/watcher/watcher.js +++ b/client/core/src/watcher/watcher.js @@ -153,7 +153,8 @@ export default class Watcher extends Component { return copy; } callback(transition) { - if (!this.state && this.dataChanged()) { + let dataChanged = this.dataChanged(); + if (!this.state && dataChanged) { this.state = transition.to().name; this.$scope.confirm.show(); return false; From 235cc2d8f6c526e6edf7cc3e929abc7384b85a77 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Thu, 21 Sep 2017 13:10:30 +0200 Subject: [PATCH 2/2] refactoring autocomplete: input readonly and autofucos on search input --- client/core/src/autocomplete/autocomplete.html | 2 +- client/core/src/autocomplete/autocomplete.js | 1 + client/core/src/drop-down/drop-down.js | 14 +++++++++++++- client/core/src/textfield/textfield.html | 1 + client/core/src/textfield/textfield.js | 2 +- 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/client/core/src/autocomplete/autocomplete.html b/client/core/src/autocomplete/autocomplete.html index 976deb095..65150f09c 100644 --- a/client/core/src/autocomplete/autocomplete.html +++ b/client/core/src/autocomplete/autocomplete.html @@ -1,5 +1,5 @@ - + { + inputFilterSearch.focus(); + }); + } + } get search() { return this._search; } diff --git a/client/core/src/textfield/textfield.html b/client/core/src/textfield/textfield.html index 0d2d93d33..3872ee894 100644 --- a/client/core/src/textfield/textfield.html +++ b/client/core/src/textfield/textfield.html @@ -6,6 +6,7 @@ ng-model="$ctrl.value" vn-validation="{{$ctrl.rule}}" ng-disabled="$ctrl.disabled" + ng-readonly="$ctrl.readonly" />
clear diff --git a/client/core/src/textfield/textfield.js b/client/core/src/textfield/textfield.js index 9dc223506..9272952c8 100644 --- a/client/core/src/textfield/textfield.js +++ b/client/core/src/textfield/textfield.js @@ -20,7 +20,6 @@ export default class TextfieldController extends Component { this.focus = false; this.hasInfo = Boolean(this.$attrs.info); this.info = this.$attrs.info || null; - componentHandler.upgradeElement($element[0].firstChild); } @@ -56,6 +55,7 @@ module.component('vnTextfield', { label: '@?', name: '@?', disabled: '