From e65975d66e953431dea0a282fdfdb89cd3cec5a5 Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Tue, 24 Mar 2020 01:00:39 +0100 Subject: [PATCH 1/5] Autofocus key input --- views/project.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/project.php b/views/project.php index cc33a5a..82304ac 100644 --- a/views/project.php +++ b/views/project.php @@ -231,7 +231,7 @@
- +
From 60436f2cfea2da5008ad365b3e838791ddaace5b Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Tue, 24 Mar 2020 02:02:02 +0100 Subject: [PATCH 2/5] Bugfix autofocus only working first time, set focus every time! --- views/project.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/project.php b/views/project.php index 82304ac..a14c1eb 100644 --- a/views/project.php +++ b/views/project.php @@ -231,7 +231,7 @@
- +
@@ -458,6 +458,7 @@ setTimeout(function() { UIkit.modal($this.refs.modalkey).show(); + $this.refs.keyfield.focus(); }, 100); } From 1b35ec0dc8ef5990088a5c4d84e1d456d1572c9b Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Tue, 24 Mar 2020 01:23:01 +0100 Subject: [PATCH 3/5] Clear filter on icon click --- views/project.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/views/project.php b/views/project.php index cc33a5a..dce8d5a 100644 --- a/views/project.php +++ b/views/project.php @@ -76,7 +76,7 @@
- +
@@ -595,6 +595,10 @@ }, 250); } + clearfilter() { + this.refs.txtfilter.value = ""; + } + updatefilter(e) { $this.visible = 20; } From dd1068321650e03da2ca51f103c2023a1e97d764 Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Tue, 24 Mar 2020 01:28:31 +0100 Subject: [PATCH 4/5] Clear filter on esc key up --- views/project.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/views/project.php b/views/project.php index dce8d5a..2bc79da 100644 --- a/views/project.php +++ b/views/project.php @@ -600,7 +600,11 @@ } updatefilter(e) { - $this.visible = 20; + if (e.key === "Escape") { + this.clearfilter(); + } else { + $this.visible = 20; + } } infilter(key) { From 6891268b823f6e6659cc6454649939702a2e37ba Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Tue, 24 Mar 2020 00:58:27 +0100 Subject: [PATCH 5/5] Remember last changed multiline --- views/project.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/views/project.php b/views/project.php index cc33a5a..f9762b6 100644 --- a/views/project.php +++ b/views/project.php @@ -240,7 +240,7 @@
- +
@@ -453,7 +453,7 @@ this.$key = { name: '', info: '', - multiline: false + multiline: App.session.get('lokalize.new.multiline', false) }; setTimeout(function() { @@ -547,6 +547,10 @@ this.$key = null; } + changeMultiline(e) { + App.session.set('lokalize.new.multiline', e.target.checked); + } + suggestTranslation(e) { if (suggestionIdle) {